Skip to content

Commit ca5c202

Browse files
authored
Add tres options for Job Descriptor (#179)
* Add gres option to job description * Add gres to slurm job descriptior * Fix gres encoding * switch using gres to tres_per_node * Add tres options for node and task
1 parent b345312 commit ca5c202

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pyslurm/pyslurm.pyx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2557,6 +2557,18 @@ cdef class job:
25572557
mcs_label = job_opts.get("mcs_label").encode("UTF-8", "replace")
25582558
desc.mcs_label = mcs_label
25592559

2560+
if job_opts.get("tres_per_job"):
2561+
tres_per_job = job_opts.get("tres_per_job").encode("UTF-8", "replace")
2562+
desc.tres_per_job = tres_per_job
2563+
2564+
if job_opts.get("tres_per_node"):
2565+
tres_per_node = job_opts.get("tres_per_node").encode("UTF-8", "replace")
2566+
desc.tres_per_node = tres_per_node
2567+
2568+
if job_opts.get("tres_per_task"):
2569+
tres_per_task = job_opts.get("tres_per_task").encode("UTF-8", "replace")
2570+
desc.tres_per_task = tres_per_task
2571+
25602572
return 0
25612573

25622574
cdef int envcount(self, char **env):

0 commit comments

Comments
 (0)