diff --git a/src/sbatch/opt.c b/src/sbatch/opt.c index 59fa03a778458c6ca86c56993d2d8e667308953d..c37106a755c60bc1451eb6f6f54b469e864f89fb 100644 --- a/src/sbatch/opt.c +++ b/src/sbatch/opt.c @@ -2365,8 +2365,7 @@ static bool _opt_verify(void) if(!opt.nodes_set) { opt.nodes_set = 1; hostlist_uniq(hl); - opt.min_nodes = opt.max_nodes - = hostlist_count(hl); + opt.min_nodes = opt.max_nodes = hostlist_count(hl); } hostlist_destroy(hl); } diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 8978270ee63604398ae79c486188549994782cae..363f93b72c58b52578b089aa7f1067d3f0bb2236 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -2921,10 +2921,11 @@ extern int job_allocate(job_desc_msg_t * job_specs, int immediate, int error_code; bool no_alloc, top_prio, test_only, too_fragmented, independent; struct job_record *job_ptr; + time_t now = time(NULL); + error_code = _job_create(job_specs, allocate, will_run, &job_ptr, submit_uid); *job_pptr = job_ptr; - time_t now = time(NULL); if (error_code) { if (job_ptr && (immediate || will_run)) {