@@ -109,7 +109,10 @@ cdef class CgroupConfig:
109109
110110 out.mountpoint = conf.get(" CgroupMountpoint" , " /sys/fs/cgroup" )
111111 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+
113116 out.ignore_systemd = _yesno_to_bool(conf.get(" IgnoreSystemd" ))
114117 out.ignore_systemd_on_failure = _yesno_to_bool(conf.get(" IgnoreSystemdOnFailure" ))
115118 out.enable_controllers = _yesno_to_bool(conf.get(" EnableControllers" ))
@@ -205,13 +208,7 @@ cdef class Config:
205208 """
206209 cdef Config conf = Config.__new__ (Config)
207210 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)
213211 # TODO: node_features_conf
214-
215212 return conf
216213
217214 def to_dict (self ):
@@ -231,6 +228,25 @@ cdef class Config:
231228 out[" mpi_config" ] = self .mpi_config.to_dict()
232229 return out
233230
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+
234250 @property
235251 def accounting_storage_enforce (self ):
236252 cdef char tmp[128 ]
0 commit comments