From 52f8f7d64725d9ca7639389f0be6f7cec1343a7b Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Mon, 26 Nov 2007 18:25:32 +0000 Subject: [PATCH] Fix a bug in the processing of srun's --exclusive option for a job step. --- NEWS | 1 + src/srun/opt.c | 7 ------- src/srun/srun.c | 7 +++++++ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index 53a04f4e7ae..c5c4b663c18 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ documents those changes that are of interest to users and admins. -- Add support for configurable number of jobs to share resources using the partition Shared parameter in slurm.conf (e.g. "Shared=FORCE:3" for two jobs to share the resources). From Chris Holmes, HP. + -- Fix a bug in the processing of srun's --exclusive option for a job step. * Changes in SLURM 1.3.0-pre5 ============================= diff --git a/src/srun/opt.c b/src/srun/opt.c index 7979b5808c4..a68e04c88b9 100644 --- a/src/srun/opt.c +++ b/src/srun/opt.c @@ -1822,13 +1822,6 @@ static bool _opt_verify(void) opt.nodes_set = true; } } - if (opt.exclusive && opt.nodes_set) { - verbose("ignoring node count set by --nodes or SLURM_NNODES"); - verbose(" it is incompatible with --exclusive"); - opt.nodes_set = false; - opt.min_nodes = 1; - opt.max_nodes = 0; - } if ((opt.nodes_set || opt.extra_set) && !opt.nprocs_set) { /* 1 proc / node default */ opt.nprocs = opt.min_nodes; diff --git a/src/srun/srun.c b/src/srun/srun.c index 471ff42d3d0..313e1e54d2d 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -835,6 +835,13 @@ static void _pty_restore(void) /* opt.exclusive is set, disable user task layout controls */ static void _step_opt_exclusive(void) { + if (opt.nodes_set) { + verbose("ignoring node count set by --nodes or SLURM_NNODES"); + verbose(" it is incompatible with --exclusive"); + opt.nodes_set = false; + opt.min_nodes = 1; + opt.max_nodes = 0; + } if (!opt.nprocs_set) fatal("--nprocs must be set with --exclusive"); if (opt.relative_set) -- GitLab