Skip to content

nativeSpecification does not accept mem unit #84

@marcelzwiers

Description

@marcelzwiers

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...?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions