diff --git a/src/plugins/select/cons_res/select_cons_res.c b/src/plugins/select/cons_res/select_cons_res.c index 9af04cb9899e31e112252fcc9b9b8da9a05553c2..25276c7b02f9135b3dc7654138b4c3efc0f8cf35 100644 --- a/src/plugins/select/cons_res/select_cons_res.c +++ b/src/plugins/select/cons_res/select_cons_res.c @@ -192,7 +192,7 @@ static struct node_cr_record **cr_node_hash_table = NULL; /* node_cr_record hash static uint16_t select_fast_schedule; -List select_cr_job_list; /* List of select_cr_job(s) that are still active */ +List select_cr_job_list = NULL; /* List of select_cr_job(s) that are still active */ #if(0) /* @@ -1200,7 +1200,9 @@ extern int select_p_state_restore(char *dir_name) extern int select_p_job_init(List job_list) { - select_cr_job_list = list_create(NULL); + if (!select_cr_job_list) { + select_cr_job_list = list_create(NULL); + } return SLURM_SUCCESS; } @@ -1841,6 +1843,9 @@ extern int select_p_get_extra_jobinfo(struct node_record *node_ptr, error("cons_res could not find %s", node_ptr->name); rc = SLURM_ERROR; } + if (!job) { + debug3("cons_res: job %d not active", job_ptr->job_id); + } cleanup: list_iterator_destroy(iterator); break; diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c index cd546347dc40e7f8158db65470c9ed83a3f89b0b..84c628f13bcbf9e84fa27c790d0b7e8b78530410 100644 --- a/src/slurmctld/node_scheduler.c +++ b/src/slurmctld/node_scheduler.c @@ -1385,14 +1385,15 @@ extern void build_node_details(struct job_record *job_ptr) if (cr_enabled) job_ptr->alloc_lps[cr_count++] = usable_lps; if(error_code != SLURM_SUCCESS) { - if (cr_enabled) + if (cr_enabled) { xfree(job_ptr->alloc_lps); + job_ptr->alloc_lps = NULL; + job_ptr->alloc_lps_cnt = 0; + } error("Unable to get extra jobinfo " "from JobId=%u", job_ptr->job_id); } - if (usable_lps <= 0) - goto cleanup; memcpy(&job_ptr->node_addr[node_inx++], &node_ptr->slurm_addr, sizeof(slurm_addr));