Skip to content

Commit

Permalink
slurmctld.config: update some params and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tazend committed Jan 17, 2025
1 parent d0e744b commit eca500a
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 31 deletions.
76 changes: 64 additions & 12 deletions pyslurm/core/slurmctld/config.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,13 @@ cdef class Config:
Name of the machine hosting the slurm database.
{slurm.conf#OPT_AccountingStorageHost}
accounting_storage_parameters (dict[str, str]):
accounting_storage_parameters (dict[str, Union[str, int, bool]]):
Options for the accounting storage Plugin
If a value in this dict is `True`, it means this parameter does not
have any additional options specified, and is just an "enabled"
option.
{slurm.conf#OPT_AccountingStorageParameters}
accounting_storage_port (int):
Listening port of the Accounting Database Server
Expand Down Expand Up @@ -149,9 +153,13 @@ cdef class Config:
List of alternative authentication plugins the slurmctld permits.
{slurm.conf#OPT_AuthAltTypes}
auth_alt_parameters (dict[str, str]:
auth_alt_parameters (dict[str, Union[str, int, bool]]):
Options for the alternative authentication plugins.
If a value in this dict is `True`, it means this parameter does not
have any additional options specified, and is just an "enabled"
option.
{slurm.conf#OPT_AuthAltParameters}
auth_info (list[str]):
List of additional information used for authentication of
Expand All @@ -175,9 +183,13 @@ cdef class Config:
through `sbcast` or `srun --bcast`.
{slurm.conf#OPT_BcastExclude}
bcast_parameters (dict[str, str]:
bcast_parameters (dict[str, Union[int, str, bool]]:
Options for `sbcast` and `srun --bcast` behaviour.
If a value in this dict is `True`, it means this parameter does not
have any additional options specified, and is just an "enabled"
option.
{slurm.conf#OPT_BcastParameters}
burst_buffer_type (str):
Plugin used to manage burst buffers.
Expand All @@ -200,6 +212,10 @@ cdef class Config:
communication_parameters (dict[str, Union[str, int]]):
Communication options for Cluster daemons.
If a value in this dict is `True`, it means this parameter does not
have any additional options specified, and is just an "enabled"
option.
{slurm.conf#OPT_CommunicationParameters}
complete_wait_time (int):
The time to wait, in seconds, when any job is in the COMPLETING state
Expand Down Expand Up @@ -236,9 +252,13 @@ cdef class Config:
Default real memory size available per allocated Node in Mebibytes.
{slurm.conf#OPT_DefMemPerNode}
dependency_parameters (list[str]):
dependency_parameters (dict[str, Union[str, int, bool]]):
List of parameters for dependencies.
If a value in this dict is `True`, it means this parameter does not
have any additional options specified, and is just an "enabled"
option.
{slurm.conf#OPT_DependencyParameters}
disable_root_jobs (bool):
Whether root can submit Jobs or not.
Expand Down Expand Up @@ -274,9 +294,13 @@ cdef class Config:
allocated resources.
{slurm.conf#OPT_FairShareDampeningFactor}
federation_parameters (list[str]):
federation_parameters (dict[str, Union[str, int, bool]]):
Options for Federations
If a value in this dict is `True`, it means this parameter does not
have any additional options specified, and is just an "enabled"
option.
{slurm.conf#OPT_FederationParameters}
first_job_id (int):
The job id to be used for the first job submitted.
Expand Down Expand Up @@ -361,9 +385,13 @@ cdef class Config:
`job_completion_type`
{slurm.conf#OPT_JobCompLoc}
job_completion_parameters (list[str]):
job_completion_parameters (dict[str, Union[str, int, bool]]):
Arbitrary text passed to the Job completion plugin.
If a value in this dict is `True`, it means this parameter does not
have any additional options specified, and is just an "enabled"
option.
{slurm.conf#OPT_JobCompParams}
job_completion_port (int):
The listening port of the job completion database server.
Expand Down Expand Up @@ -490,9 +518,13 @@ cdef class Config:
Default type of MPI that will be used.
{slurm.conf#OPT_MpiDefault}
mpi_parameters (list[str]):
mpi_parameters (dict[str, Union[str, int, bool]]):
Parameters for MPI.
If a value in this dict is `True`, it means this parameter does not
have any additional options specified, and is just an "enabled"
option.
{slurm.conf#OPT_MpiParams}
message_timeout (int):
Time permitted for a round-trip communication to complete in
Expand Down Expand Up @@ -528,9 +560,13 @@ cdef class Config:
Mechanism used to preempt jobs or enable gang scheduling.
{slurm.conf#OPT_PreemptMode}
preempt_parameters (list[str]):
preempt_parameters (dict[str, Union[str, int, bool]]):
Options for the Preempt Plugin.
If a value in this dict is `True`, it means this parameter does not
have any additional options specified, and is just an "enabled"
option.
{slurm.conf#OPT_PreemptParameters}
preempt_type (str):
Plugin used to identify which jobs can be preempted.
Expand Down Expand Up @@ -728,9 +764,13 @@ cdef class Config:
The initial level of scheduling event logging.
{slurm.conf#OPT_SlurmSchedLogLevel}
scheduler_parameters (list[str]):
scheduler_parameters (dict[str, Union[str, int, bool]]):
List of options for the `scheduler_type` plugin.
If a value in this dict is `True`, it means this parameter does not
have any additional options specified, and is just an "enabled"
option.
{slurm.conf#OPT_SchedulerParameters}
scheduler_time_slice (int):
Number of seconds in each time slice when gang scheduling is
Expand Down Expand Up @@ -827,9 +867,13 @@ cdef class Config:
Pathname of the file where `slurmd` writes logs to.
{slurm.conf#OPT_SlurmdLogFile}
slurmd_parameters (list[str]):
slurmd_parameters (dict[str, Union[str, int, bool]]):
Parameters for the `slurmd`.
If a value in this dict is `True`, it means this parameter does not
have any additional options specified, and is just an "enabled"
option.
{slurm.conf#OPT_SlurmdParameters}
slurmd_pid_file (str):
Pathname of a file into which the `slurmd` daemon may write its
Expand Down Expand Up @@ -913,9 +957,13 @@ cdef class Config:
communications.
{slurm.conf#OPT_SwitchType}
switch_parameters (list[str]):
switch_parameters (dict[str, Union[str, int, bool]]):
Optional parameters for the switch plugin.
If a value in this dict is `True`, it means this parameter does not
have any additional options specified, and is just an "enabled"
option.
{slurm.conf#OPT_SwitchParameters}
task_epilog (str):
Pathname of a program to be executed as the slurm job's owner after
Expand Down Expand Up @@ -949,9 +997,13 @@ cdef class Config:
storage.
{slurm.conf#OPT_TmpFS}
topology_parameters (list[str]):
topology_parameters (dict[str, Union[str, int, bool]]):
List of network topology options
If a value in this dict is `True`, it means this parameter does not
have any additional options specified, and is just an "enabled"
option.
{slurm.conf#OPT_TopologyParam}
topology_plugin (str):
Identifies the plugin to be used for determining the network
Expand Down
37 changes: 18 additions & 19 deletions pyslurm/core/slurmctld/config.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ cdef class Config:

@property
def accounting_storage_parameters(self):
return cstr.to_dict(self.ptr.accounting_storage_params)
return cstr.to_dict(self.ptr.accounting_storage_params, delim1=",",
delim2="=", def_value=True)

@property
def accounting_storage_port(self):
Expand Down Expand Up @@ -388,7 +389,6 @@ cdef class Config:

@property
def communication_parameters(self):
# TODO: check again
return cstr.to_dict(self.ptr.comm_params, delim1=",",
delim2="=", def_value=True)

Expand Down Expand Up @@ -431,8 +431,8 @@ cdef class Config:

@property
def dependency_parameters(self):
# TODO: check format again
return cstr.to_list(self.ptr.dependency_params)
return cstr.to_dict(self.ptr.dependency_params, delim1=",",
delim2="=", def_value=True)

@property
def disable_root_jobs(self):
Expand Down Expand Up @@ -554,8 +554,8 @@ cdef class Config:

@property
def job_completion_parameters(self):
# TODO: maybe dict?
return cstr.to_list(self.ptr.job_comp_params)
return cstr.to_dict(self.ptr.job_comp_params, delim1=",",
delim2="=", def_value=True)

@property
def job_completion_port(self):
Expand Down Expand Up @@ -698,8 +698,8 @@ cdef class Config:

@property
def mpi_parameters(self):
# TODO: check format again
return cstr.to_list(self.ptr.mpi_params)
return cstr.to_dict(self.ptr.mpi_params, delim1=",",
delim2="=", def_value=True)

@property
def message_timeout(self):
Expand Down Expand Up @@ -737,8 +737,8 @@ cdef class Config:

@property
def preempt_parameters(self):
# TODO: check format again
return cstr.to_list(self.ptr.preempt_params)
return cstr.to_dict(self.ptr.preempt_params, delim1=",",
delim2="=", def_value=True)

@property
def preempt_type(self):
Expand All @@ -759,7 +759,6 @@ cdef class Config:

@property
def priority_calc_period(self):
# TODO: seconds or minutes?
return u32_parse(self.ptr.priority_calc_period)

@property
Expand Down Expand Up @@ -938,8 +937,8 @@ cdef class Config:

@property
def scheduler_parameters(self):
# TODO: check format again
return cstr.to_list(self.ptr.sched_params)
return cstr.to_dict(self.ptr.sched_params, delim1=",",
delim2="=", def_value=True)

@property
def scheduler_time_slice(self):
Expand Down Expand Up @@ -1046,8 +1045,8 @@ cdef class Config:

@property
def slurmd_parameters(self):
# TODO: Check again
return cstr.to_list(self.ptr.slurmd_params)
return cstr.to_dict(self.ptr.slurmd_params, delim1=",",
delim2="=", def_value=True)

@property
def slurmd_pid_file(self):
Expand Down Expand Up @@ -1124,8 +1123,8 @@ cdef class Config:

@property
def switch_parameters(self):
# TODO: Check format again
return cstr.to_list(self.ptr.switch_param)
return cstr.to_dict(self.ptr.switch_param, delim1=",",
delim2="=", def_value=True)

@property
def task_epilog(self):
Expand Down Expand Up @@ -1167,8 +1166,8 @@ cdef class Config:

@property
def topology_parameters(self):
# TODO: check format again
return cstr.to_list(self.ptr.topology_param)
return cstr.to_dict(self.ptr.topology_param, delim1=",",
delim2="=", def_value=True)

@property
def topology_plugin(self):
Expand Down

0 comments on commit eca500a

Please sign in to comment.