Skip to content
Snippets Groups Projects
Commit 8eeef526 authored by Danny Auble's avatar Danny Auble
Browse files

minor mod to formatting, and added a mutex lock around a var in bg_job_place.c

parent e0af4191
No related branches found
No related tags found
No related merge requests found
...@@ -112,8 +112,10 @@ static int _find_best_block_match(struct job_record* job_ptr, ...@@ -112,8 +112,10 @@ static int _find_best_block_match(struct job_record* job_ptr,
we want to fall through to tell the scheduler that it is runnable we want to fall through to tell the scheduler that it is runnable
just not right now. just not right now.
*/ */
slurm_mutex_lock(&block_state_mutex);
if((full_system_block->job_running != -1) && checked<2) { if((full_system_block->job_running != -1) && checked<2) {
checked++; checked++;
slurm_mutex_unlock(&block_state_mutex);
select_g_set_jobinfo(job_ptr->select_jobinfo, select_g_set_jobinfo(job_ptr->select_jobinfo,
SELECT_DATA_CHECKED, &checked); SELECT_DATA_CHECKED, &checked);
...@@ -122,7 +124,8 @@ static int _find_best_block_match(struct job_record* job_ptr, ...@@ -122,7 +124,8 @@ static int _find_best_block_match(struct job_record* job_ptr,
full_system_block->bg_block_id); full_system_block->bg_block_id);
return SLURM_ERROR; return SLURM_ERROR;
} }
slurm_mutex_unlock(&block_state_mutex);
select_g_get_jobinfo(job_ptr->select_jobinfo, select_g_get_jobinfo(job_ptr->select_jobinfo,
SELECT_DATA_CONN_TYPE, &conn_type); SELECT_DATA_CONN_TYPE, &conn_type);
select_g_get_jobinfo(job_ptr->select_jobinfo, select_g_get_jobinfo(job_ptr->select_jobinfo,
...@@ -208,8 +211,8 @@ static int _find_best_block_match(struct job_record* job_ptr, ...@@ -208,8 +211,8 @@ static int _find_best_block_match(struct job_record* job_ptr,
* Insure that any required nodes are in this BG block * Insure that any required nodes are in this BG block
*/ */
if (job_ptr->details->req_node_bitmap if (job_ptr->details->req_node_bitmap
&& (!bit_super_set(job_ptr->details->req_node_bitmap, && (!bit_super_set(job_ptr->details->req_node_bitmap,
record->bitmap))) { record->bitmap))) {
debug("bg block %s lacks required nodes", debug("bg block %s lacks required nodes",
record->bg_block_id); record->bg_block_id);
continue; continue;
......
...@@ -388,8 +388,7 @@ extern void set_block_user(bg_record_t *bg_record) ...@@ -388,8 +388,7 @@ extern void set_block_user(bg_record_t *bg_record)
error("Unable to add user name to block %s. " error("Unable to add user name to block %s. "
"Cancelling job.", "Cancelling job.",
bg_record->bg_block_id); bg_record->bg_block_id);
(void) slurm_fail_job( (void) slurm_fail_job(bg_record->job_running);
bg_record->job_running);
} }
xfree(bg_record->target_name); xfree(bg_record->target_name);
bg_record->target_name = bg_record->target_name =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment