diff --git a/src/sbatch/opt.c b/src/sbatch/opt.c index 7101b7b4127a35968d502550bf61f2bc17a74a68..57cb0803c4ee94ffe02a085738ec25e723ede822 100644 --- a/src/sbatch/opt.c +++ b/src/sbatch/opt.c @@ -2145,7 +2145,7 @@ static bool _opt_verify(void) opt.overcommit, 0); if ((opt.ntasks_per_node > 0) && (!opt.ntasks_set) && - (opt.max_nodes == 0)) { + ((opt.max_nodes == 0) || (opt.min_nodes == opt.max_nodes))) { opt.ntasks = opt.min_nodes * opt.ntasks_per_node; opt.ntasks_set = 1; }