Skip to content

Commit eca500a

Browse files
committed
slurmctld.config: update some params and docs
1 parent d0e744b commit eca500a

File tree

2 files changed

+82
-31
lines changed

2 files changed

+82
-31
lines changed

pyslurm/core/slurmctld/config.pxd

Lines changed: 64 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,13 @@ cdef class Config:
9595
Name of the machine hosting the slurm database.
9696
{slurm.conf#OPT_AccountingStorageHost}
9797
98-
accounting_storage_parameters (dict[str, str]):
98+
accounting_storage_parameters (dict[str, Union[str, int, bool]]):
9999
Options for the accounting storage Plugin
100100
101+
If a value in this dict is `True`, it means this parameter does not
102+
have any additional options specified, and is just an "enabled"
103+
option.
104+
101105
{slurm.conf#OPT_AccountingStorageParameters}
102106
accounting_storage_port (int):
103107
Listening port of the Accounting Database Server
@@ -149,9 +153,13 @@ cdef class Config:
149153
List of alternative authentication plugins the slurmctld permits.
150154
151155
{slurm.conf#OPT_AuthAltTypes}
152-
auth_alt_parameters (dict[str, str]:
156+
auth_alt_parameters (dict[str, Union[str, int, bool]]):
153157
Options for the alternative authentication plugins.
154158
159+
If a value in this dict is `True`, it means this parameter does not
160+
have any additional options specified, and is just an "enabled"
161+
option.
162+
155163
{slurm.conf#OPT_AuthAltParameters}
156164
auth_info (list[str]):
157165
List of additional information used for authentication of
@@ -175,9 +183,13 @@ cdef class Config:
175183
through `sbcast` or `srun --bcast`.
176184
177185
{slurm.conf#OPT_BcastExclude}
178-
bcast_parameters (dict[str, str]:
186+
bcast_parameters (dict[str, Union[int, str, bool]]:
179187
Options for `sbcast` and `srun --bcast` behaviour.
180188
189+
If a value in this dict is `True`, it means this parameter does not
190+
have any additional options specified, and is just an "enabled"
191+
option.
192+
181193
{slurm.conf#OPT_BcastParameters}
182194
burst_buffer_type (str):
183195
Plugin used to manage burst buffers.
@@ -200,6 +212,10 @@ cdef class Config:
200212
communication_parameters (dict[str, Union[str, int]]):
201213
Communication options for Cluster daemons.
202214
215+
If a value in this dict is `True`, it means this parameter does not
216+
have any additional options specified, and is just an "enabled"
217+
option.
218+
203219
{slurm.conf#OPT_CommunicationParameters}
204220
complete_wait_time (int):
205221
The time to wait, in seconds, when any job is in the COMPLETING state
@@ -236,9 +252,13 @@ cdef class Config:
236252
Default real memory size available per allocated Node in Mebibytes.
237253
238254
{slurm.conf#OPT_DefMemPerNode}
239-
dependency_parameters (list[str]):
255+
dependency_parameters (dict[str, Union[str, int, bool]]):
240256
List of parameters for dependencies.
241257
258+
If a value in this dict is `True`, it means this parameter does not
259+
have any additional options specified, and is just an "enabled"
260+
option.
261+
242262
{slurm.conf#OPT_DependencyParameters}
243263
disable_root_jobs (bool):
244264
Whether root can submit Jobs or not.
@@ -274,9 +294,13 @@ cdef class Config:
274294
allocated resources.
275295
276296
{slurm.conf#OPT_FairShareDampeningFactor}
277-
federation_parameters (list[str]):
297+
federation_parameters (dict[str, Union[str, int, bool]]):
278298
Options for Federations
279299
300+
If a value in this dict is `True`, it means this parameter does not
301+
have any additional options specified, and is just an "enabled"
302+
option.
303+
280304
{slurm.conf#OPT_FederationParameters}
281305
first_job_id (int):
282306
The job id to be used for the first job submitted.
@@ -361,9 +385,13 @@ cdef class Config:
361385
`job_completion_type`
362386
363387
{slurm.conf#OPT_JobCompLoc}
364-
job_completion_parameters (list[str]):
388+
job_completion_parameters (dict[str, Union[str, int, bool]]):
365389
Arbitrary text passed to the Job completion plugin.
366390
391+
If a value in this dict is `True`, it means this parameter does not
392+
have any additional options specified, and is just an "enabled"
393+
option.
394+
367395
{slurm.conf#OPT_JobCompParams}
368396
job_completion_port (int):
369397
The listening port of the job completion database server.
@@ -490,9 +518,13 @@ cdef class Config:
490518
Default type of MPI that will be used.
491519
492520
{slurm.conf#OPT_MpiDefault}
493-
mpi_parameters (list[str]):
521+
mpi_parameters (dict[str, Union[str, int, bool]]):
494522
Parameters for MPI.
495523
524+
If a value in this dict is `True`, it means this parameter does not
525+
have any additional options specified, and is just an "enabled"
526+
option.
527+
496528
{slurm.conf#OPT_MpiParams}
497529
message_timeout (int):
498530
Time permitted for a round-trip communication to complete in
@@ -528,9 +560,13 @@ cdef class Config:
528560
Mechanism used to preempt jobs or enable gang scheduling.
529561
530562
{slurm.conf#OPT_PreemptMode}
531-
preempt_parameters (list[str]):
563+
preempt_parameters (dict[str, Union[str, int, bool]]):
532564
Options for the Preempt Plugin.
533565
566+
If a value in this dict is `True`, it means this parameter does not
567+
have any additional options specified, and is just an "enabled"
568+
option.
569+
534570
{slurm.conf#OPT_PreemptParameters}
535571
preempt_type (str):
536572
Plugin used to identify which jobs can be preempted.
@@ -728,9 +764,13 @@ cdef class Config:
728764
The initial level of scheduling event logging.
729765
730766
{slurm.conf#OPT_SlurmSchedLogLevel}
731-
scheduler_parameters (list[str]):
767+
scheduler_parameters (dict[str, Union[str, int, bool]]):
732768
List of options for the `scheduler_type` plugin.
733769
770+
If a value in this dict is `True`, it means this parameter does not
771+
have any additional options specified, and is just an "enabled"
772+
option.
773+
734774
{slurm.conf#OPT_SchedulerParameters}
735775
scheduler_time_slice (int):
736776
Number of seconds in each time slice when gang scheduling is
@@ -827,9 +867,13 @@ cdef class Config:
827867
Pathname of the file where `slurmd` writes logs to.
828868
829869
{slurm.conf#OPT_SlurmdLogFile}
830-
slurmd_parameters (list[str]):
870+
slurmd_parameters (dict[str, Union[str, int, bool]]):
831871
Parameters for the `slurmd`.
832872
873+
If a value in this dict is `True`, it means this parameter does not
874+
have any additional options specified, and is just an "enabled"
875+
option.
876+
833877
{slurm.conf#OPT_SlurmdParameters}
834878
slurmd_pid_file (str):
835879
Pathname of a file into which the `slurmd` daemon may write its
@@ -913,9 +957,13 @@ cdef class Config:
913957
communications.
914958
915959
{slurm.conf#OPT_SwitchType}
916-
switch_parameters (list[str]):
960+
switch_parameters (dict[str, Union[str, int, bool]]):
917961
Optional parameters for the switch plugin.
918962
963+
If a value in this dict is `True`, it means this parameter does not
964+
have any additional options specified, and is just an "enabled"
965+
option.
966+
919967
{slurm.conf#OPT_SwitchParameters}
920968
task_epilog (str):
921969
Pathname of a program to be executed as the slurm job's owner after
@@ -949,9 +997,13 @@ cdef class Config:
949997
storage.
950998
951999
{slurm.conf#OPT_TmpFS}
952-
topology_parameters (list[str]):
1000+
topology_parameters (dict[str, Union[str, int, bool]]):
9531001
List of network topology options
9541002
1003+
If a value in this dict is `True`, it means this parameter does not
1004+
have any additional options specified, and is just an "enabled"
1005+
option.
1006+
9551007
{slurm.conf#OPT_TopologyParam}
9561008
topology_plugin (str):
9571009
Identifies the plugin to be used for determining the network

pyslurm/core/slurmctld/config.pyx

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ cdef class Config:
268268

269269
@property
270270
def accounting_storage_parameters(self):
271-
return cstr.to_dict(self.ptr.accounting_storage_params)
271+
return cstr.to_dict(self.ptr.accounting_storage_params, delim1=",",
272+
delim2="=", def_value=True)
272273

273274
@property
274275
def accounting_storage_port(self):
@@ -388,7 +389,6 @@ cdef class Config:
388389

389390
@property
390391
def communication_parameters(self):
391-
# TODO: check again
392392
return cstr.to_dict(self.ptr.comm_params, delim1=",",
393393
delim2="=", def_value=True)
394394

@@ -431,8 +431,8 @@ cdef class Config:
431431

432432
@property
433433
def dependency_parameters(self):
434-
# TODO: check format again
435-
return cstr.to_list(self.ptr.dependency_params)
434+
return cstr.to_dict(self.ptr.dependency_params, delim1=",",
435+
delim2="=", def_value=True)
436436

437437
@property
438438
def disable_root_jobs(self):
@@ -554,8 +554,8 @@ cdef class Config:
554554

555555
@property
556556
def job_completion_parameters(self):
557-
# TODO: maybe dict?
558-
return cstr.to_list(self.ptr.job_comp_params)
557+
return cstr.to_dict(self.ptr.job_comp_params, delim1=",",
558+
delim2="=", def_value=True)
559559

560560
@property
561561
def job_completion_port(self):
@@ -698,8 +698,8 @@ cdef class Config:
698698

699699
@property
700700
def mpi_parameters(self):
701-
# TODO: check format again
702-
return cstr.to_list(self.ptr.mpi_params)
701+
return cstr.to_dict(self.ptr.mpi_params, delim1=",",
702+
delim2="=", def_value=True)
703703

704704
@property
705705
def message_timeout(self):
@@ -737,8 +737,8 @@ cdef class Config:
737737

738738
@property
739739
def preempt_parameters(self):
740-
# TODO: check format again
741-
return cstr.to_list(self.ptr.preempt_params)
740+
return cstr.to_dict(self.ptr.preempt_params, delim1=",",
741+
delim2="=", def_value=True)
742742

743743
@property
744744
def preempt_type(self):
@@ -759,7 +759,6 @@ cdef class Config:
759759

760760
@property
761761
def priority_calc_period(self):
762-
# TODO: seconds or minutes?
763762
return u32_parse(self.ptr.priority_calc_period)
764763

765764
@property
@@ -938,8 +937,8 @@ cdef class Config:
938937

939938
@property
940939
def scheduler_parameters(self):
941-
# TODO: check format again
942-
return cstr.to_list(self.ptr.sched_params)
940+
return cstr.to_dict(self.ptr.sched_params, delim1=",",
941+
delim2="=", def_value=True)
943942

944943
@property
945944
def scheduler_time_slice(self):
@@ -1046,8 +1045,8 @@ cdef class Config:
10461045

10471046
@property
10481047
def slurmd_parameters(self):
1049-
# TODO: Check again
1050-
return cstr.to_list(self.ptr.slurmd_params)
1048+
return cstr.to_dict(self.ptr.slurmd_params, delim1=",",
1049+
delim2="=", def_value=True)
10511050

10521051
@property
10531052
def slurmd_pid_file(self):
@@ -1124,8 +1123,8 @@ cdef class Config:
11241123

11251124
@property
11261125
def switch_parameters(self):
1127-
# TODO: Check format again
1128-
return cstr.to_list(self.ptr.switch_param)
1126+
return cstr.to_dict(self.ptr.switch_param, delim1=",",
1127+
delim2="=", def_value=True)
11291128

11301129
@property
11311130
def task_epilog(self):
@@ -1167,8 +1166,8 @@ cdef class Config:
11671166

11681167
@property
11691168
def topology_parameters(self):
1170-
# TODO: check format again
1171-
return cstr.to_list(self.ptr.topology_param)
1169+
return cstr.to_dict(self.ptr.topology_param, delim1=",",
1170+
delim2="=", def_value=True)
11721171

11731172
@property
11741173
def topology_plugin(self):

0 commit comments

Comments
 (0)