From b6c203efb5f0a9612ff46fbf5ef0a257d2406d61 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Mon, 19 May 2008 17:12:33 +0000 Subject: [PATCH] fix bug introduced in last checkin reording some logic (used uninitialized variable) --- src/slurmctld/job_mgr.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index e9a872cd263..c2a6a5982b0 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -1808,7 +1808,7 @@ static int _job_create(job_desc_msg_t * job_desc, int allocate, int will_run, bitstr_t *req_bitmap = NULL, *exc_bitmap = NULL; bool super_user = false; struct job_record *job_ptr; - uint32_t total_nodes, max_procs, max_nodes_orig; + uint32_t total_nodes, max_procs; acct_association_rec_t assoc_rec, *assoc_ptr; List license_list = NULL; bool valid; @@ -1846,23 +1846,21 @@ static int _job_create(job_desc_msg_t * job_desc, int allocate, int will_run, #else job_desc->max_nodes = part_ptr->max_nodes_orig; #endif - } else if (max_nodes_orig < part_ptr->min_nodes_orig) { + } else if (job_desc->max_nodes < part_ptr->min_nodes_orig) { info("_job_create: job's max nodes less than partition's " "min nodes (%u < %u)", - max_nodes_orig, part_ptr->min_nodes_orig); + job_desc->max_nodes, part_ptr->min_nodes_orig); error_code = ESLURM_TOO_MANY_REQUESTED_NODES; return error_code; } - max_nodes_orig = job_desc->max_nodes; - info("before alteration asking for nodes %u-%u procs %u", + debug3("before alteration asking for nodes %u-%u procs %u", job_desc->min_nodes, job_desc->max_nodes, job_desc->num_procs); select_g_alter_node_cnt(SELECT_SET_NODE_CNT, job_desc); select_g_get_jobinfo(job_desc->select_jobinfo, SELECT_DATA_MAX_PROCS, &max_procs); - - info("after alteration asking for nodes %u-%u procs %u-%u", + debug3("after alteration asking for nodes %u-%u procs %u-%u", job_desc->min_nodes, job_desc->max_nodes, job_desc->num_procs, max_procs); -- GitLab