@@ -109,7 +109,10 @@ cdef class CgroupConfig:
109
109
110
110
out.mountpoint = conf.get(" CgroupMountpoint" , " /sys/fs/cgroup" )
111
111
out.plugin = conf.get(" CgroupPlugin" , " autodetect" )
112
- out.systemd_timeout = int (conf.get(" SystemdTimeout" , 1000 ))
112
+
113
+ systemd_timeout = conf.get(" SystemdTimeout" , " 1000" )
114
+ out.systemd_timeout = int (systemd_timeout.split(" " )[0 ])
115
+
113
116
out.ignore_systemd = _yesno_to_bool(conf.get(" IgnoreSystemd" ))
114
117
out.ignore_systemd_on_failure = _yesno_to_bool(conf.get(" IgnoreSystemdOnFailure" ))
115
118
out.enable_controllers = _yesno_to_bool(conf.get(" EnableControllers" ))
@@ -205,13 +208,7 @@ cdef class Config:
205
208
"""
206
209
cdef Config conf = Config.__new__ (Config)
207
210
verify_rpc(slurm_load_ctl_conf(0 , & conf.ptr))
208
-
209
- conf.cgroup_config = CgroupConfig.from_ptr(conf.ptr.cgroup_conf)
210
- conf.accounting_gather_config = AccountingGatherConfig.from_ptr(
211
- conf.ptr.acct_gather_conf)
212
- conf.mpi_config = MPIConfig.from_ptr(conf.ptr.mpi_conf)
213
211
# TODO: node_features_conf
214
-
215
212
return conf
216
213
217
214
def to_dict (self ):
@@ -231,6 +228,25 @@ cdef class Config:
231
228
out[" mpi_config" ] = self .mpi_config.to_dict()
232
229
return out
233
230
231
+ @property
232
+ def cgroup_config (self ):
233
+ if not self ._cgroup_config:
234
+ self ._cgroup_config = CgroupConfig.from_ptr(self .ptr.cgroup_conf)
235
+ return self ._cgroup_config
236
+
237
+ @property
238
+ def accounting_gather_config (self ):
239
+ if not self ._accounting_gather_config:
240
+ self ._accounting_gather_config = AccountingGatherConfig.from_ptr(
241
+ self .ptr.acct_gather_conf)
242
+ return self ._accounting_gather_config
243
+
244
+ @property
245
+ def mpi_config (self ):
246
+ if not self ._mpi_config:
247
+ self ._mpi_config = MPIConfig.from_ptr(self .ptr.mpi_conf)
248
+ return self ._mpi_config
249
+
234
250
@property
235
251
def accounting_storage_enforce (self ):
236
252
cdef char tmp[128 ]
0 commit comments