Skip to content

Commit 8bb86d0

Browse files
committed
updated docs with new config parameter
Signed-off-by: tcutts <[email protected]>
1 parent 363c159 commit 8bb86d0

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

docs/executor.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,10 @@ Nextflow does not provide direct support for SLURM multi-clusters. If you need t
446446
Some SLURM clusters require memory allocations to be specified with `--mem-per-cpu` instead of `--mem`. You can specify `executor.perCpuMemAllocation = true` in the Nextflow configuration to enable this behavior. Nextflow will automatically compute the memory per CPU for each task (by default 1 CPU is used).
447447
:::
448448

449+
:::{versionadded} 25.10.0
450+
Since SLURM 24,`squeue` has supported an `--only-job-state` option which ignores the partition (`-p`) or user (`-u`) filters. You can specify `executor.$slurm.onlyJobState = true` in the Nextflow configuration to enable this behavior; if your SLURM administrator has enabled `SchedulerParameters=enable_job_state_cache` this should provide a significant performance to nextflow and reduce the load on the SLURM controller.
451+
:::
452+
449453
(tcs-executor)=
450454

451455
## TCS

docs/reference/config.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,12 @@ The following settings are available:
715715
: *Used only by the {ref}`slurm-executor` executor.*
716716
: When `true`, memory allocations for SLURM jobs are specified as `--mem-per-cpu <task.memory / task.cpus>` instead of `--mem <task.memory>`.
717717

718+
`executor.onlyJobState`
719+
: :::{versionadded} 25.10.0
720+
:::
721+
: *Used only by the {ref}`slurm-executor` executor.*
722+
: When `true`, job status queries use `squeue --only-job-state` without partition (`-p`) or user (`-u`) filters. This can reduce the load on the SLURM controller, especially if your SLURM administrator has enabled `SchedulerParameters=enable_job_state_cache` in the SLURM configuration - note versions of SLURM prior to 24 do not support this parameter (default: `false`).
723+
718724
`executor.perJobMemLimit`
719725
: *Used only by the {ref}`lsf-executor` executor.*
720726
: Enables the *per-job* memory limit mode for LSF jobs.

modules/nextflow/src/main/groovy/nextflow/executor/SlurmExecutor.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class SlurmExecutor extends AbstractGridExecutor implements TaskArrayExecutor {
160160

161161
final result = ['squeue','--noheader', '-o','%i %t', '-t', 'all']
162162

163-
if (onlyJobState) {
163+
if( onlyJobState ) {
164164
result << '--only-job-state'
165165
// -p and -u cannot be used with --only-job-state
166166
return result

modules/nextflow/src/test/groovy/nextflow/executor/SlurmExecutorTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ class SlurmExecutorTest extends Specification {
354354
then:
355355
resultNoQueue == ['squeue','--noheader','-o','%i %t','-t','all','-u', usr]
356356
!resultNoQueue.contains('--only-job-state')
357-
357+
358358
and:
359359
resultWithQueue == ['squeue','--noheader','-o','%i %t','-t','all','-p','myqueue','-u', usr]
360360
!resultWithQueue.contains('--only-job-state')

0 commit comments

Comments
 (0)