drmaa-python icon indicating copy to clipboard operation
drmaa-python copied to clipboard

nativeSpecification does not accept mem unit

Open marcelzwiers opened this issue 2 years ago • 0 comments

I'm using drmaa-python to run jobs on our slurm cluster and all works fine if I use:

jt.nativeSpecification = "--mem=4000"

Which I believe is interpreted as 4000 mb (default). However, if I specify the unit I get an error:

jt.nativeSpecification = "--mem=4G"
  File "/opt/bidscoin/lib/python3.10/site-packages/drmaa/session.py", line 314, in runJob
    c(drmaa_run_job, jid, sizeof(jid), jobTemplate)
  File "/opt/bidscoin/lib/python3.10/site-packages/drmaa/helpers.py", line 302, in c
    return f(*(args + (error_buffer, sizeof(error_buffer))))
  File "/opt/bidscoin/lib/python3.10/site-packages/drmaa/errors.py", line 151, in error_check
    raise _ERRORS[code - 1](error_string)
drmaa.errors.InvalidArgumentException: code 4: not an number: 4G

Using sbatch --mem=4G directly works just fine, so the syntax looks fine to me. I may have done something wrong, but I can't figure out how to specify mem in GB...?

marcelzwiers avatar Nov 06 '23 15:11 marcelzwiers