Merge branch 'thomas/t26092-rest-qos-preempt' into 'master' See merge request nvidia/schedmd/slurm/slurm!5054
diff --git a/CHANGELOG/slurm-26.11.md b/CHANGELOG/slurm-26.11.md index b089b13..b59836c 100644 --- a/CHANGELOG/slurm-26.11.md +++ b/CHANGELOG/slurm-26.11.md
@@ -1,3 +1,13 @@ +## Changes in 26.11.0 + +* Fix scontrol update of a reservation whose end was set with EndTime, where adjusting Duration with += or -= produced a wrong EndTime. +* auth/jwt - Fix reservation Users= lists for credentials that do not resolve to a uid/gid on the slurmctld host. +* slurmdbd - Fix a reservation update that has no matching record leaving the previous record open, which made accounting count the overlapping time twice. Usage rollups now also count already overlapping reservation records only once. +* slurmctld - Fix redundant job record update on job completion. +* slurmctld - Drain a node whose topology string no longer resolves, with the reason InvalidTopology, instead of failing to start. +* node_features/helpers - Stop rejecting valid job constraints that use a static feature whose name contains a changeable feature name. +* srun/salloc - Fix X11 forwarding not setting TCP_NODELAY on the connection to a local X server reached over TCP, a regression introduced in 26.11.0rc1. + ## Changes in 26.11.0rc2 * scrun - Fail with an error for SCRUN_GRES=help or list instead of exiting the anchor without logging anything.
diff --git a/doc/html/openapi_release_notes/slurm-26.11.html b/doc/html/openapi_release_notes/slurm-26.11.html index 3b72f38..60722f9 100644 --- a/doc/html/openapi_release_notes/slurm-26.11.html +++ b/doc/html/openapi_release_notes/slurm-26.11.html
@@ -4928,11 +4928,11 @@ </tr> <tr class="trchange"> <td class="tdfield">Replaced</td> - <td class="tdchange">.info.version = "Slurm-26.11.0-0rc2";</td> + <td class="tdchange">.info.version = "Slurm-26.11.0";</td> </tr> <tr class="trchange"> <td class="tdfield">Replaced</td> - <td class="tdchange">.info["x-slurm"].release = "26.11.0-0rc2";</td> + <td class="tdchange">.info["x-slurm"].release = "26.11.0";</td> </tr> <tr class="trchange"> <td class="tdfield">Added</td> @@ -6080,11 +6080,11 @@ </tr> <tr class="trchange"> <td class="tdfield">Replaced</td> - <td class="tdchange">.info.version = "Slurm-26.11.0-0rc2";</td> + <td class="tdchange">.info.version = "Slurm-26.11.0";</td> </tr> <tr class="trchange"> <td class="tdfield">Replaced</td> - <td class="tdchange">.info["x-slurm"].release = "26.11.0-0rc2";</td> + <td class="tdchange">.info["x-slurm"].release = "26.11.0";</td> </tr> </table> <h3>data_parser/v0.0.44</h3> @@ -6096,11 +6096,11 @@ </tr> <tr class="trchange"> <td class="tdfield">Replaced</td> - <td class="tdchange">.info.version = "Slurm-26.11.0-0rc2";</td> + <td class="tdchange">.info.version = "Slurm-26.11.0";</td> </tr> <tr class="trchange"> <td class="tdfield">Replaced</td> - <td class="tdchange">.info["x-slurm"].release = "26.11.0-0rc2";</td> + <td class="tdchange">.info["x-slurm"].release = "26.11.0";</td> </tr> </table> <h3>data_parser/v0.0.43</h3> @@ -6112,11 +6112,11 @@ </tr> <tr class="trchange"> <td class="tdfield">Replaced</td> - <td class="tdchange">.info.version = "Slurm-26.11.0-0rc2";</td> + <td class="tdchange">.info.version = "Slurm-26.11.0";</td> </tr> <tr class="trchange"> <td class="tdfield">Replaced</td> - <td class="tdchange">.info["x-slurm"].release = "26.11.0-0rc2";</td> + <td class="tdchange">.info["x-slurm"].release = "26.11.0";</td> </tr> </table>
diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index b9c6da7..3b36d70 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1
@@ -977,26 +977,25 @@ .IP .TP -\fB\-\-gpu\-freq\fR=[<\fItype\fR]=\fIvalue\fR>[,<\fItype\fR=\fIvalue\fR>][,verbose] -Request that GPUs allocated to the job are configured with specific frequency -values. -This option can be used to independently configure the GPU and its memory -frequencies. -A GPU plugin that supports frequency control applies the requested frequency +\fB\-\-gpu\-freq\fR=[<\fIfreq\fR>][,memory=<\fIfreq\fR>][,verbose] +Configure GPUs allocated to the job to run at specific frequencies. +A bare frequency sets the GPU core frequency; +a \fBmemory\fR= frequency sets the GPU memory frequency. +Adding \fBverbose\fR logs the applied GPU frequencies. +Frequencies not specified here are governed by \fBGpuFreqDef\fR in +\fBslurm.conf\fR(5). +The options may be given in any order. +Each \fIfreq\fR is one of the keywords defined below or a plain integer value +in megahertz (MHz). +If the specified numeric frequency lies between two available frequencies, it +is rounded up to the higher of the two. +A value outside the available range is limited to the closest end of that +range, either the highest or the lowest frequency. +In some cases, system power caps may override the requested values. +A GPU plugin that supports frequency control applies the requested frequencies when each regular step starts. After a regular step completes, the frequencies of all GPUs allocated to it are reset to their hardware defaults. -In some cases, system power caps may override the requested values. -The field \fItype\fR can be "memory". -If \fItype\fR is not specified, the GPU frequency is implied. -The \fIvalue\fR field can either be "low", "medium", "high", "highm1" or -a numeric value in megahertz (MHz). -If the specified numeric value lies between two available frequencies, it is -rounded up to the higher of the two. -A value outside the available range is limited to the closest end of that -range, either the highest or the lowest frequency. -See below for definition of the values. -The \fIverbose\fR option causes current GPU frequency information to be logged. Examples of use include "\-\-gpu\-freq=medium,memory=high" and "\-\-gpu\-freq=450". @@ -1014,7 +1013,7 @@ When two steps share a GPU, the later request overrides the earlier one, and the first step to end resets the GPU while the other is still running. -Supported \fIvalue\fR definitions: +Supported \fIfreq\fR keywords: .IP .RS .TP 10 @@ -2496,85 +2495,85 @@ .TP \fB\-\-tres\-bind\fR=<\fItres\fR>:[verbose,]<\fItype\fR>[+<\fItres\fR>: [verbose,]<\fItype\fR>...] -Specify a list of tres with their task binding options. Currently gres are the -only supported tres for this options. Specify gres as "gres/<gres_name>" -(e.g. gres/gpu) +Specify a list of TRES with their task binding options. Currently GRES are the +only supported TRES for this option. Specify GRES as "gres/<gres_name>" +(e.g. "gres/gpu") Example: \-\-tres\-bind=gres/gpu:verbose,map:0,1,2,3+gres/nic:closest -By default, most tres are not bound to individual tasks +By default, most TRES are not bound to individual tasks -Supported binding \fItype\fR options for \fBgres\fR: +Supported binding \fItype\fR options for GRES: .IP .RS .TP 10 \fBclosest\fR -Bind each task to the gres(s) which are closest. -In a NUMA environment, each task may be bound to more than one gres (i.e. -all gres in that NUMA environment). +Bind each task to the GRES which are closest. +In a NUMA environment, each task may be bound to more than one GRES (i.e. +all GRES in that NUMA environment). .IP .TP \fBmap:<list>\fR -Bind by mapping gres IDs to tasks (or ranks) as specified where <list> is -<gres_id_for_task_0>,<gres_id_for_task_1>,... gres IDs are interpreted as decimal +Bind by mapping GRES IDs to tasks (or ranks) as specified where <list> is +<gres_id_for_task_0>,<gres_id_for_task_1>,... GRES IDs are interpreted as decimal values. If the number of tasks (or ranks) exceeds the number of elements in this list, elements in the list will be reused as needed starting from the beginning -of the list. To simplify support for large task counts, the lists may follow a -map with an asterisk and repetition count. For example "map:0*4,1*4". +of the list. To simplify support for large task counts, list elements may be +followed by an asterisk and repetition count. For example "map:0*4,1*4". If the task/cgroup plugin is used and ConstrainDevices is set in cgroup.conf, -then the gres IDs are zero\-based indexes relative to the gress allocated to the -job (e.g. the first gres is 0, even if the global ID is 3). Otherwise, the gres -IDs are global IDs, and all gres on each node in the job should be allocated for +then the GRES IDs are zero\-based indexes relative to the GRES allocated to the +job (e.g. the first GRES is 0, even if the global ID is 3). Otherwise, the GRES +IDs are global IDs, and all GRES on each node in the job should be allocated for predictable binding results. .IP .TP \fBmask:<list>\fR -Bind by setting gres masks on tasks (or ranks) as specified where <list> is +Bind by setting GRES masks on tasks (or ranks) as specified where <list> is <gres_mask_for_task_0>,<gres_mask_for_task_1>,... The mapping is specified for a node and identical mapping is applied to the tasks on every node (i.e. the lowest task ID on each node is mapped to the first mask specified in the list, -etc.). gres masks are always interpreted as hexadecimal values but can be -preceded with an optional '0x'. To simplify support for large task counts, the -lists may follow a map with an asterisk and repetition count. +etc.). GRES masks are always interpreted as hexadecimal values but can be +preceded with an optional '0x'. To simplify support for large task counts, list +elements may be followed by an asterisk and repetition count. For example "mask:0x0f*4,0xf0*4". If the task/cgroup plugin is used and ConstrainDevices is set in cgroup.conf, -then the gres IDs are zero\-based indexes relative to the gres allocated to the -job (e.g. the first gres is 0, even if the global ID is 3). Otherwise, the gres -IDs are global IDs, and all gres on each node in the job should be allocated for +then the GRES IDs are zero\-based indexes relative to the GRES allocated to the +job (e.g. the first GRES is 0, even if the global ID is 3). Otherwise, the GRES +IDs are global IDs, and all GRES on each node in the job should be allocated for predictable binding results. .IP .TP \fBnone\fR -Do not bind tasks to this gres (turns off implicit binding from +Do not bind tasks to this GRES (turns off implicit binding from \-\-tres\-per\-task and \-\-gpus\-per\-task). .IP .TP \fBper_task:<gres_per_task>\fR -Each task will be bound to the number of gres specified in -\fI<gres_per_task>\fR. Tasks are preferentially assigned gres with affinity to +Each task will be bound to the number of GRES specified in +\fI<gres_per_task>\fR. Tasks are preferentially assigned GRES with affinity to cores in their allocation like in \fIclosest\fR, though they will -take any gres if they are unavailable. If no affinity exists, the first task -will be assigned the first x number of gres on the node etc. -Shared gres will prefer to bind one sharing device per task if possible. +take any GRES if they are unavailable. If no affinity exists, the first task +will be assigned the first x number of GRES on the node etc. +Shared GRES will prefer to bind one sharing device per task if possible. .IP .TP \fBsingle:<tasks_per_gres>\fR Like \fIclosest\fR, except that each task can only be bound to a -single gres, even when it can be bound to multiple gres that are equally close. -The gres to bind to is determined by \fI<tasks_per_gres>\fR, where the -first \fI<tasks_per_gres>\fR tasks are bound to the first gres available, the -second \fI<tasks_per_gres>\fR tasks are bound to the second gres available, etc. -This is basically a block distribution of tasks onto available gres, where the -available gres are determined by the socket affinity of the task and the socket -affinity of the gres as specified in gres.conf's \fICores\fR parameter. +single GRES, even when it can be bound to multiple GRES that are equally close. +The GRES to bind to is determined by \fI<tasks_per_gres>\fR, where the +first \fI<tasks_per_gres>\fR tasks are bound to the first GRES available, the +second \fI<tasks_per_gres>\fR tasks are bound to the second GRES available, etc. +This is basically a block distribution of tasks onto available GRES, where the +available GRES are determined by the socket affinity of the task and the socket +affinity of the GRES as specified in gres.conf's \fICores\fR parameter. .IP -\fBNOTE\fR: Shared gres binding is currently limited to per_task or none +\fBNOTE\fR: Shared GRES binding is currently limited to per_task or none .RE .IP
diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index 8eabcce..2a3bab5 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1
@@ -1155,26 +1155,25 @@ .IP .TP -\fB\-\-gpu\-freq\fR=[<\fItype\fR]=\fIvalue\fR>[,<\fItype\fR=\fIvalue\fR>][,verbose] -Request that GPUs allocated to the job are configured with specific frequency -values. -This option can be used to independently configure the GPU and its memory -frequencies. -A GPU plugin that supports frequency control applies the requested frequency +\fB\-\-gpu\-freq\fR=[<\fIfreq\fR>][,memory=<\fIfreq\fR>][,verbose] +Configure GPUs allocated to the job to run at specific frequencies. +A bare frequency sets the GPU core frequency; +a \fBmemory\fR= frequency sets the GPU memory frequency. +Adding \fBverbose\fR logs the applied GPU frequencies. +Frequencies not specified here are governed by \fBGpuFreqDef\fR in +\fBslurm.conf\fR(5). +The options may be given in any order. +Each \fIfreq\fR is one of the keywords defined below or a plain integer value +in megahertz (MHz). +If the specified numeric frequency lies between two available frequencies, it +is rounded up to the higher of the two. +A value outside the available range is limited to the closest end of that +range, either the highest or the lowest frequency. +In some cases, system power caps may override the requested values. +A GPU plugin that supports frequency control applies the requested frequencies when each regular step starts. After a regular step completes, the frequencies of all GPUs allocated to it are reset to their hardware defaults. -In some cases, system power caps may override the requested values. -The field \fItype\fR can be "memory". -If \fItype\fR is not specified, the GPU frequency is implied. -The \fIvalue\fR field can either be "low", "medium", "high", "highm1" or -a numeric value in megahertz (MHz). -If the specified numeric value lies between two available frequencies, it is -rounded up to the higher of the two. -A value outside the available range is limited to the closest end of that -range, either the highest or the lowest frequency. -See below for definition of the values. -The \fIverbose\fR option causes current GPU frequency information to be logged. Examples of use include "\-\-gpu\-freq=medium,memory=high" and "\-\-gpu\-freq=450". @@ -1192,7 +1191,7 @@ When two steps share a GPU, the later request overrides the earlier one, and the first step to end resets the GPU while the other is still running. -Supported \fIvalue\fR definitions: +Supported \fIfreq\fR keywords: .IP .RS .TP 10 @@ -2799,85 +2798,85 @@ .TP \fB\-\-tres\-bind\fR=<\fItres\fR>:[verbose,]<\fItype\fR>[+<\fItres\fR>: [verbose,]<\fItype\fR>...] -Specify a list of tres with their task binding options. Currently gres are the -only supported tres for this options. Specify gres as "gres/<gres_name>" -(e.g. gres/gpu) +Specify a list of TRES with their task binding options. Currently GRES are the +only supported TRES for this option. Specify GRES as "gres/<gres_name>" +(e.g. "gres/gpu") Example: \-\-tres\-bind=gres/gpu:verbose,map:0,1,2,3+gres/nic:closest -By default, most tres are not bound to individual tasks +By default, most TRES are not bound to individual tasks -Supported binding \fItype\fR options for \fBgres\fR: +Supported binding \fItype\fR options for GRES: .IP .RS .TP 10 \fBclosest\fR -Bind each task to the gres(s) which are closest. -In a NUMA environment, each task may be bound to more than one gres (i.e. -all gres in that NUMA environment). +Bind each task to the GRES which are closest. +In a NUMA environment, each task may be bound to more than one GRES (i.e. +all GRES in that NUMA environment). .IP .TP \fBmap:<list>\fR -Bind by mapping gres IDs to tasks (or ranks) as specified where <list> is -<gres_id_for_task_0>,<gres_id_for_task_1>,... gres IDs are interpreted as decimal +Bind by mapping GRES IDs to tasks (or ranks) as specified where <list> is +<gres_id_for_task_0>,<gres_id_for_task_1>,... GRES IDs are interpreted as decimal values. If the number of tasks (or ranks) exceeds the number of elements in this list, elements in the list will be reused as needed starting from the beginning -of the list. To simplify support for large task counts, the lists may follow a -map with an asterisk and repetition count. For example "map:0*4,1*4". +of the list. To simplify support for large task counts, list elements may be +followed by an asterisk and repetition count. For example "map:0*4,1*4". If the task/cgroup plugin is used and ConstrainDevices is set in cgroup.conf, -then the gres IDs are zero\-based indexes relative to the gress allocated to the -job (e.g. the first gres is 0, even if the global ID is 3). Otherwise, the gres -IDs are global IDs, and all gres on each node in the job should be allocated for +then the GRES IDs are zero\-based indexes relative to the GRES allocated to the +job (e.g. the first GRES is 0, even if the global ID is 3). Otherwise, the GRES +IDs are global IDs, and all GRES on each node in the job should be allocated for predictable binding results. .IP .TP \fBmask:<list>\fR -Bind by setting gres masks on tasks (or ranks) as specified where <list> is +Bind by setting GRES masks on tasks (or ranks) as specified where <list> is <gres_mask_for_task_0>,<gres_mask_for_task_1>,... The mapping is specified for a node and identical mapping is applied to the tasks on every node (i.e. the lowest task ID on each node is mapped to the first mask specified in the list, -etc.). gres masks are always interpreted as hexadecimal values but can be -preceded with an optional '0x'. To simplify support for large task counts, the -lists may follow a map with an asterisk and repetition count. +etc.). GRES masks are always interpreted as hexadecimal values but can be +preceded with an optional '0x'. To simplify support for large task counts, list +elements may be followed by an asterisk and repetition count. For example "mask:0x0f*4,0xf0*4". If the task/cgroup plugin is used and ConstrainDevices is set in cgroup.conf, -then the gres IDs are zero\-based indexes relative to the gres allocated to the -job (e.g. the first gres is 0, even if the global ID is 3). Otherwise, the gres -IDs are global IDs, and all gres on each node in the job should be allocated for +then the GRES IDs are zero\-based indexes relative to the GRES allocated to the +job (e.g. the first GRES is 0, even if the global ID is 3). Otherwise, the GRES +IDs are global IDs, and all GRES on each node in the job should be allocated for predictable binding results. .IP .TP \fBnone\fR -Do not bind tasks to this gres (turns off implicit binding from +Do not bind tasks to this GRES (turns off implicit binding from \-\-tres\-per\-task and \-\-gpus\-per\-task). .IP .TP \fBper_task:<gres_per_task>\fR -Each task will be bound to the number of gres specified in -\fI<gres_per_task>\fR. Tasks are preferentially assigned gres with affinity to +Each task will be bound to the number of GRES specified in +\fI<gres_per_task>\fR. Tasks are preferentially assigned GRES with affinity to cores in their allocation like in \fIclosest\fR, though they will -take any gres if they are unavailable. If no affinity exists, the first task -will be assigned the first x number of gres on the node etc. -Shared gres will prefer to bind one sharing device per task if possible. +take any GRES if they are unavailable. If no affinity exists, the first task +will be assigned the first x number of GRES on the node etc. +Shared GRES will prefer to bind one sharing device per task if possible. .IP .TP \fBsingle:<tasks_per_gres>\fR Like \fIclosest\fR, except that each task can only be bound to a -single gres, even when it can be bound to multiple gres that are equally close. -The gres to bind to is determined by \fI<tasks_per_gres>\fR, where the -first \fI<tasks_per_gres>\fR tasks are bound to the first gres available, the -second \fI<tasks_per_gres>\fR tasks are bound to the second gres available, etc. -This is basically a block distribution of tasks onto available gres, where the -available gres are determined by the socket affinity of the task and the socket -affinity of the gres as specified in gres.conf's \fICores\fR parameter. +single GRES, even when it can be bound to multiple GRES that are equally close. +The GRES to bind to is determined by \fI<tasks_per_gres>\fR, where the +first \fI<tasks_per_gres>\fR tasks are bound to the first GRES available, the +second \fI<tasks_per_gres>\fR tasks are bound to the second GRES available, etc. +This is basically a block distribution of tasks onto available GRES, where the +available GRES are determined by the socket affinity of the task and the socket +affinity of the GRES as specified in gres.conf's \fICores\fR parameter. .IP -\fBNOTE\fR: Shared gres binding is currently limited to per_task or none +\fBNOTE\fR: Shared GRES binding is currently limited to per_task or none .RE .IP
diff --git a/doc/man/man1/scontrol.1 b/doc/man/man1/scontrol.1 index 9456e8a..a7e25e8 100644 --- a/doc/man/man1/scontrol.1 +++ b/doc/man/man1/scontrol.1
@@ -1777,6 +1777,28 @@ .IP .TP +\fBTresPerJob\fR=<\fItres\-list\fR> +Set the job's requested TRES per job. +Currently GRES are the only supported TRES for this option. +Value may be cleared with blank data value, "TresPerJob=". +Specify as a comma-delimited list of "gres/<name>[:<type>]=<count>" entries +(e.g. "gres/gpu:a100=2"). +For GPUs this is equivalent to the \fB\-\-gpus\fR option of \fBsalloc\fR(1), +\fBsbatch\fR(1), and \fBsrun\fR(1). +This option can only be changed for pending jobs. +.IP + +.TP +\fBTresPerTask\fR=<\fItres\-list\fR> +Set the job's requested TRES per task. +Currently GRES and licenses are the only supported TRES for this option. +Value may be cleared with blank data value, "TresPerTask=". +See \fB\-\-tres\-per\-task\fR in the \fBsalloc\fR(1), \fBsbatch\fR(1), and +\fBsrun\fR(1) man pages for valid TRES list syntax. +This option can only be changed for pending jobs. +.IP + +.TP \fBUserID\fR=<\fIUID\fR or \fIname\fR> Used with the \fIJobName\fP option to identify jobs to be modified. Either a user name or numeric ID (UID), may be specified.
diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 23d83b4..14e725a 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1
@@ -1475,26 +1475,25 @@ .IP .TP -\fB\-\-gpu\-freq\fR=[<\fItype\fR]=\fIvalue\fR>[,<\fItype\fR=\fIvalue\fR>][,verbose] -Request that GPUs allocated to the job are configured with specific frequency -values. -This option can be used to independently configure the GPU and its memory -frequencies. -A GPU plugin that supports frequency control applies the requested frequency +\fB\-\-gpu\-freq\fR=[<\fIfreq\fR>][,memory=<\fIfreq\fR>][,verbose] +Configure GPUs allocated to the job to run at specific frequencies. +A bare frequency sets the GPU core frequency; +a \fBmemory\fR= frequency sets the GPU memory frequency. +Adding \fBverbose\fR logs the applied GPU frequencies. +Frequencies not specified here are governed by \fBGpuFreqDef\fR in +\fBslurm.conf\fR(5). +The options may be given in any order. +Each \fIfreq\fR is one of the keywords defined below or a plain integer value +in megahertz (MHz). +If the specified numeric frequency lies between two available frequencies, it +is rounded up to the higher of the two. +A value outside the available range is limited to the closest end of that +range, either the highest or the lowest frequency. +In some cases, system power caps may override the requested values. +A GPU plugin that supports frequency control applies the requested frequencies when each regular step starts. After a regular step completes, the frequencies of all GPUs allocated to it are reset to their hardware defaults. -In some cases, system power caps may override the requested values. -The field \fItype\fR can be "memory". -If \fItype\fR is not specified, the GPU frequency is implied. -The \fIvalue\fR field can either be "low", "medium", "high", "highm1" or -a numeric value in megahertz (MHz). -If the specified numeric value lies between two available frequencies, it is -rounded up to the higher of the two. -A value outside the available range is limited to the closest end of that -range, either the highest or the lowest frequency. -See below for definition of the values. -The \fIverbose\fR option causes current GPU frequency information to be logged. Examples of use include "\-\-gpu\-freq=medium,memory=high" and "\-\-gpu\-freq=450". @@ -1512,7 +1511,7 @@ When two steps share a GPU, the later request overrides the earlier one, and the first step to end resets the GPU while the other is still running. -Supported \fIvalue\fR definitions: +Supported \fIfreq\fR keywords: .IP .RS .TP 10 @@ -3598,85 +3597,85 @@ .TP \fB\-\-tres\-bind\fR=<\fItres\fR>:[verbose,]<\fItype\fR>[+<\fItres\fR>: [verbose,]<\fItype\fR>...] -Specify a list of tres with their task binding options. Currently gres are the -only supported tres for this options. Specify gres as "gres/<gres_name>" -(e.g. gres/gpu) +Specify a list of TRES with their task binding options. Currently GRES are the +only supported TRES for this option. Specify GRES as "gres/<gres_name>" +(e.g. "gres/gpu") Example: \-\-tres\-bind=gres/gpu:verbose,map:0,1,2,3+gres/nic:closest -By default, most tres are not bound to individual tasks +By default, most TRES are not bound to individual tasks -Supported binding \fItype\fR options for \fBgres\fR: +Supported binding \fItype\fR options for GRES: .IP .RS .TP 10 \fBclosest\fR -Bind each task to the gres(s) which are closest. -In a NUMA environment, each task may be bound to more than one gres (i.e. -all gres in that NUMA environment). +Bind each task to the GRES which are closest. +In a NUMA environment, each task may be bound to more than one GRES (i.e. +all GRES in that NUMA environment). .IP .TP \fBmap:<list>\fR -Bind by mapping gres IDs to tasks (or ranks) as specified where <list> is -<gres_id_for_task_0>,<gres_id_for_task_1>,... gres IDs are interpreted as decimal +Bind by mapping GRES IDs to tasks (or ranks) as specified where <list> is +<gres_id_for_task_0>,<gres_id_for_task_1>,... GRES IDs are interpreted as decimal values. If the number of tasks (or ranks) exceeds the number of elements in this list, elements in the list will be reused as needed starting from the beginning -of the list. To simplify support for large task counts, the lists may follow a -map with an asterisk and repetition count. For example "map:0*4,1*4". +of the list. To simplify support for large task counts, list elements may be +followed by an asterisk and repetition count. For example "map:0*4,1*4". If the task/cgroup plugin is used and ConstrainDevices is set in cgroup.conf, -then the gres IDs are zero\-based indexes relative to the gress allocated to the -job (e.g. the first gres is 0, even if the global ID is 3). Otherwise, the gres -IDs are global IDs, and all gres on each node in the job should be allocated for +then the GRES IDs are zero\-based indexes relative to the GRES allocated to the +job (e.g. the first GRES is 0, even if the global ID is 3). Otherwise, the GRES +IDs are global IDs, and all GRES on each node in the job should be allocated for predictable binding results. .IP .TP \fBmask:<list>\fR -Bind by setting gres masks on tasks (or ranks) as specified where <list> is +Bind by setting GRES masks on tasks (or ranks) as specified where <list> is <gres_mask_for_task_0>,<gres_mask_for_task_1>,... The mapping is specified for a node and identical mapping is applied to the tasks on every node (i.e. the lowest task ID on each node is mapped to the first mask specified in the list, -etc.). gres masks are always interpreted as hexadecimal values but can be -preceded with an optional '0x'. To simplify support for large task counts, the -lists may follow a map with an asterisk and repetition count. +etc.). GRES masks are always interpreted as hexadecimal values but can be +preceded with an optional '0x'. To simplify support for large task counts, list +elements may be followed by an asterisk and repetition count. For example "mask:0x0f*4,0xf0*4". If the task/cgroup plugin is used and ConstrainDevices is set in cgroup.conf, -then the gres IDs are zero\-based indexes relative to the gres allocated to the -job (e.g. the first gres is 0, even if the global ID is 3). Otherwise, the gres -IDs are global IDs, and all gres on each node in the job should be allocated for +then the GRES IDs are zero\-based indexes relative to the GRES allocated to the +job (e.g. the first GRES is 0, even if the global ID is 3). Otherwise, the GRES +IDs are global IDs, and all GRES on each node in the job should be allocated for predictable binding results. .IP .TP \fBnone\fR -Do not bind tasks to this gres (turns off implicit binding from +Do not bind tasks to this GRES (turns off implicit binding from \-\-tres\-per\-task and \-\-gpus\-per\-task). .IP .TP \fBper_task:<gres_per_task>\fR -Each task will be bound to the number of gres specified in -\fI<gres_per_task>\fR. Tasks are preferentially assigned gres with affinity to +Each task will be bound to the number of GRES specified in +\fI<gres_per_task>\fR. Tasks are preferentially assigned GRES with affinity to cores in their allocation like in \fIclosest\fR, though they will -take any gres if they are unavailable. If no affinity exists, the first task -will be assigned the first x number of gres on the node etc. -Shared gres will prefer to bind one sharing device per task if possible. +take any GRES if they are unavailable. If no affinity exists, the first task +will be assigned the first x number of GRES on the node etc. +Shared GRES will prefer to bind one sharing device per task if possible. .IP .TP \fBsingle:<tasks_per_gres>\fR Like \fIclosest\fR, except that each task can only be bound to a -single gres, even when it can be bound to multiple gres that are equally close. -The gres to bind to is determined by \fI<tasks_per_gres>\fR, where the -first \fI<tasks_per_gres>\fR tasks are bound to the first gres available, the -second \fI<tasks_per_gres>\fR tasks are bound to the second gres available, etc. -This is basically a block distribution of tasks onto available gres, where the -available gres are determined by the socket affinity of the task and the socket -affinity of the gres as specified in gres.conf's \fICores\fR parameter. +single GRES, even when it can be bound to multiple GRES that are equally close. +The GRES to bind to is determined by \fI<tasks_per_gres>\fR, where the +first \fI<tasks_per_gres>\fR tasks are bound to the first GRES available, the +second \fI<tasks_per_gres>\fR tasks are bound to the second GRES available, etc. +This is basically a block distribution of tasks onto available GRES, where the +available GRES are determined by the socket affinity of the task and the socket +affinity of the GRES as specified in gres.conf's \fICores\fR parameter. .IP -\fBNOTE\fR: Shared gres binding is currently limited to per_task or none +\fBNOTE\fR: Shared GRES binding is currently limited to per_task or none .RE .IP
diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index 30b7782..16d6faa 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5
@@ -1785,27 +1785,26 @@ .IP .TP -\fBGpuFreqDef\fR=[<\fItype\fR]=\fIvalue\fR>[,<\fItype\fR=\fIvalue\fR>] -Default GPU frequency to use when running a job step if it -has not been explicitly set using the \-\-gpu\-freq option. -This option can be used to independently configure the GPU and its memory -frequencies. +\fBGpuFreqDef\fR=[<\fIfreq\fR>][,memory=<\fIfreq\fR>][,verbose] +Default GPU frequencies to use when running a job step if they +have not been explicitly set using the \-\-gpu\-freq option. +A bare frequency sets the GPU core frequency; +a \fBmemory\fR= frequency sets the GPU memory frequency. +Adding \fBverbose\fR logs the applied GPU frequencies for all job steps. +The options may be given in any order. There is no default value. If unset, no attempt to change the GPU frequency is made if the \-\-gpu\-freq option has not been set. -A GPU plugin that supports frequency control applies the requested frequency +Each \fIfreq\fR is one of the keywords defined below or a plain integer value +in megahertz (MHz). +If the specified numeric frequency lies between two available frequencies, it +is rounded up to the higher of the two. +A value outside the available range is limited to the closest end of that +range, either the highest or the lowest frequency. +In some cases, system power caps may override the requested values. +A GPU plugin that supports frequency control applies the requested frequencies when each regular step starts. After a regular step completes, the frequencies of all GPUs allocated to it are reset to their hardware defaults. -In some cases, system power caps may override the requested values. -The field \fItype\fR can be "memory". -If \fItype\fR is not specified, the GPU frequency is implied. -The \fIvalue\fR field can either be "low", "medium", "high", "highm1" or -a numeric value in megahertz (MHz). -If the specified numeric value lies between two available frequencies, it is -rounded up to the higher of the two. -A value outside the available range is limited to the closest end of that -range, either the highest or the lowest frequency. -See below for definition of the values. Examples of use include "GpuFreqDef=medium,memory=high" and "GpuFreqDef=450". \fBNOTE\fR: Batch, interactive, and extern steps skip GPU frequency setup, so @@ -1822,7 +1821,7 @@ When two steps share a GPU, the later request overrides the earlier one, and the first step to end resets the GPU while the other is still running. -Supported \fIvalue\fR definitions: +Supported \fIfreq\fR keywords: .IP .RS .TP 10
diff --git a/doc/man/man8/spank.8 b/doc/man/man8/spank.8 index 4bf33fb..c78e496 100644 --- a/doc/man/man8/spank.8 +++ b/doc/man/man8/spank.8
@@ -69,7 +69,9 @@ .LP In local context, only the \fBinit\fR, \fBexit\fR, \fBinit_post_opt\fR, and \fBlocal_user_init\fR functions are called. In allocator context, only the -\fBinit\fR, \fBexit\fR, and \fBinit_post_opt\fR functions are called. +\fBinit\fR, \fBexit\fR, and \fBinit_post_opt\fR functions are called, except +in \fBscrontab\fR, which loads plugins in allocator context but calls only +\fBinit\fR and \fBexit\fR. Similarly, in slurmd context, only the \fBinit\fR and \fBslurmd_exit\fR callbacks are active, and in the job_script context, only the \fBjob_prolog\fR and \fBjob_epilog\fR callbacks are used. @@ -192,14 +194,22 @@ .TP \fBslurm_spank_init_failure_mode\fR -When a slurm_spank_init call fails, change how that failure is handled by Slurm. +When \fBslurm_spank_init\fR fails, this variable selects how Slurm handles +that failure. It applies only to \fBslurm_spank_init\fR. Recognized values are: .IP .RS .TP \fBESPANK_NODE_FAILURE\fR -Slurm considers the node to be at fault and marks it as drained. The job may be -requeued. This is the default. +When \fBslurm_spank_init\fR fails in the batch step (the step that runs +the batch script), Slurm considers the node to be at fault and drains it. +This is the default. If the job may be requeued (see \fBJobRequeue\fR in +\fBslurm.conf\fR(5) and \fB\-\-requeue\fR in \fBsbatch\fR(1)), the job is +also requeued; otherwise it is marked as failed. No other step drains the node. +When \fBPrologFlags=Contain\fR is set (see \fBslurm.conf\fR(5)), a failure in +the extern step requeues a batch job and cancels a non\-batch job. A failure +in any other step, including an \fBsrun\fR step inside a batch job, only +fails that step. .IP .TP @@ -485,9 +495,11 @@ optional /usr/lib/slurm/test.so .fi Tells \fBslurmd\fR to load the plugin \fBtest.so\fR passing no arguments. -If a \fBSPANK\fR plugin is \fIrequired\fR, then failure of any of the -plugin's functions will cause \fBslurmd\fR, or the job allocator command to -terminate the job, while \fIoptional\fR plugins only cause a warning. +If a \fBSPANK\fR plugin is \fIrequired\fR, a non\-zero return from one of +its functions is an error. See the \fBErrors\fR section for the effect on +the client, the node, and the job. A failure of \fBslurm_spank_exit\fR +does not fail the job. Failures in \fIoptional\fR plugins only cause a +warning. .LP If a fully\-qualified path is not specified for a plugin, then the currently configured \fIPluginDir\fR in \fBslurm.conf\fR(5) is searched. @@ -515,7 +527,11 @@ launching job. .SH "Errors" -When SPANK plugin results in a non-zero result, the following changes will result: +When a SPANK function returns a non\-zero result, the following changes +result. Where \fBslurm_spank_init\fR fails, the rows assume the default +\fBslurm_spank_init_failure_mode\fR of \fBESPANK_NODE_FAILURE\fR. The +\fBsbatch\fR remote rows assume a job that may be requeued; see the +paragraphs after the table. .TS expand, allbox, tab (@); @@ -527,37 +543,76 @@ srun @slurm_spank_init_post_opt @local @1 @no @yes srun @slurm_spank_local_user_init @local @1 @no @yes srun @slurm_spank_init @remote @1 @no @no -srun @slurm_spank_user_init @remote @0 @no @no +srun @slurm_spank_user_init @remote @1 @no @yes srun @slurm_spank_task_init_privileged @remote @1 @no @yes -srun @slurm_spank_task_post_fork @remote @0 @no @no +srun @slurm_spank_task_post_fork @remote @1 @no @yes srun @slurm_spank_task_init @remote @1 @no @yes srun @slurm_spank_task_exit @remote @0 @no @no -srun @slurm_spank_exit @local @0 @no @yes +srun @slurm_spank_exit @local @0 @no @no _ salloc @slurm_spank_init @allocator @1 @no @yes salloc @slurm_spank_init_post_opt @allocator @1 @no @yes -salloc @slurm_spank_init @remote @1 @no @no +salloc @slurm_spank_init @local @1 @no @yes +salloc @slurm_spank_init_post_opt @local @1 @no @yes +salloc @slurm_spank_local_user_init @local @1 @no @yes +salloc @slurm_spank_init @remote @1 @no @yes salloc @slurm_spank_user_init @remote @1 @no @yes salloc @slurm_spank_task_init_privileged @remote @1 @no @yes salloc @slurm_spank_task_post_fork @remote @1 @no @yes salloc @slurm_spank_task_init @remote @1 @no @yes salloc @slurm_spank_task_exit @remote @0 @no @no -salloc @slurm_spank_exit @allocator @0 @no @yes +salloc @slurm_spank_exit @local @0 @no @no +salloc @slurm_spank_exit @allocator @0 @no @no _ sbatch @slurm_spank_init @allocator @1 @no @yes sbatch @slurm_spank_init_post_opt @allocator @1 @no @yes -sbatch @slurm_spank_init @remote @1 @yes @no -sbatch @slurm_spank_user_init @remote @1 @yes @yes +sbatch @slurm_spank_init @local @1 @no @yes +sbatch @slurm_spank_init_post_opt @local @1 @no @yes +sbatch @slurm_spank_local_user_init @local @1 @no @yes +sbatch @slurm_spank_init @remote @n/a @yes @no +sbatch @slurm_spank_user_init @remote @n/a @yes @no sbatch @slurm_spank_task_init_privileged @remote @1 @no @yes -sbatch @slurm_spank_task_post_fork @remote @1 @yes @yes +sbatch @slurm_spank_task_post_fork @remote @n/a @yes @no sbatch @slurm_spank_task_init @remote @1 @no @yes sbatch @slurm_spank_task_exit @remote @0 @no @no +sbatch @slurm_spank_exit @local @0 @no @no sbatch @slurm_spank_exit @allocator @0 @no @no _ scrontab @slurm_spank_init @allocator @1 @no @no scrontab @slurm_spank_exit @allocator @0 @no @no .TE +\fBExitcode\fR is the exit status of the client command, or \fBn/a\fR if the +client command does not return a status for that failure. \fBsbatch\fR exits 0 +once the job script is accepted. Hooks that run after submission do not +change that status. With \fB\-\-wait\fR, \fBsbatch\fR instead returns the +exit code of the job, and only after the job terminates. +.LP +The \fBslurm_spank_init\fR, \fBslurm_spank_user_init\fR, and +\fBslurm_spank_task_post_fork\fR rows for \fBsbatch\fR remote context all +drain the node on failure, and, if the job may be requeued (see +\fBJobRequeue\fR in \fBslurm.conf\fR(5) and \fB\-\-requeue\fR in +\fBsbatch\fR(1)), requeue it instead of failing it. These three rows show that +default result: Exitcode n/a, because \fBsbatch \-\-wait\fR does not return +until the requeued job terminates, and Fails job no. If the job may not be +requeued, for example with \fB\-\-no\-requeue\fR, the job fails instead, and +\fBsbatch \-\-wait\fR returns Exitcode 1. Only \fBslurm_spank_init\fR consults +\fBslurm_spank_init_failure_mode\fR above; the other two rows drain and +requeue regardless of that variable. +.LP +For \fBlocal\fR rows under \fBsalloc\fR and \fBsbatch\fR, the hook runs in +an \fBsrun\fR command inside the allocation, so the Exitcode and Fails job +cells assume that \fBsrun\fR's exit status reaches the client and the job. +\fBsalloc\fR returns that status directly. \fBsbatch\fR returns it only +with \fB\-\-wait\fR, and otherwise still exits 0. The job fails only if the +enclosing command or batch script propagates \fBsrun\fR's exit status; a +batch script that discards it completes normally. +.LP +A failure of \fBslurm_spank_init\fR in remote context only fails the step. +Under \fBsrun\fR the job is not failed. Under \fBsalloc\fR the job fails only +if the command that \fBsalloc\fR runs exits non\-zero, as it does when that +command is an \fBsrun\fR whose step failed. +.LP \fBNOTE\fR: The behavior for \fBProctrackType=proctrack/pgid\fR may result in timeouts for \fBslurm_spank_task_post_fork\fR with \fBremote\fR context on failure.
diff --git a/slurm/slurm.h b/slurm/slurm.h index c6a08b8..2c68f71 100644 --- a/slurm/slurm.h +++ b/slurm/slurm.h
@@ -1780,7 +1780,7 @@ uint32_t cpu_freq_min; /* Minimum cpu frequency */ uint32_t cpu_freq_max; /* Maximum cpu frequency */ uint32_t cpu_freq_gov; /* cpu frequency governor */ - char *cpus_per_tres; /* semicolon delimited list of TRES=# values */ + char *cpus_per_tres; /* comma delimited TRES, e.g. "gres/gpu=4" */ void *crontab_entry; /* really cron_entry_t */ time_t deadline; /* deadline */ uint32_t delay_boot; /* delay boot for desired node state */ @@ -1818,7 +1818,7 @@ char *mcs_label; /* mcs_label if mcs plugin in use */ char *mem_bind; /* binding map for map/mask_cpu */ uint16_t mem_bind_type; /* see mem_bind_type_t */ - char *mem_per_tres; /* semicolon delimited list of TRES=# values */ + char *mem_per_tres; /* comma delimited TRES, e.g. "gres/gpu=1024" */ char *name; /* name of the job, default "" */ char *network; /* network use spec */ uint32_t nice; /* requested priority change, @@ -1878,10 +1878,10 @@ * time_limit */ char *tres_bind; /* Task to TRES binding directives */ char *tres_freq; /* TRES frequency directives */ - char *tres_per_job; /* semicolon delimited list of TRES=# values */ - char *tres_per_node; /* semicolon delimited list of TRES=# values */ - char *tres_per_socket; /* semicolon delimited list of TRES=# values */ - char *tres_per_task; /* semicolon delimited list of TRES=# values */ + char *tres_per_job; /* comma delimited TRES, e.g. "gres/gpu=2" */ + char *tres_per_node; /* comma delimited TRES, e.g. "gres/gpu=2" */ + char *tres_per_socket; /* comma delimited TRES, e.g. "gres/gpu=2" */ + char *tres_per_task; /* comma delimited TRES, e.g. "gres/gpu=1" */ uint16_t wait_all_nodes;/* 0 to start job immediately after allocation * 1 to start job after all nodes booted * or NO_VAL to use system default */ @@ -1999,7 +1999,7 @@ uint32_t cpu_freq_min; /* Minimum cpu frequency */ uint32_t cpu_freq_max; /* Maximum cpu frequency */ uint32_t cpu_freq_gov; /* cpu frequency governor */ - char *cpus_per_tres; /* semicolon delimited list of TRES=# values */ + char *cpus_per_tres; /* comma delimited TRES, e.g. "gres/gpu=4" */ char *cronspec; /* cron time specification (scrontab jobs) */ time_t deadline; /* deadline */ uint32_t delay_boot; /* delay boot for desired node state */ @@ -2043,7 +2043,7 @@ uint32_t max_nodes; /* maximum number of nodes usable by job */ uint32_t max_npids; /* maximum number of PIDs per step on each node */ char *mcs_label; /* mcs_label if mcs plugin in use */ - char *mem_per_tres; /* semicolon delimited list of TRES=# values */ + char *mem_per_tres; /* comma delimited TRES, e.g. "gres/gpu=1024" */ uint16_t mem_update_delay; /* auto-reduce delay in minutes */ uint16_t mem_update_margin; /* auto-reduce margin percent */ char *name; /* name of the job */ @@ -2128,10 +2128,10 @@ uint16_t threads_per_core; /* threads per core required by job */ char *tres_bind; /* Task to TRES binding directives */ char *tres_freq; /* TRES frequency directives */ - char *tres_per_job; /* semicolon delimited list of TRES=# values */ - char *tres_per_node; /* semicolon delimited list of TRES=# values */ - char *tres_per_socket; /* semicolon delimited list of TRES=# values */ - char *tres_per_task; /* semicolon delimited list of TRES=# values */ + char *tres_per_job; /* comma delimited TRES, e.g. "gres/gpu=2" */ + char *tres_per_node; /* comma delimited TRES, e.g. "gres/gpu=2" */ + char *tres_per_socket; /* comma delimited TRES, e.g. "gres/gpu=2" */ + char *tres_per_task; /* comma delimited TRES, e.g. "gres/gpu=1" */ char *tres_req_str; /* tres requested in the job */ char *tres_alloc_str; /* tres used in the job */ uint32_t user_id; /* user the job runs as */ @@ -2458,10 +2458,10 @@ uint32_t cpu_freq_min; /* Minimum cpu frequency */ uint32_t cpu_freq_max; /* Maximum cpu frequency */ uint32_t cpu_freq_gov; /* cpu frequency governor */ - char *cpus_per_tres; /* comma delimited list of TRES=# values */ + char *cpus_per_tres; /* comma delimited TRES, e.g. "gres/gpu=4" */ char *cwd; /* current working dir */ uint32_t max_npids; /* maximum number of PIDs per step on each node */ - char *mem_per_tres; /* comma delimited list of TRES=# values */ + char *mem_per_tres; /* comma delimited TRES, e.g. "gres/gpu=1024" */ char *name; /* name of job step */ char *job_name; /* name of the job */ char *network; /* network specs for job step */ @@ -2495,10 +2495,10 @@ char *tres_bind; /* Task to TRES binding directives */ char *tres_fmt_alloc_str; /* formatted tres string for step */ char *tres_freq; /* TRES frequency directives */ - char *tres_per_step; /* comma delimited list of TRES=# values */ - char *tres_per_node; /* comma delimited list of TRES=# values */ - char *tres_per_socket; /* comma delimited list of TRES=# values */ - char *tres_per_task; /* comma delimited list of TRES=# values */ + char *tres_per_step; /* comma delimited TRES, e.g. "gres/gpu=2" */ + char *tres_per_node; /* comma delimited TRES, e.g. "gres/gpu=2" */ + char *tres_per_socket; /* comma delimited TRES, e.g. "gres/gpu=2" */ + char *tres_per_task; /* comma delimited TRES, e.g. "gres/gpu=1" */ uint32_t user_id; /* user the job runs as */ } job_step_info_t; @@ -2823,8 +2823,8 @@ slurm_step_id_t step_id; char *stepmgr_host; /* host running the stepmgr for this allocation, * or NULL if stepmgr is not enabled */ - char *tres_per_node; /* comma delimited list of TRES=# values */ - char *tres_per_task; /* comma delimited list of TRES=# values */ + char *tres_per_node; /* comma delimited TRES, e.g. "gres/gpu=2" */ + char *tres_per_task; /* comma delimited TRES, e.g. "gres/gpu=1" */ uid_t uid; /* resolved user id of job */ char *user_name; /* resolved user name of job */ void *working_cluster_rec; /* Cluster to direct remaining messages to.
diff --git a/src/common/job_record.h b/src/common/job_record.h index 124a8b5..4930ce1 100644 --- a/src/common/job_record.h +++ b/src/common/job_record.h
@@ -363,7 +363,7 @@ uint32_t cpu_cnt; /* current count of CPUs held * by the job, decremented while job is * completing */ - char *cpus_per_tres; /* semicolon delimited list of TRES=# values */ + char *cpus_per_tres; /* TRES list, see slurm_get_next_tres() */ /* * Last job start sent to accounting had an INFINITE eligible time * (WAIT_ARRAY_TASK_LIMIT). Not saved in state. @@ -460,7 +460,7 @@ * limit was set from admin */ uint16_t mail_type; /* see MAIL_JOB_* in slurm.h */ char *mail_user; /* user to get e-mail notification */ - char *mem_per_tres; /* semicolon delimited list of TRES=# values */ + char *mem_per_tres; /* TRES list, see slurm_get_next_tres() */ char *mcs_label; /* mcs_label if mcs plugin in use */ char *name; /* name of the job */ char *network; /* network/switch requirement spec */ @@ -612,10 +612,10 @@ * for accounting */ char *tres_bind; /* Task to TRES binding directives */ char *tres_freq; /* TRES frequency directives */ - char *tres_per_job; /* comma delimited list of TRES values */ - char *tres_per_node; /* comma delimited list of TRES values */ - char *tres_per_socket; /* comma delimited list of TRES values */ - char *tres_per_task; /* comma delimited list of TRES values */ + char *tres_per_job; /* TRES list, see slurm_get_next_tres() */ + char *tres_per_node; /* TRES list, see slurm_get_next_tres() */ + char *tres_per_socket; /* TRES list, see slurm_get_next_tres() */ + char *tres_per_task; /* TRES list, see slurm_get_next_tres() */ uint64_t *tres_req_cnt; /* array of tres counts requested * based off g_tres_count in * assoc_mgr */ @@ -719,7 +719,7 @@ uint32_t cpu_freq_gov; /* cpu frequency governor */ uint16_t cpus_per_task; /* cpus per task initiated */ uint16_t ntasks_per_core; /* Maximum tasks per core */ - char *cpus_per_tres; /* semicolon delimited list of TRES=# values */ + char *cpus_per_tres; /* TRES list, see slurm_get_next_tres() */ uint32_t exit_code; /* highest exit code from any task */ bitstr_t *exit_node_bitmap; /* bitmap of exited nodes */ uint32_t flags; /* flags from step_spec_flags_t */ @@ -731,7 +731,7 @@ * step */ bool launch_sent; /* batch launch RPC has been sent */ uint32_t max_npids; /* maximum number of PIDs per step on each node */ - char *mem_per_tres; /* semicolon delimited list of TRES=# values */ + char *mem_per_tres; /* TRES list, see slurm_get_next_tres() */ uint64_t *memory_allocated; /* per node array of memory allocated */ char *name; /* name of job step */ char *network; /* step's network specification */ @@ -783,10 +783,10 @@ char *tres_bind; /* Task to TRES binding directives */ char *tres_fmt_alloc_str; /* formatted tres string for step */ char *tres_freq; /* TRES frequency directives */ - char *tres_per_step; /* semicolon delimited list of TRES=# values */ - char *tres_per_node; /* semicolon delimited list of TRES=# values */ - char *tres_per_socket; /* semicolon delimited list of TRES=# values */ - char *tres_per_task; /* semicolon delimited list of TRES=# values */ + char *tres_per_step; /* TRES list, see slurm_get_next_tres() */ + char *tres_per_node; /* TRES list, see slurm_get_next_tres() */ + char *tres_per_socket; /* TRES list, see slurm_get_next_tres() */ + char *tres_per_task; /* TRES list, see slurm_get_next_tres() */ /* DO NOT PACK. Used to bounce info into accounting subsystem. */ char *kill_user; /* name of the user that requested termination */
diff --git a/src/common/slurm_protocol_defs.h b/src/common/slurm_protocol_defs.h index 85719c8..1887ea5 100644 --- a/src/common/slurm_protocol_defs.h +++ b/src/common/slurm_protocol_defs.h
@@ -701,7 +701,7 @@ uint32_t cpu_freq_gov; /* cpu frequency governor */ uint32_t cpu_freq_max; /* Maximum cpu frequency */ uint32_t cpu_freq_min; /* Minimum cpu frequency */ - char *cpus_per_tres; /* semicolon delimited list of TRES=# values */ + char *cpus_per_tres; /* TRES list, see slurm_get_next_tres() */ uint16_t ntasks_per_core; /* number of tasks that can access each cpu */ uint16_t ntasks_per_tres;/* number of tasks that can access each gpu */ char *exc_nodes; /* comma separated list of nodes excluded @@ -722,7 +722,7 @@ uint32_t max_nodes; /* maximum number of nodes usable by job, * default=0 */ uint32_t max_npids; /* maximum number of PIDs per step on each node */ - char *mem_per_tres; /* semicolon delimited list of TRES=# values */ + char *mem_per_tres; /* TRES list, see slurm_get_next_tres() */ char *node_list; /* list of required nodes */ uint32_t num_tasks; /* number of tasks required */ uint16_t plane_size; /* plane size when task_dist = @@ -753,10 +753,10 @@ char *tls_cert; /* srun public certificate if tls in use */ char *tres_bind; /* Task to TRES binding directives */ char *tres_freq; /* TRES frequency directives */ - char *tres_per_step; /* semicolon delimited list of TRES=# values */ - char *tres_per_node; /* semicolon delimited list of TRES=# values */ - char *tres_per_socket; /* semicolon delimited list of TRES=# values */ - char *tres_per_task; /* semicolon delimited list of TRES=# values */ + char *tres_per_step; /* TRES list, see slurm_get_next_tres() */ + char *tres_per_node; /* TRES list, see slurm_get_next_tres() */ + char *tres_per_socket; /* TRES list, see slurm_get_next_tres() */ + char *tres_per_task; /* TRES list, see slurm_get_next_tres() */ uint16_t use_protocol_ver; /* Slurm version the allocation was started * with or the lowest slurmd version * it needs to talk to - NO NEED TO PACK */ @@ -833,7 +833,7 @@ * value in cpt_compact_array is * duplicated */ uint16_t threads_per_core; - char *tres_per_task; /* semicolon delimited list of TRES=# values */ + char *tres_per_task; /* TRES list, see slurm_get_next_tres() */ char **env; char **argv; char *container; /* OCI Container Bundle Path */ @@ -1094,7 +1094,7 @@ char *tres_bind; /* task binding to TRES (e.g. GPUs), * included for possible future use */ char *tres_freq; /* frequency/power for TRES (e.g. GPUs) */ - char *tres_per_task; /* semicolon delimited list of TRES=# values */ + char *tres_per_task; /* TRES list, see slurm_get_next_tres() */ bool oom_kill_step; /* remove in the future. should not be used in slurmd/slurmstepd */ @@ -2213,6 +2213,15 @@ /* * Reentrant TRES specification parse logic + * + * TRES list format, used by the TresPer*, CpusPerTres, and MemPerTres fields: + * list = entry[,entry...] + * entry = tres_type[/name[:type]][{:|=}cnt] + * type is only valid for gres. ':' is allowed before the count to support gres. + * cnt defaults to 1 and may have a size suffix (see suffix_mult()). + * Entries with a count of 0 are skipped. + * Examples: "gres/gpu=2", "gres/gpu:a100=2", "cpu=4,license/foo=1" + * * tres_type IN/OUT - type of tres we are looking for, If *tres_type is NULL we * will fill it in * in_val IN - initial input string
diff --git a/src/plugins/data_parser/v0.0.46/parsers.c b/src/plugins/data_parser/v0.0.46/parsers.c index 5972d2e..243a8ad 100644 --- a/src/plugins/data_parser/v0.0.46/parsers.c +++ b/src/plugins/data_parser/v0.0.46/parsers.c
@@ -9148,8 +9148,8 @@ add_parse(QOS_ID, qosid, "qos", "Quality of Service assigned to the job"), add_parse(STRING, qos_req, "qosreq", "Requested QOS"), add_parse(UINT32, req_cpus, "required/CPUs", "Minimum number of CPUs required"), - add_parse_overload(MEM_PER_CPUS, req_mem, 1, "required/memory_per_cpu", "Minimum memory in megabytes per allocated CPU"), - add_parse_overload(MEM_PER_NODE, req_mem, 1, "required/memory_per_node", "Minimum memory in megabytes per allocated node"), + add_parse_overload(MEM_PER_CPUS, req_mem, 1, "required/memory_per_cpu", "Minimum memory in mebibytes per allocated CPU"), + add_parse_overload(MEM_PER_NODE, req_mem, 1, "required/memory_per_node", "Minimum memory in mebibytes per allocated node"), add_parse(STRING, kill_user, "kill_request_user", "User that requested termination of the job"), add_parse(UINT16, restart_cnt, "restart_cnt", "How many times this job has been requeued/restarted"), add_parse(UINT32, resvid, "reservation/id", "Unique identifier of requested reservation"), @@ -9891,7 +9891,7 @@ add_parse(UINT16, core_spec_cnt, "specialized_cores", "Number of cores reserved for system use"), add_parse(UINT32, cpu_bind, "cpu_binding", "Default method for binding tasks to allocated CPUs"), add_parse(UINT32, cpu_load, "cpu_load", "CPU load as reported by the OS"), - add_parse(UINT64_NO_VAL, free_mem, "free_mem", "Total memory in MB currently free as reported by the OS"), + add_parse(UINT64_NO_VAL, free_mem, "free_mem", "Total memory in MiB currently free as reported by the OS"), add_parse(UINT16, cpus, "cpus", "Total CPUs, including cores and threads"), add_parse(UINT16, cpus_efctv, "effective_cpus", "Number of effective CPUs (excluding specialized CPUs)"), add_parse(STRING, cpu_spec_list, "specialized_cpus", "Slurm abstract CPU IDs on this node reserved for exclusive use by slurmd and slurmstepd"), @@ -9911,7 +9911,7 @@ add_parse(TIMESTAMP_NO_VAL, last_busy, "last_busy", "Time when the node was last busy (UNIX timestamp)"), add_parse(STRING, max_drained_tres, "max_drained_tres", "Per-TRES limit on drained TRES before the node itself is drained"), add_parse(STRING, mcs_label, "mcs_label", "Multi-Category Security label"), - add_parse(UINT64, mem_spec_limit, "specialized_memory", "Combined memory limit, in MB, for Slurm compute node daemons"), + add_parse(UINT64, mem_spec_limit, "specialized_memory", "Combined memory limit, in MiB, for Slurm compute node daemons"), add_parse(STRING, name, "name", "NodeName"), add_parse(NODE_STATES, next_state, "next_state_after_reboot", "The state the node will be assigned after rebooting"), add_parse(STRING, node_addr, "address", "NodeAddr, used to establish a communication path"), @@ -9921,7 +9921,7 @@ add_parse(USER_ID, owner, "owner", "User allowed to run jobs on this node (unset if no restriction)"), add_parse(CSV_STRING, partitions, "partitions", "Partitions containing this node"), add_parse(UINT16, port, "port", "TCP port number of the slurmd"), - add_parse(UINT64, real_memory, "real_memory", "Total memory in MB on the node"), + add_parse(UINT64, real_memory, "real_memory", "Total memory in MiB on the node"), add_parse(UINT16, res_cores_per_gpu, "res_cores_per_gpu", "Number of CPU cores per GPU restricted to GPU jobs"), add_parse(STRING, comment, "comment", "Arbitrary comment"), add_parse(STRING, reason, "reason", "Describes why the node is in a \"DOWN\", \"DRAINED\", \"DRAINING\", \"FAILING\" or \"FAIL\" state"), @@ -9930,14 +9930,14 @@ add_parse(TIMESTAMP_NO_VAL, resume_after, "resume_after", "Number of seconds after the node's state is updated to \"DOWN\" or \"DRAIN\" before scheduling a node state resume"), add_parse(STRING, resv_name, "reservation", "Name of reservation containing this node"), add_parse(UINT32_NO_VAL, suspend_time, "suspend_time", "Time in idle state before being considered for power save."), - add_parse(UINT64, alloc_memory, "alloc_memory", "Total memory in MB currently allocated for jobs"), + add_parse(UINT64, alloc_memory, "alloc_memory", "Total memory in MiB currently allocated for jobs"), add_parse(UINT16, alloc_cpus, "alloc_cpus", "Total number of CPUs currently allocated for jobs"), add_cparse(NODE_SELECT_ALLOC_IDLE_CPUS, "alloc_idle_cpus", "Total number of idle CPUs"), add_parse(STRING, alloc_tres_fmt_str, "tres_used", "Trackable resources currently allocated for jobs"), add_parse(TIMESTAMP_NO_VAL, slurmd_start_time, "slurmd_start_time", "Time when the slurmd started (UNIX timestamp)"), add_parse(UINT16, sockets, "sockets", "Number of physical processor sockets/chips on the node"), add_parse(UINT16, threads, "threads", "Number of logical threads in a single physical core"), - add_parse(UINT32, tmp_disk, "temporary_disk", "Total size in MB of temporary disk storage in TmpFS"), + add_parse(UINT32, tmp_disk, "temporary_disk", "Total size in MiB of temporary disk storage in TmpFS"), add_parse(UINT32, weight, "weight", "Weight of the node for scheduling purposes"), add_parse(STRING, topology_str, "topology", "Topology"), add_parse(STRING, tres_fmt_str, "tres", "Configured trackable resources"), @@ -10140,7 +10140,7 @@ add_parse(UINT32_NO_VAL, cpu_freq_min, "cpu_frequency_minimum", "Minimum CPU frequency"), add_parse(UINT32_NO_VAL, cpu_freq_max, "cpu_frequency_maximum", "Maximum CPU frequency"), add_parse(UINT32_NO_VAL, cpu_freq_gov, "cpu_frequency_governor", "CPU frequency governor"), - add_parse(STRING, cpus_per_tres, "cpus_per_tres", "Semicolon delimited list of TRES=# values indicating how many CPUs should be allocated for each specified TRES (currently only used for gres/gpu)"), + add_parse(STRING, cpus_per_tres, "cpus_per_tres", "Comma-separated list of TRES indicating how many CPUs should be allocated for each specified TRES (e.g. \"gres/gpu=4\"; currently only used for gres/gpu)"), add_parse(STRING, cronspec, "cron", "Time specification for scrontab job"), add_parse(TIMESTAMP_NO_VAL, deadline, "deadline", "Latest time that the job may start (UNIX timestamp)"), add_parse(UINT32_NO_VAL, delay_boot, "delay_boot", "Number of seconds after job eligible start that nodes will be rebooted to satisfy feature specification"), @@ -10182,7 +10182,7 @@ add_parse(UINT32_NO_VAL, max_nodes, "max_nodes", "Maximum number of nodes usable by the job"), add_parse(UINT32_NO_VAL, max_npids, "max_pids", "Maximum number of PIDs allowed in each step of the job on each node"), add_parse(STRING, mcs_label, "mcs_label", "Multi-Category Security label on the job"), - add_parse(STRING, mem_per_tres, "memory_per_tres", "Semicolon delimited list of TRES=# values indicating how much memory in megabytes should be allocated for each specified TRES (currently only used for gres/gpu)"), + add_parse(STRING, mem_per_tres, "memory_per_tres", "Comma-separated list of TRES indicating how much memory in mebibytes should be allocated for each specified TRES (e.g. \"gres/gpu=1024\"; currently only used for gres/gpu)"), add_parse(UINT16, mem_update_delay, "memory_update_delay", "Auto-reduce memory delay in minutes"), add_parse(UINT16, mem_update_margin, "memory_update_margin", "Auto-reduce memory margin percent"), add_parse(STRING, name, "name", "Job name"), @@ -10199,8 +10199,8 @@ add_parse(UINT32_NO_VAL, num_tasks, "tasks", "Number of tasks"), add_parse(STRING, partition, "partition", "Partition assigned to the job"), add_parse(STRING, prefer, "prefer", "Feature(s) the job requested but that are not required"), - add_parse_overload(MEM_PER_CPUS, pn_min_memory, 1, "memory_per_cpu", "Minimum memory in megabytes per allocated CPU"), - add_parse_overload(MEM_PER_NODE, pn_min_memory, 1, "memory_per_node", "Minimum memory in megabytes per allocated node"), + add_parse_overload(MEM_PER_CPUS, pn_min_memory, 1, "memory_per_cpu", "Minimum memory in mebibytes per allocated CPU"), + add_parse_overload(MEM_PER_NODE, pn_min_memory, 1, "memory_per_node", "Minimum memory in mebibytes per allocated node"), add_parse(UINT16_NO_VAL, pn_min_cpus, "minimum_cpus_per_node", "Minimum number of CPUs per node"), add_parse(UINT32_NO_VAL, pn_min_tmp_disk, "minimum_tmp_disk_per_node", "Minimum tmp disk space required per node"), add_parse(TIMESTAMP_NO_VAL, preempt_time, "preempt_time", "Time job received preemption signal (UNIX timestamp)"), @@ -10251,10 +10251,10 @@ add_parse(UINT16_NO_VAL, threads_per_core, "threads_per_core", "Number of processor threads per CPU core required"), add_parse(STRING, tres_bind, "tres_bind", "Task to TRES binding directives"), add_parse(STRING, tres_freq, "tres_freq", "TRES frequency directives"), - add_parse(STRING, tres_per_job, "tres_per_job", "Comma-separated list of TRES=# values to be allocated per job"), - add_parse(STRING, tres_per_node, "tres_per_node", "Comma-separated list of TRES=# values to be allocated per node"), - add_parse(STRING, tres_per_socket, "tres_per_socket", "Comma-separated list of TRES=# values to be allocated per socket"), - add_parse(STRING, tres_per_task, "tres_per_task", "Comma-separated list of TRES=# values to be allocated per task"), + add_parse(STRING, tres_per_job, "tres_per_job", "Comma-separated list of TRES counts to be allocated per job (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_node, "tres_per_node", "Comma-separated list of TRES counts to be allocated per node (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_socket, "tres_per_socket", "Comma-separated list of TRES counts to be allocated per socket (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_task, "tres_per_task", "Comma-separated list of TRES counts to be allocated per task (e.g. \"cpu=4,gres/gpu=1\")"), add_parse(STRING, tres_req_str, "tres_req_str", "TRES requested by the job"), add_parse(STRING, tres_alloc_str, "tres_alloc_str", "TRES used by the job"), add_parse_overload(UINT32, user_id, 1, "user_id", "User ID that owns the job"), @@ -10409,9 +10409,9 @@ add_parse(UINT32_NO_VAL, cpu_freq_min, "cpu/frequency/min", "Minimum CPU frequency"), add_parse(UINT32_NO_VAL, cpu_freq_max, "cpu/frequency/max", "Maximum CPU frequency"), add_parse(UINT32_NO_VAL, cpu_freq_gov, "cpu/frequency/governor", "CPU frequency governor"), - add_parse(STRING, cpus_per_tres, "tres/per/cpu", "Semicolon delimited list of TRES=# values indicating how many CPUs should be allocated for each specified TRES (currently only used for gres/gpu)"), + add_parse(STRING, cpus_per_tres, "tres/per/cpu", "Comma-separated list of TRES indicating how many CPUs should be allocated for each specified TRES (e.g. \"gres/gpu=4\"; currently only used for gres/gpu)"), add_parse(UINT32_NO_VAL, max_npids, "max_pids", "Maximum number of PIDs allowed in the step on each node"), - add_parse(STRING, mem_per_tres, "tres/per/memory", "Semicolon delimited list of TRES=# values indicating how much memory should be allocated for each specified TRES (currently only used for gres/gpu)"), + add_parse(STRING, mem_per_tres, "tres/per/memory", "Comma-separated list of TRES indicating how much memory in mebibytes should be allocated for each specified TRES (e.g. \"gres/gpu=1024\"; currently only used for gres/gpu)"), add_parse(STRING, name, "name", "Job step name"), add_parse(STRING, network, "network", "Network specs for the job step"), add_parse(STRING, nodes, "nodes", "Node(s) allocated to the job step"), @@ -10443,10 +10443,10 @@ add_parse(STRING, tres_fmt_alloc_str, "tres/allocation", "Trackable resources allocated to the step"), add_parse(STRING, tres_bind, "tres/binding", "Task to TRES binding directives"), add_parse(STRING, tres_freq, "tres/frequency", "TRES frequency directive"), - add_parse(STRING, tres_per_step, "tres/per/step", "Comma-separated list of TRES=# values to be allocated per job step"), - add_parse(STRING, tres_per_node, "tres/per/node", "Comma-separated list of TRES=# values to be allocated per node"), - add_parse(STRING, tres_per_socket, "tres/per/socket", "Comma-separated list of TRES=# values to be allocated per socket"), - add_parse(STRING, tres_per_task, "tres/per/task", "Comma-separated list of TRES=# values to be allocated per task"), + add_parse(STRING, tres_per_step, "tres/per/step", "Comma-separated list of TRES counts to be allocated per job step (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_node, "tres/per/node", "Comma-separated list of TRES counts to be allocated per node (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_socket, "tres/per/socket", "Comma-separated list of TRES counts to be allocated per socket (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_task, "tres/per/task", "Comma-separated list of TRES counts to be allocated per task (e.g. \"cpu=4,gres/gpu=1\")"), add_parse(USER_ID, user_id, "user", "User ID that owns the step"), }; #undef add_parse @@ -10507,8 +10507,8 @@ add_parse(STRING, cluster_name, "cluster", "Cluster name (read-only)"), add_parse(SELECT_TYPE_PARAM, cr_type, "select_type", "Scheduler consumable resource selection type (read-only)"), add_parse(NODE_PARTITION_CPU_BINDING_FLAGS, cpu_bind, "cpus/task_binding", "CpuBind - Default method controlling how tasks are bound to allocated resources"), - add_parse_overload(MEM_PER_CPUS, def_mem_per_cpu, 1, "defaults/partition_memory_per_cpu", "DefMemPerCPU - Default real memory size available per allocated CPU in megabytes"), - add_parse_overload(MEM_PER_NODE, def_mem_per_cpu, 1, "defaults/partition_memory_per_node", "DefMemPerNode - Default real memory size available per allocated node in megabytes"), + add_parse_overload(MEM_PER_CPUS, def_mem_per_cpu, 1, "defaults/partition_memory_per_cpu", "DefMemPerCPU - Default real memory size available per allocated CPU in mebibytes"), + add_parse_overload(MEM_PER_NODE, def_mem_per_cpu, 1, "defaults/partition_memory_per_node", "DefMemPerNode - Default real memory size available per allocated node in mebibytes"), add_parse(UINT32_NO_VAL, default_time, "defaults/time", "DefaultTime - Run time limit in minutes used for jobs that don't specify a value"), add_parse(STRING, deny_accounts, "accounts/deny", "DenyAccounts - Comma-separated list of accounts which may not execute jobs in the partition"), add_parse(STRING, deny_qos, "qos/deny", "DenyQOS - Comma-separated list of Qos which may not execute jobs in the partition"), @@ -10519,8 +10519,8 @@ add_parse(STRING, job_defaults_str, "defaults/job", "JobDefaults - Comma-separated list of job default values (this field is only used to set new defaults)"), add_parse(UINT32_NO_VAL, max_cpus_per_node, "maximums/cpus_per_node", "MaxCPUsPerNode - Maximum number of CPUs on any node available to all jobs from this partition"), add_parse(UINT32_NO_VAL, max_cpus_per_socket, "maximums/cpus_per_socket", "MaxCPUsPerSocket - Maximum number of CPUs on any node available on the all jobs from this partition"), - add_parse_overload(MEM_PER_CPUS, max_mem_per_cpu, 1, "maximums/partition_memory_per_cpu", "MaxMemPerCPU - Maximum real memory size available per allocated CPU in megabytes"), - add_parse_overload(MEM_PER_NODE, max_mem_per_cpu, 1, "maximums/partition_memory_per_node", "MaxMemPerNode - Maximum real memory size available per allocated node in a job allocation in megabytes"), + add_parse_overload(MEM_PER_CPUS, max_mem_per_cpu, 1, "maximums/partition_memory_per_cpu", "MaxMemPerCPU - Maximum real memory size available per allocated CPU in mebibytes"), + add_parse_overload(MEM_PER_NODE, max_mem_per_cpu, 1, "maximums/partition_memory_per_node", "MaxMemPerNode - Maximum real memory size available per allocated node in a job allocation in mebibytes"), add_parse(UINT32_NO_VAL, max_nodes, "maximums/nodes", "MaxNodes - Maximum count of nodes which may be allocated to any single job"), add_parse(PARTITION_OVERSUBSCRIBE, max_share, "partition/oversubscribe", "OverSubscribe display: FORCE:n, NO, or YES:n (same as show partition and sinfo)"), add_parse(UINT32_NO_VAL, max_time, "maximums/time", "MaxTime - Maximum run time limit for jobs in minutes"), @@ -10577,16 +10577,16 @@ add_parse(UINT32, max_threads, "threads/maximum", "Maximum number of threads per core on any single node"), add_parse(UINT32, min_disk, "disk/minimum", "Minimum TMP_DISK on any single node"), add_parse(UINT32, max_disk, "disk/maximum", "Maximum TMP_DISK on any single node"), - add_parse(UINT64, min_mem, "memory/minimum", "Minimum memory in megabytes on any single node"), - add_parse(UINT64, max_mem, "memory/maximum", "Maximum memory in megabytes on any single node"), + add_parse(UINT64, min_mem, "memory/minimum", "Minimum memory in mebibytes on any single node"), + add_parse(UINT64, max_mem, "memory/maximum", "Maximum memory in mebibytes on any single node"), add_parse(UINT32, min_weight, "weight/minimum", "Minimum Weight on any single node"), add_parse(UINT32, max_weight, "weight/maximum", "Maximum Weight on any single node"), add_parse(UINT32, min_cpu_load, "cpus/load/minimum", "Minimum CPUsLoad on any single node"), add_parse(UINT32, max_cpu_load, "cpus/load/maximum", "Maximum CPUsLoad on any single node"), - add_parse(UINT64_NO_VAL, min_free_mem, "memory/free/minimum", "Minimum FreeMem in megabytes on any single node"), - add_parse(UINT64_NO_VAL, max_free_mem, "memory/free/maximum", "Maximum FreeMem in megabytes on any single node"), + add_parse(UINT64_NO_VAL, min_free_mem, "memory/free/minimum", "Minimum FreeMem in mebibytes on any single node"), + add_parse(UINT64_NO_VAL, max_free_mem, "memory/free/maximum", "Maximum FreeMem in mebibytes on any single node"), add_parse(UINT32_NO_VAL, max_cpus_per_node, "cpus/per_node/max", "MaxCPUsPerNode - Maximum number of CPUs on any node available to all jobs from this partition"), - add_parse(UINT64, alloc_memory, "memory/allocated", "AllocMem - Total memory in megabytes allocated to jobs"), + add_parse(UINT64, alloc_memory, "memory/allocated", "AllocMem - Total memory in mebibytes allocated to jobs"), add_parse(STRING, features, "features/total", "Features - Features available on the nodes"), add_parse(STRING, features_act, "features/active", "features_act - Features currently active on the nodes"), add_parse(STRING, gres, "gres/total", "Gres - Generic resources configured on these nodes"), @@ -10599,7 +10599,7 @@ add_parse(STRING, resv_name, "reservation", "Name of advanced reservation"), add_cparse(SINFO_REASON_USER_ID, "reason_set_by_user", "User who set the reason"), add_parse(STRING, cpu_spec_list, "resource_spec/cpus", "CpuSpecList - Comma-separated list of Slurm abstract CPU IDs reserved for system use"), - add_parse(UINT64, mem_spec_limit, "resource_spec/memory", "MemSpecLimit - Amount of RealMemory in megabytes reserved for system use"), + add_parse(UINT64, mem_spec_limit, "resource_spec/memory", "MemSpecLimit - Amount of RealMemory in mebibytes reserved for system use"), add_skip(version), /* already in meta */ add_skip(match_key), add_skip(match_key_len), @@ -10910,7 +10910,7 @@ add_skip(cpu_freq_min), add_skip(cpu_freq_max), add_skip(cpu_freq_gov), - add_parse(STRING, cpus_per_tres, "cpus_per_tres", "Semicolon delimited list of TRES=# values values indicating how many CPUs should be allocated for each specified TRES (currently only used for gres/gpu)"), + add_parse(STRING, cpus_per_tres, "cpus_per_tres", "Comma-separated list of TRES indicating how many CPUs should be allocated for each specified TRES (e.g. \"gres/gpu=4\"; currently only used for gres/gpu)"), add_parse(JOB_DESC_MSG_CRON_ENTRY, crontab_entry, "crontab", "Specification for scrontab job"), add_parse(TIMESTAMP, deadline, "deadline", "Latest time that the job may start (UNIX timestamp)"), add_parse(UINT32, delay_boot, "delay_boot", "Number of seconds after job eligible start that nodes will be rebooted to satisfy feature specification"), @@ -10949,7 +10949,7 @@ add_parse(STRING, mcs_label, "mcs_label", "Multi-Category Security label on the job"), add_parse(STRING, mem_bind, "memory_binding", "Binding map for map/mask_cpu"), add_parse(MEMORY_BINDING_TYPE, mem_bind_type, "memory_binding_type", "Method for binding tasks to memory"), - add_parse(STRING, mem_per_tres, "memory_per_tres", "Semicolon delimited list of TRES=# values indicating how much memory in megabytes should be allocated for each specified TRES (currently only used for gres/gpu)"), + add_parse(STRING, mem_per_tres, "memory_per_tres", "Comma-separated list of TRES indicating how much memory in mebibytes should be allocated for each specified TRES (e.g. \"gres/gpu=1024\"; currently only used for gres/gpu)"), add_parse(UINT16, mem_update_margin, "memory_update_margin", "Auto-reduce memory margin percent"), add_parse(UINT16, mem_update_delay, "memory_update_delay", "Auto-reduce memory delay in minutes"), add_parse(STRING, name, "name", "Job name"), @@ -10994,10 +10994,10 @@ add_parse(UINT32_NO_VAL, time_min, "time_minimum", "Minimum run time in minutes"), add_parse(STRING, tres_bind, "tres_bind", "Task to TRES binding directives"), add_parse(STRING, tres_freq, "tres_freq", "TRES frequency directives"), - add_parse(STRING, tres_per_job, "tres_per_job", "Comma-separated list of TRES=# values to be allocated for every job"), - add_parse(STRING, tres_per_node, "tres_per_node", "Comma-separated list of TRES=# values to be allocated for every node"), - add_parse(STRING, tres_per_socket, "tres_per_socket", "Comma-separated list of TRES=# values to be allocated for every socket"), - add_parse(STRING, tres_per_task, "tres_per_task", "Comma-separated list of TRES=# values to be allocated for every task"), + add_parse(STRING, tres_per_job, "tres_per_job", "Comma-separated list of TRES counts to be allocated for every job (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_node, "tres_per_node", "Comma-separated list of TRES counts to be allocated for every node (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_socket, "tres_per_socket", "Comma-separated list of TRES counts to be allocated for every socket (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_task, "tres_per_task", "Comma-separated list of TRES counts to be allocated for every task (e.g. \"cpu=4,gres/gpu=1\")"), add_parse(USER_ID, target_user.uid, "user_id", "User ID that owns the job"), add_parse(STRING, target_user.username, "user", "Used ID to run the job as"), add_parse(BOOL16_NO_VAL, wait_all_nodes, "wait_all_nodes", "If true, wait to start until after all nodes have booted"), @@ -11023,8 +11023,8 @@ add_parse(UINT16, ntasks_per_board, "tasks_per_board", "Number of tasks to invoke on each board"), add_parse(UINT16, ntasks_per_tres, "ntasks_per_tres", "Number of tasks that can access each GPU"), add_parse(UINT16, pn_min_cpus, "minimum_cpus_per_node", "Minimum number of CPUs per node"), - add_parse_overload(MEM_PER_CPUS, pn_min_memory, 1, "memory_per_cpu", "Minimum memory in megabytes per allocated CPU"), - add_parse_overload(MEM_PER_NODE, pn_min_memory, 1, "memory_per_node", "Minimum memory in megabytes per allocated node"), + add_parse_overload(MEM_PER_CPUS, pn_min_memory, 1, "memory_per_cpu", "Minimum memory in mebibytes per allocated CPU"), + add_parse_overload(MEM_PER_NODE, pn_min_memory, 1, "memory_per_node", "Minimum memory in mebibytes per allocated node"), add_parse(UINT32, pn_min_tmp_disk, "temporary_disk_per_node", "Minimum tmp disk space required per node"), add_parse(STRING, req_context, "selinux_context", "SELinux context"), add_parse(UINT32_NO_VAL, req_switch, "required_switches", "Maximum number of switches"), @@ -12829,7 +12829,7 @@ add_parse(STRING, cred_type, "CredType", "Credential signature plugin"), add_parse(STRING, data_parser_parameters, "DataParserParameters", "Data parser parameters"), add_parse(DEBUG_FLAGS, debug_flags, "DebugFlags", "Subsystems which provide more detailed event logging"), - add_parse(MEM_PER_CPUS, def_mem_per_cpu, "DefMemPerCPU", "Default MB memory per allocated CPU"), + add_parse(MEM_PER_CPUS, def_mem_per_cpu, "DefMemPerCPU", "Default memory in MiB per allocated CPU"), add_parse(STRING, def_runtime_plugin, "DefRuntimePlugin", "Default runtime plugin type"), add_parse(CSV_STRING, dependency_params, "DependencyParameters", "Options controlling job dependency behavior"), add_parse(UINT16, eio_timeout, "EioTimeout", "Seconds srun waits for slurmstepd to close the TCP/IP connection"), @@ -12900,7 +12900,7 @@ * but is an existing parser. Using MEM_PER_NODE since the * computation matches what's in config_info.c for max_mem_per_cpu */ - add_parse(MEM_PER_NODE, max_mem_per_cpu, "MaxMemPerCPU", "Maximum MB memory per allocated CPU"), + add_parse(MEM_PER_NODE, max_mem_per_cpu, "MaxMemPerCPU", "Maximum memory in MiB per allocated CPU"), add_parse(UINT32, max_node_cnt, "MaxNodeCount", "Max number of static + dynamic nodes"), add_parse(UINT32, max_step_cnt, "MaxStepCount", "Maximum number of steps per job"), add_parse(UINT16, max_tasks_per_node, "MaxTasksPerNode", "Maximum tasks per node"),
diff --git a/src/plugins/data_parser/v0.0.47/parsers.c b/src/plugins/data_parser/v0.0.47/parsers.c index 6083131..c8431f9 100644 --- a/src/plugins/data_parser/v0.0.47/parsers.c +++ b/src/plugins/data_parser/v0.0.47/parsers.c
@@ -9148,8 +9148,8 @@ add_parse(QOS_ID, qosid, "qos", "Quality of Service assigned to the job"), add_parse(STRING, qos_req, "qosreq", "Requested QOS"), add_parse(UINT32, req_cpus, "required/CPUs", "Minimum number of CPUs required"), - add_parse_overload(MEM_PER_CPUS, req_mem, 1, "required/memory_per_cpu", "Minimum memory in megabytes per allocated CPU"), - add_parse_overload(MEM_PER_NODE, req_mem, 1, "required/memory_per_node", "Minimum memory in megabytes per allocated node"), + add_parse_overload(MEM_PER_CPUS, req_mem, 1, "required/memory_per_cpu", "Minimum memory in mebibytes per allocated CPU"), + add_parse_overload(MEM_PER_NODE, req_mem, 1, "required/memory_per_node", "Minimum memory in mebibytes per allocated node"), add_parse(STRING, kill_user, "kill_request_user", "User that requested termination of the job"), add_parse(UINT16, restart_cnt, "restart_cnt", "How many times this job has been requeued/restarted"), add_parse(UINT32, resvid, "reservation/id", "Unique identifier of requested reservation"), @@ -9891,7 +9891,7 @@ add_parse(UINT16, core_spec_cnt, "specialized_cores", "Number of cores reserved for system use"), add_parse(UINT32, cpu_bind, "cpu_binding", "Default method for binding tasks to allocated CPUs"), add_parse(UINT32, cpu_load, "cpu_load", "CPU load as reported by the OS"), - add_parse(UINT64_NO_VAL, free_mem, "free_mem", "Total memory in MB currently free as reported by the OS"), + add_parse(UINT64_NO_VAL, free_mem, "free_mem", "Total memory in MiB currently free as reported by the OS"), add_parse(UINT16, cpus, "cpus", "Total CPUs, including cores and threads"), add_parse(UINT16, cpus_efctv, "effective_cpus", "Number of effective CPUs (excluding specialized CPUs)"), add_parse(STRING, cpu_spec_list, "specialized_cpus", "Slurm abstract CPU IDs on this node reserved for exclusive use by slurmd and slurmstepd"), @@ -9911,7 +9911,7 @@ add_parse(TIMESTAMP_NO_VAL, last_busy, "last_busy", "Time when the node was last busy (UNIX timestamp)"), add_parse(STRING, max_drained_tres, "max_drained_tres", "Per-TRES limit on drained TRES before the node itself is drained"), add_parse(STRING, mcs_label, "mcs_label", "Multi-Category Security label"), - add_parse(UINT64, mem_spec_limit, "specialized_memory", "Combined memory limit, in MB, for Slurm compute node daemons"), + add_parse(UINT64, mem_spec_limit, "specialized_memory", "Combined memory limit, in MiB, for Slurm compute node daemons"), add_parse(STRING, name, "name", "NodeName"), add_parse(NODE_STATES, next_state, "next_state_after_reboot", "The state the node will be assigned after rebooting"), add_parse(STRING, node_addr, "address", "NodeAddr, used to establish a communication path"), @@ -9921,7 +9921,7 @@ add_parse(USER_ID, owner, "owner", "User allowed to run jobs on this node (unset if no restriction)"), add_parse(CSV_STRING, partitions, "partitions", "Partitions containing this node"), add_parse(UINT16, port, "port", "TCP port number of the slurmd"), - add_parse(UINT64, real_memory, "real_memory", "Total memory in MB on the node"), + add_parse(UINT64, real_memory, "real_memory", "Total memory in MiB on the node"), add_parse(UINT16, res_cores_per_gpu, "res_cores_per_gpu", "Number of CPU cores per GPU restricted to GPU jobs"), add_parse(STRING, comment, "comment", "Arbitrary comment"), add_parse(STRING, reason, "reason", "Describes why the node is in a \"DOWN\", \"DRAINED\", \"DRAINING\", \"FAILING\" or \"FAIL\" state"), @@ -9930,14 +9930,14 @@ add_parse(TIMESTAMP_NO_VAL, resume_after, "resume_after", "Number of seconds after the node's state is updated to \"DOWN\" or \"DRAIN\" before scheduling a node state resume"), add_parse(STRING, resv_name, "reservation", "Name of reservation containing this node"), add_parse(UINT32_NO_VAL, suspend_time, "suspend_time", "Time in idle state before being considered for power save."), - add_parse(UINT64, alloc_memory, "alloc_memory", "Total memory in MB currently allocated for jobs"), + add_parse(UINT64, alloc_memory, "alloc_memory", "Total memory in MiB currently allocated for jobs"), add_parse(UINT16, alloc_cpus, "alloc_cpus", "Total number of CPUs currently allocated for jobs"), add_cparse(NODE_SELECT_ALLOC_IDLE_CPUS, "alloc_idle_cpus", "Total number of idle CPUs"), add_parse(STRING, alloc_tres_fmt_str, "tres_used", "Trackable resources currently allocated for jobs"), add_parse(TIMESTAMP_NO_VAL, slurmd_start_time, "slurmd_start_time", "Time when the slurmd started (UNIX timestamp)"), add_parse(UINT16, sockets, "sockets", "Number of physical processor sockets/chips on the node"), add_parse(UINT16, threads, "threads", "Number of logical threads in a single physical core"), - add_parse(UINT32, tmp_disk, "temporary_disk", "Total size in MB of temporary disk storage in TmpFS"), + add_parse(UINT32, tmp_disk, "temporary_disk", "Total size in MiB of temporary disk storage in TmpFS"), add_parse(UINT32, weight, "weight", "Weight of the node for scheduling purposes"), add_parse(STRING, topology_str, "topology", "Topology"), add_parse(STRING, tres_fmt_str, "tres", "Configured trackable resources"), @@ -10140,7 +10140,7 @@ add_parse(UINT32_NO_VAL, cpu_freq_min, "cpu_frequency_minimum", "Minimum CPU frequency"), add_parse(UINT32_NO_VAL, cpu_freq_max, "cpu_frequency_maximum", "Maximum CPU frequency"), add_parse(UINT32_NO_VAL, cpu_freq_gov, "cpu_frequency_governor", "CPU frequency governor"), - add_parse(STRING, cpus_per_tres, "cpus_per_tres", "Semicolon delimited list of TRES=# values indicating how many CPUs should be allocated for each specified TRES (currently only used for gres/gpu)"), + add_parse(STRING, cpus_per_tres, "cpus_per_tres", "Comma-separated list of TRES indicating how many CPUs should be allocated for each specified TRES (e.g. \"gres/gpu=4\"; currently only used for gres/gpu)"), add_parse(STRING, cronspec, "cron", "Time specification for scrontab job"), add_parse(TIMESTAMP_NO_VAL, deadline, "deadline", "Latest time that the job may start (UNIX timestamp)"), add_parse(UINT32_NO_VAL, delay_boot, "delay_boot", "Number of seconds after job eligible start that nodes will be rebooted to satisfy feature specification"), @@ -10182,7 +10182,7 @@ add_parse(UINT32_NO_VAL, max_nodes, "max_nodes", "Maximum number of nodes usable by the job"), add_parse(UINT32_NO_VAL, max_npids, "max_pids", "Maximum number of PIDs allowed in each step of the job on each node"), add_parse(STRING, mcs_label, "mcs_label", "Multi-Category Security label on the job"), - add_parse(STRING, mem_per_tres, "memory_per_tres", "Semicolon delimited list of TRES=# values indicating how much memory in megabytes should be allocated for each specified TRES (currently only used for gres/gpu)"), + add_parse(STRING, mem_per_tres, "memory_per_tres", "Comma-separated list of TRES indicating how much memory in mebibytes should be allocated for each specified TRES (e.g. \"gres/gpu=1024\"; currently only used for gres/gpu)"), add_parse(UINT16, mem_update_delay, "memory_update_delay", "Auto-reduce memory delay in minutes"), add_parse(UINT16, mem_update_margin, "memory_update_margin", "Auto-reduce memory margin percent"), add_parse(STRING, name, "name", "Job name"), @@ -10199,8 +10199,8 @@ add_parse(UINT32_NO_VAL, num_tasks, "tasks", "Number of tasks"), add_parse(STRING, partition, "partition", "Partition assigned to the job"), add_parse(STRING, prefer, "prefer", "Feature(s) the job requested but that are not required"), - add_parse_overload(MEM_PER_CPUS, pn_min_memory, 1, "memory_per_cpu", "Minimum memory in megabytes per allocated CPU"), - add_parse_overload(MEM_PER_NODE, pn_min_memory, 1, "memory_per_node", "Minimum memory in megabytes per allocated node"), + add_parse_overload(MEM_PER_CPUS, pn_min_memory, 1, "memory_per_cpu", "Minimum memory in mebibytes per allocated CPU"), + add_parse_overload(MEM_PER_NODE, pn_min_memory, 1, "memory_per_node", "Minimum memory in mebibytes per allocated node"), add_parse(UINT16_NO_VAL, pn_min_cpus, "minimum_cpus_per_node", "Minimum number of CPUs per node"), add_parse(UINT32_NO_VAL, pn_min_tmp_disk, "minimum_tmp_disk_per_node", "Minimum tmp disk space required per node"), add_parse(TIMESTAMP_NO_VAL, preempt_time, "preempt_time", "Time job received preemption signal (UNIX timestamp)"), @@ -10250,10 +10250,10 @@ add_parse(UINT16_NO_VAL, threads_per_core, "threads_per_core", "Number of processor threads per CPU core required"), add_parse(STRING, tres_bind, "tres_bind", "Task to TRES binding directives"), add_parse(STRING, tres_freq, "tres_freq", "TRES frequency directives"), - add_parse(STRING, tres_per_job, "tres_per_job", "Comma-separated list of TRES=# values to be allocated per job"), - add_parse(STRING, tres_per_node, "tres_per_node", "Comma-separated list of TRES=# values to be allocated per node"), - add_parse(STRING, tres_per_socket, "tres_per_socket", "Comma-separated list of TRES=# values to be allocated per socket"), - add_parse(STRING, tres_per_task, "tres_per_task", "Comma-separated list of TRES=# values to be allocated per task"), + add_parse(STRING, tres_per_job, "tres_per_job", "Comma-separated list of TRES counts to be allocated per job (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_node, "tres_per_node", "Comma-separated list of TRES counts to be allocated per node (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_socket, "tres_per_socket", "Comma-separated list of TRES counts to be allocated per socket (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_task, "tres_per_task", "Comma-separated list of TRES counts to be allocated per task (e.g. \"cpu=4,gres/gpu=1\")"), add_parse(STRING, tres_req_str, "tres_req_str", "TRES requested by the job"), add_parse(STRING, tres_alloc_str, "tres_alloc_str", "TRES used by the job"), add_parse_overload(UINT32, user_id, 1, "user_id", "User ID that owns the job"), @@ -10408,9 +10408,9 @@ add_parse(UINT32_NO_VAL, cpu_freq_min, "cpu/frequency/min", "Minimum CPU frequency"), add_parse(UINT32_NO_VAL, cpu_freq_max, "cpu/frequency/max", "Maximum CPU frequency"), add_parse(UINT32_NO_VAL, cpu_freq_gov, "cpu/frequency/governor", "CPU frequency governor"), - add_parse(STRING, cpus_per_tres, "tres/per/cpu", "Semicolon delimited list of TRES=# values indicating how many CPUs should be allocated for each specified TRES (currently only used for gres/gpu)"), + add_parse(STRING, cpus_per_tres, "tres/per/cpu", "Comma-separated list of TRES indicating how many CPUs should be allocated for each specified TRES (e.g. \"gres/gpu=4\"; currently only used for gres/gpu)"), add_parse(UINT32_NO_VAL, max_npids, "max_pids", "Maximum number of PIDs allowed in the step on each node"), - add_parse(STRING, mem_per_tres, "tres/per/memory", "Semicolon delimited list of TRES=# values indicating how much memory should be allocated for each specified TRES (currently only used for gres/gpu)"), + add_parse(STRING, mem_per_tres, "tres/per/memory", "Comma-separated list of TRES indicating how much memory in mebibytes should be allocated for each specified TRES (e.g. \"gres/gpu=1024\"; currently only used for gres/gpu)"), add_parse(STRING, name, "name", "Job step name"), add_parse(STRING, network, "network", "Network specs for the job step"), add_parse(STRING, nodes, "nodes", "Node(s) allocated to the job step"), @@ -10442,10 +10442,10 @@ add_parse(STRING, tres_fmt_alloc_str, "tres/allocation", "Trackable resources allocated to the step"), add_parse(STRING, tres_bind, "tres/binding", "Task to TRES binding directives"), add_parse(STRING, tres_freq, "tres/frequency", "TRES frequency directive"), - add_parse(STRING, tres_per_step, "tres/per/step", "Comma-separated list of TRES=# values to be allocated per job step"), - add_parse(STRING, tres_per_node, "tres/per/node", "Comma-separated list of TRES=# values to be allocated per node"), - add_parse(STRING, tres_per_socket, "tres/per/socket", "Comma-separated list of TRES=# values to be allocated per socket"), - add_parse(STRING, tres_per_task, "tres/per/task", "Comma-separated list of TRES=# values to be allocated per task"), + add_parse(STRING, tres_per_step, "tres/per/step", "Comma-separated list of TRES counts to be allocated per job step (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_node, "tres/per/node", "Comma-separated list of TRES counts to be allocated per node (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_socket, "tres/per/socket", "Comma-separated list of TRES counts to be allocated per socket (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_task, "tres/per/task", "Comma-separated list of TRES counts to be allocated per task (e.g. \"cpu=4,gres/gpu=1\")"), add_parse(USER_ID, user_id, "user", "User ID that owns the step"), }; #undef add_parse @@ -10506,8 +10506,8 @@ add_parse(STRING, cluster_name, "cluster", "Cluster name (read-only)"), add_parse(SELECT_TYPE_PARAM, cr_type, "select_type", "Scheduler consumable resource selection type (read-only)"), add_parse(NODE_PARTITION_CPU_BINDING_FLAGS, cpu_bind, "cpus/task_binding", "CpuBind - Default method controlling how tasks are bound to allocated resources"), - add_parse_overload(MEM_PER_CPUS, def_mem_per_cpu, 1, "defaults/partition_memory_per_cpu", "DefMemPerCPU - Default real memory size available per allocated CPU in megabytes"), - add_parse_overload(MEM_PER_NODE, def_mem_per_cpu, 1, "defaults/partition_memory_per_node", "DefMemPerNode - Default real memory size available per allocated node in megabytes"), + add_parse_overload(MEM_PER_CPUS, def_mem_per_cpu, 1, "defaults/partition_memory_per_cpu", "DefMemPerCPU - Default real memory size available per allocated CPU in mebibytes"), + add_parse_overload(MEM_PER_NODE, def_mem_per_cpu, 1, "defaults/partition_memory_per_node", "DefMemPerNode - Default real memory size available per allocated node in mebibytes"), add_parse(UINT32_NO_VAL, default_time, "defaults/time", "DefaultTime - Run time limit in minutes used for jobs that don't specify a value"), add_parse(STRING, deny_accounts, "accounts/deny", "DenyAccounts - Comma-separated list of accounts which may not execute jobs in the partition"), add_parse(STRING, deny_qos, "qos/deny", "DenyQOS - Comma-separated list of Qos which may not execute jobs in the partition"), @@ -10518,8 +10518,8 @@ add_parse(STRING, job_defaults_str, "defaults/job", "JobDefaults - Comma-separated list of job default values (this field is only used to set new defaults)"), add_parse(UINT32_NO_VAL, max_cpus_per_node, "maximums/cpus_per_node", "MaxCPUsPerNode - Maximum number of CPUs on any node available to all jobs from this partition"), add_parse(UINT32_NO_VAL, max_cpus_per_socket, "maximums/cpus_per_socket", "MaxCPUsPerSocket - Maximum number of CPUs on any node available on the all jobs from this partition"), - add_parse_overload(MEM_PER_CPUS, max_mem_per_cpu, 1, "maximums/partition_memory_per_cpu", "MaxMemPerCPU - Maximum real memory size available per allocated CPU in megabytes"), - add_parse_overload(MEM_PER_NODE, max_mem_per_cpu, 1, "maximums/partition_memory_per_node", "MaxMemPerNode - Maximum real memory size available per allocated node in a job allocation in megabytes"), + add_parse_overload(MEM_PER_CPUS, max_mem_per_cpu, 1, "maximums/partition_memory_per_cpu", "MaxMemPerCPU - Maximum real memory size available per allocated CPU in mebibytes"), + add_parse_overload(MEM_PER_NODE, max_mem_per_cpu, 1, "maximums/partition_memory_per_node", "MaxMemPerNode - Maximum real memory size available per allocated node in a job allocation in mebibytes"), add_parse(UINT32_NO_VAL, max_nodes, "maximums/nodes", "MaxNodes - Maximum count of nodes which may be allocated to any single job"), add_parse(PARTITION_OVERSUBSCRIBE, max_share, "partition/oversubscribe", "OverSubscribe display: FORCE:n, NO, or YES:n (same as show partition and sinfo)"), add_parse(UINT32_NO_VAL, max_time, "maximums/time", "MaxTime - Maximum run time limit for jobs in minutes"), @@ -10576,16 +10576,16 @@ add_parse(UINT32, max_threads, "threads/maximum", "Maximum number of threads per core on any single node"), add_parse(UINT32, min_disk, "disk/minimum", "Minimum TMP_DISK on any single node"), add_parse(UINT32, max_disk, "disk/maximum", "Maximum TMP_DISK on any single node"), - add_parse(UINT64, min_mem, "memory/minimum", "Minimum memory in megabytes on any single node"), - add_parse(UINT64, max_mem, "memory/maximum", "Maximum memory in megabytes on any single node"), + add_parse(UINT64, min_mem, "memory/minimum", "Minimum memory in mebibytes on any single node"), + add_parse(UINT64, max_mem, "memory/maximum", "Maximum memory in mebibytes on any single node"), add_parse(UINT32, min_weight, "weight/minimum", "Minimum Weight on any single node"), add_parse(UINT32, max_weight, "weight/maximum", "Maximum Weight on any single node"), add_parse(UINT32, min_cpu_load, "cpus/load/minimum", "Minimum CPUsLoad on any single node"), add_parse(UINT32, max_cpu_load, "cpus/load/maximum", "Maximum CPUsLoad on any single node"), - add_parse(UINT64_NO_VAL, min_free_mem, "memory/free/minimum", "Minimum FreeMem in megabytes on any single node"), - add_parse(UINT64_NO_VAL, max_free_mem, "memory/free/maximum", "Maximum FreeMem in megabytes on any single node"), + add_parse(UINT64_NO_VAL, min_free_mem, "memory/free/minimum", "Minimum FreeMem in mebibytes on any single node"), + add_parse(UINT64_NO_VAL, max_free_mem, "memory/free/maximum", "Maximum FreeMem in mebibytes on any single node"), add_parse(UINT32_NO_VAL, max_cpus_per_node, "cpus/per_node/max", "MaxCPUsPerNode - Maximum number of CPUs on any node available to all jobs from this partition"), - add_parse(UINT64, alloc_memory, "memory/allocated", "AllocMem - Total memory in megabytes allocated to jobs"), + add_parse(UINT64, alloc_memory, "memory/allocated", "AllocMem - Total memory in mebibytes allocated to jobs"), add_parse(STRING, features, "features/total", "Features - Features available on the nodes"), add_parse(STRING, features_act, "features/active", "features_act - Features currently active on the nodes"), add_parse(STRING, gres, "gres/total", "Gres - Generic resources configured on these nodes"), @@ -10598,7 +10598,7 @@ add_parse(STRING, resv_name, "reservation", "Name of advanced reservation"), add_cparse(SINFO_REASON_USER_ID, "reason_set_by_user", "User who set the reason"), add_parse(STRING, cpu_spec_list, "resource_spec/cpus", "CpuSpecList - Comma-separated list of Slurm abstract CPU IDs reserved for system use"), - add_parse(UINT64, mem_spec_limit, "resource_spec/memory", "MemSpecLimit - Amount of RealMemory in megabytes reserved for system use"), + add_parse(UINT64, mem_spec_limit, "resource_spec/memory", "MemSpecLimit - Amount of RealMemory in mebibytes reserved for system use"), add_skip(version), /* already in meta */ add_skip(match_key), add_skip(match_key_len), @@ -10909,7 +10909,7 @@ add_skip(cpu_freq_min), add_skip(cpu_freq_max), add_skip(cpu_freq_gov), - add_parse(STRING, cpus_per_tres, "cpus_per_tres", "Semicolon delimited list of TRES=# values values indicating how many CPUs should be allocated for each specified TRES (currently only used for gres/gpu)"), + add_parse(STRING, cpus_per_tres, "cpus_per_tres", "Comma-separated list of TRES indicating how many CPUs should be allocated for each specified TRES (e.g. \"gres/gpu=4\"; currently only used for gres/gpu)"), add_parse(JOB_DESC_MSG_CRON_ENTRY, crontab_entry, "crontab", "Specification for scrontab job"), add_parse(TIMESTAMP, deadline, "deadline", "Latest time that the job may start (UNIX timestamp)"), add_parse(UINT32, delay_boot, "delay_boot", "Number of seconds after job eligible start that nodes will be rebooted to satisfy feature specification"), @@ -10948,7 +10948,7 @@ add_parse(STRING, mcs_label, "mcs_label", "Multi-Category Security label on the job"), add_parse(STRING, mem_bind, "memory_binding", "Binding map for map/mask_cpu"), add_parse(MEMORY_BINDING_TYPE, mem_bind_type, "memory_binding_type", "Method for binding tasks to memory"), - add_parse(STRING, mem_per_tres, "memory_per_tres", "Semicolon delimited list of TRES=# values indicating how much memory in megabytes should be allocated for each specified TRES (currently only used for gres/gpu)"), + add_parse(STRING, mem_per_tres, "memory_per_tres", "Comma-separated list of TRES indicating how much memory in mebibytes should be allocated for each specified TRES (e.g. \"gres/gpu=1024\"; currently only used for gres/gpu)"), add_parse(UINT16, mem_update_margin, "memory_update_margin", "Auto-reduce memory margin percent"), add_parse(UINT16, mem_update_delay, "memory_update_delay", "Auto-reduce memory delay in minutes"), add_parse(STRING, name, "name", "Job name"), @@ -10993,10 +10993,10 @@ add_parse(UINT32_NO_VAL, time_min, "time_minimum", "Minimum run time in minutes"), add_parse(STRING, tres_bind, "tres_bind", "Task to TRES binding directives"), add_parse(STRING, tres_freq, "tres_freq", "TRES frequency directives"), - add_parse(STRING, tres_per_job, "tres_per_job", "Comma-separated list of TRES=# values to be allocated for every job"), - add_parse(STRING, tres_per_node, "tres_per_node", "Comma-separated list of TRES=# values to be allocated for every node"), - add_parse(STRING, tres_per_socket, "tres_per_socket", "Comma-separated list of TRES=# values to be allocated for every socket"), - add_parse(STRING, tres_per_task, "tres_per_task", "Comma-separated list of TRES=# values to be allocated for every task"), + add_parse(STRING, tres_per_job, "tres_per_job", "Comma-separated list of TRES counts to be allocated for every job (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_node, "tres_per_node", "Comma-separated list of TRES counts to be allocated for every node (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_socket, "tres_per_socket", "Comma-separated list of TRES counts to be allocated for every socket (e.g. \"gres/gpu=2\")"), + add_parse(STRING, tres_per_task, "tres_per_task", "Comma-separated list of TRES counts to be allocated for every task (e.g. \"cpu=4,gres/gpu=1\")"), add_parse(USER_ID, target_user.uid, "user_id", "User ID that owns the job"), add_parse(STRING, target_user.username, "user", "Used ID to run the job as"), add_parse(BOOL16_NO_VAL, wait_all_nodes, "wait_all_nodes", "If true, wait to start until after all nodes have booted"), @@ -11022,8 +11022,8 @@ add_parse(UINT16, ntasks_per_board, "tasks_per_board", "Number of tasks to invoke on each board"), add_parse(UINT16, ntasks_per_tres, "ntasks_per_tres", "Number of tasks that can access each GPU"), add_parse(UINT16, pn_min_cpus, "minimum_cpus_per_node", "Minimum number of CPUs per node"), - add_parse_overload(MEM_PER_CPUS, pn_min_memory, 1, "memory_per_cpu", "Minimum memory in megabytes per allocated CPU"), - add_parse_overload(MEM_PER_NODE, pn_min_memory, 1, "memory_per_node", "Minimum memory in megabytes per allocated node"), + add_parse_overload(MEM_PER_CPUS, pn_min_memory, 1, "memory_per_cpu", "Minimum memory in mebibytes per allocated CPU"), + add_parse_overload(MEM_PER_NODE, pn_min_memory, 1, "memory_per_node", "Minimum memory in mebibytes per allocated node"), add_parse(UINT32, pn_min_tmp_disk, "temporary_disk_per_node", "Minimum tmp disk space required per node"), add_parse(STRING, req_context, "selinux_context", "SELinux context"), add_parse(UINT32_NO_VAL, req_switch, "required_switches", "Maximum number of switches"), @@ -12827,7 +12827,7 @@ add_parse(STRING, cred_type, "CredType", "Credential signature plugin"), add_parse(STRING, data_parser_parameters, "DataParserParameters", "Data parser parameters"), add_parse(DEBUG_FLAGS, debug_flags, "DebugFlags", "Subsystems which provide more detailed event logging"), - add_parse(MEM_PER_CPUS, def_mem_per_cpu, "DefMemPerCPU", "Default MB memory per allocated CPU"), + add_parse(MEM_PER_CPUS, def_mem_per_cpu, "DefMemPerCPU", "Default memory in MiB per allocated CPU"), add_parse(STRING, def_runtime_plugin, "DefRuntimePlugin", "Default runtime plugin type"), add_parse(CSV_STRING, dependency_params, "DependencyParameters", "Options controlling job dependency behavior"), add_parse(UINT16, eio_timeout, "EioTimeout", "Seconds srun waits for slurmstepd to close the TCP/IP connection"), @@ -12898,7 +12898,7 @@ * but is an existing parser. Using MEM_PER_NODE since the * computation matches what's in config_info.c for max_mem_per_cpu */ - add_parse(MEM_PER_NODE, max_mem_per_cpu, "MaxMemPerCPU", "Maximum MB memory per allocated CPU"), + add_parse(MEM_PER_NODE, max_mem_per_cpu, "MaxMemPerCPU", "Maximum memory in MiB per allocated CPU"), add_parse(UINT32, max_node_cnt, "MaxNodeCount", "Max number of static + dynamic nodes"), add_parse(UINT32, max_step_cnt, "MaxStepCount", "Maximum number of steps per job"), add_parse(UINT16, max_tasks_per_node, "MaxTasksPerNode", "Maximum tasks per node"),
diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 4fc69ed..b3b922f 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c
@@ -10690,8 +10690,8 @@ part_record_t **visible_parts) { if (job_ptr->part_ptr_list) { - if (list_find_first(part_list, _foreach_is_part_visible, - visible_parts)) + if (list_find_first(job_ptr->part_ptr_list, + _foreach_is_part_visible, visible_parts)) return false; return true; }
diff --git a/testsuite/python/tests/test_147_3.py b/testsuite/python/tests/test_147_3.py index 93c4a58..e11f6fc 100644 --- a/testsuite/python/tests/test_147_3.py +++ b/testsuite/python/tests/test_147_3.py
@@ -159,6 +159,20 @@ return hooks +def get_job_id(spank_tmp): + """Return the job id recorded by any hook marker, or 0 if there is none. + + Some hooks (e.g. slurm_spank_exit in local and allocator context) don't have + a job id of their own, but the job did exist, and the hooks that ran + in remote context (inside the job) recorded it. + """ + output = atf.run_command_output( + f"grep -h -o 'job_id=[0-9]*' {spank_tmp}/slurm_spank_*_log 2>/dev/null || true" + ) + job_ids = [int(job_id) for job_id in re.findall(r"job_id=(\d+)", output)] + return max(job_ids, default=0) + + def assert_hooks_run(spank_tmp, function, context, job_id, not_called=()): """Assert the hooks that ran match what spank.8 documents. @@ -223,15 +237,20 @@ job_id, "DONE", fatal=True ), f"Job {job_id} should reach a terminal state, but did not" state = atf.get_job_parameter(job_id, "JobState", default="NOT_FOUND") + + # Log why the job ended that way: a non-zero ExitCode with no Reason means + # the client reported its own exit status when it released the allocation, + # while a launch failure sets a Reason. + details = { + name: atf.get_job_parameter(job_id, name, default="NOT_FOUND") + for name in ("Reason", "ExitCode", "DerivedExitCode", "Restarts") + } + logging.debug(f"Job {job_id} ended in {state}: {details}") assert ( state in allowed_states - ), f"Job {job_id} should end in one of {allowed_states}, but ended in {state}" + ), f"Job {job_id} should end in one of {allowed_states}, but ended in {state} ({details})" -# TODO: The spank.8 Errors table documents exit code 0 and the job not failing -# for srun with slurm_spank_user_init and slurm_spank_task_post_fork in -# remote context, but srun fails as it does under salloc. Follow the docs -# once issue #51216 clarifies it. @pytest.mark.parametrize( "function, context, xfail, drains, fails, jobid_assigned", [ @@ -244,7 +263,7 @@ ("slurm_spank_task_post_fork", "remote", True, False, True, True), ("slurm_spank_task_init", "remote", True, False, True, True), ("slurm_spank_task_exit", "remote", False, False, False, True), - ("slurm_spank_exit", "local", False, False, True, False), + ("slurm_spank_exit", "local", False, False, False, False), ], ) def test_srun(spank_tmp, function, context, xfail, drains, fails, jobid_assigned): @@ -274,13 +293,19 @@ if jobid_assigned: assert int(job_id) > 0, "JobID should be assigned" - - if fails: - assert_job_end_state(int(job_id), ("FAILED", "CANCELLED")) else: assert int(job_id) == 0, "JobID should NOT be assigned" - assert_hooks_run(spank_tmp, function, context, int(job_id)) + # The failing hook may not know the job id (e.g. slurm_spank_exit), but the + # job existed if any other hook recorded it. Check whether it failed. + job_id = get_job_id(spank_tmp) + if job_id > 0: + if fails: + assert_job_end_state(job_id, ("FAILED", "CANCELLED")) + else: + assert_job_end_state(job_id, ("COMPLETED",)) + + assert_hooks_run(spank_tmp, function, context, job_id) assert_node_drained(drains) @@ -292,14 +317,14 @@ ("slurm_spank_init", "local", True, False, True, False), ("slurm_spank_init_post_opt", "local", True, False, True, False), ("slurm_spank_local_user_init", "local", True, False, True, True), - ("slurm_spank_init", "remote", True, False, False, True), + ("slurm_spank_init", "remote", True, False, True, True), ("slurm_spank_user_init", "remote", True, False, True, True), ("slurm_spank_task_init_privileged", "remote", True, False, True, True), ("slurm_spank_task_post_fork", "remote", True, False, True, True), ("slurm_spank_task_init", "remote", True, False, True, True), ("slurm_spank_task_exit", "remote", False, False, False, True), - ("slurm_spank_exit", "local", False, False, True, False), - ("slurm_spank_exit", "allocator", False, False, True, False), + ("slurm_spank_exit", "local", False, False, False, False), + ("slurm_spank_exit", "allocator", False, False, False, False), ], ) def test_salloc(spank_tmp, function, context, xfail, drains, fails, jobid_assigned): @@ -330,10 +355,16 @@ if jobid_assigned: assert int(job_id) > 0, "JobID should be assigned" + # The failing hook may not know the job id (e.g. slurm_spank_exit), but the + # job existed if any other hook recorded it. Check whether it failed. + job_id = get_job_id(spank_tmp) + if job_id > 0: if fails: - assert_job_end_state(int(job_id), ("FAILED", "CANCELLED")) + assert_job_end_state(job_id, ("FAILED", "CANCELLED")) + else: + assert_job_end_state(job_id, ("COMPLETED",)) - assert_hooks_run(spank_tmp, function, context, int(job_id)) + assert_hooks_run(spank_tmp, function, context, job_id) assert_node_drained(drains) @@ -430,9 +461,6 @@ requeued instead of failed. So, unlike test_sbatch, this can't use --no-requeue, that would fail the job, nor -W, that would wait forever for the requeued job. The exit code is not checked: the job never terminates. - - TODO: Check the exit code of the spank.8 Errors table once issue #51216 - clarifies what it means for sbatch. """ function = "slurm_spank_init" context = "remote" @@ -533,9 +561,6 @@ ), f"Cron job should not fail, but its state is {job_states}" # The cron job never runs, so there's no job to wait for. - # spank.8 is ambiguous about init_post_opt in scrontab: it's documented for - # allocator context, but the Errors table only lists init and exit for - # scrontab, and scrontab doesn't call it. - # TODO: Remove not_called once issue #51216 is fixed + # scrontab does not call init_post_opt. assert_hooks_run(spank_tmp, function, context, 0, not_called=("init_post_opt",)) assert_node_drained(drains)