As per the sbatch documentation, it is possible to request both a minimum and a maximum number of nodes with --nodes:
-N, --nodes=<minnodes[-maxnodes]>
Request that a minimum of minnodes nodes be allocated to this job. A maximum node count may also be specified with maxnodes.
However, slurm-drmaa doesn't support this:
Traceback (most recent call last):
File "/home/ndc/drmaa-venv/bin/sbatch-drmaa", line 20, in <module>
jobid = s.runJob(jt)
File "/home/ndc/drmaa-venv/lib/python2.7/site-packages/drmaa/session.py", line 314, in runJob
c(drmaa_run_job, jid, sizeof(jid), jobTemplate)
File "/home/ndc/drmaa-venv/lib/python2.7/site-packages/drmaa/helpers.py", line 303, in c
return f(*(args + (error_buffer, sizeof(error_buffer))))
File "/home/ndc/drmaa-venv/lib/python2.7/site-packages/drmaa/errors.py", line 151, in error_check
raise _ERRORS[code - 1](error_string)
drmaa.errors.InvalidArgumentException: code 4: not an number: 1-1
As per the sbatch documentation, it is possible to request both a minimum and a maximum number of nodes with
--nodes:However, slurm-drmaa doesn't support this: