submit_batch_job help

91 views
Skip to first unread message

Alan Hoyle

unread,
Jun 3, 2022, 1:13:18 PM6/3/22
to pys...@googlegroups.com
-I've started to use pyslurm for an automation workflow.  

I've successfully gotten it to submit a job, but it doesn't seem to have accepted all of the options I want to dump in.  E.g., with the code below, it seems to get the script, partition, job_name, output, and error, but it doesn't get the mem or cpus.  

mem = '32G'
cpus = '4'
partition = 'himem'
job_name = "sweet_job_name"

job_opts = {
    'script': script_name,
    'mem': mem,
    'cpus': cpus,
    'partition': partition,
    'job_name': job_name,
    'output': os.path.join(work_dir, 'stdoe', job_name + '.o%j'),
    'error': os.path.join(work_dir, 'stdoe', job_name + '.e%j'),
}

job_id = pyslurm.job().submit_batch_job(job_opts)

print("Submitted batch job", job_id, 'job_name:', job_name)

What do I need to do to get those passed to the submitted job? 



--
  -  Alan Hoyle  -  al...@alanhoyle.com  -  http://www.alanhoyle.com/  -
Reply all
Reply to author
Forward
0 new messages