From eca500a196ba496febe4f55c2ca65b1fc14b2c64 Mon Sep 17 00:00:00 2001 From: Toni Harzendorf Date: Fri, 17 Jan 2025 19:46:31 +0100 Subject: [PATCH] slurmctld.config: update some params and docs --- pyslurm/core/slurmctld/config.pxd | 76 ++++++++++++++++++++++++++----- pyslurm/core/slurmctld/config.pyx | 37 ++++++++------- 2 files changed, 82 insertions(+), 31 deletions(-) diff --git a/pyslurm/core/slurmctld/config.pxd b/pyslurm/core/slurmctld/config.pxd index 490894e2..241f7b7b 100644 --- a/pyslurm/core/slurmctld/config.pxd +++ b/pyslurm/core/slurmctld/config.pxd @@ -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 @@ -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 @@ -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. @@ -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 @@ -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. @@ -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. @@ -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. @@ -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 @@ -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. @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/pyslurm/core/slurmctld/config.pyx b/pyslurm/core/slurmctld/config.pyx index 54455525..b41b3f45 100644 --- a/pyslurm/core/slurmctld/config.pyx +++ b/pyslurm/core/slurmctld/config.pyx @@ -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): @@ -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) @@ -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): @@ -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): @@ -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): @@ -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): @@ -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 @@ -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): @@ -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): @@ -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): @@ -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):