We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aaf7385 commit 23c9d69Copy full SHA for 23c9d69
pyslurm/core/job/job.pyx
@@ -1237,6 +1237,21 @@ cdef class Job:
1237
def gres_per_node(self):
1238
return cstr.to_gres_dict(self.ptr.tres_per_node)
1239
1240
+ @property
1241
+ def tres_per_task(self):
1242
+ tres_str = cstr.to_unicode(self.ptr.tres_per_task)
1243
+ if not tres_str:
1244
+ return None
1245
+
1246
+ cdef:
1247
+ dict a = {}
1248
+ char *i
1249
+ # eg. cpu=1,gres/gpu=1
1250
+ for i in tres_str.split(","):
1251
+ a[i.split("=")[0]] = int(i.split("=")[1])
1252
1253
+ return a
1254
1255
@property
1256
def profile_types(self):
1257
return acctg_profile_int_to_list(self.ptr.profile)
0 commit comments