The guided walkthrough for running BulkSeq on a Slurm cluster is on Run on a Slurm cluster. This page is for looking things up: every setting and its default, the resources each step asks for, the Slurm commands that work on a run, and what to do when something goes wrong.
- Every cluster setting
- Per-step threads, memory, walltime and placement
- Large genomes
- Run stages
- Follow, inspect and control a run
- Disconnects, stopping and resuming
- Troubleshooting
- Kubernetes
- What has been verified
Every cluster setting#
Use this section to find a setting’s name, default and effect. All site settings live in the project’s config/config.yaml, under execution, never in the copied workflow: an edit under workflow/ changes the recorded workflow digest and the project then refuses to run. Set them with bulkseq config set -C PATH execution.<setting> <value>, or in the desktop interface under Analysis setup, Compute resources, Cluster (Slurm) settings. A value that starts with --, such as --mail-type=FAIL, needs -- in front of it so the command does not read it as an option. A structured value (a list or a mapping) is given as YAML or JSON in quotes. In the desktop interface, Save Cluster Settings checks these settings and the per-step table and writes them to the project; Copy Cluster Commands copies the login-node commands that check and run the project (bulkseq check, a dry run, bulkseq run --exec-profile slurm and bulkseq slurm-script --submit).
bulkseq config set -C PATH execution.slurm_partition PARTITION
bulkseq config set -C PATH execution.slurm_account myproject
bulkseq config set -C PATH execution.slurm_extra -- --mail-type=FAIL
bulkseq config set -C PATH execution.rule_resources '{"star_align": {"slurm_partition": "bigmem"}}'
bulkseq config show -C PATH --section executionWhere jobs go#
Setting (execution.…) | Default | What it does |
|---|---|---|
slurm_partitionPartition | empty | Slurm partition (queue) for every job, or a comma-separated list Slurm may choose from. Empty uses the cluster's default. List them with sinfo -s. |
slurm_accountAccount | empty | Account (project) charged for the jobs, passed as -A. Most centres require it; sacctmgr show assoc user=$USER format=account, or the centre's own command, lists yours. |
slurm_no_accountSubmit without an account | false | Passes --slurm-no-account for clusters that have no accounts. The 2.8.0 executor plugin defines the flag but does not yet act on it: with no account it still tries to guess one and submits without -A when that fails. |
slurm_qosQuality of service | empty | QOS name passed as --qos, where the site requires one. |
slurm_constraintNode features | empty | Feature expression passed as --constraint, e.g. a node type on a partition that mixes several. |
slurm_clustersCluster | empty | For federated sites: the cluster name passed as --clusters. |
slurm_reservationReservation | empty | An advance reservation the jobs should run in. |
slurm_exclude_nodesExclude nodes | empty | Nodes never to use, e.g. a017,a[040-042]. |
slurm_extraOther sbatch options | empty | Further options such as --nice=10 or --mail-type=FAIL. Options the settings above or the executor manage (account, partition, QOS, memory, CPUs, time, output) are refused here. |
Job sizes and limits#
Setting (execution.…) | Default | What it does |
|---|---|---|
jobsJobs in the queue at once | 16 | Maximum number of jobs submitted at the same time. Keep it below the site's per-user limit. |
min_cpus_per_jobMinimum CPUs per job | 0 | Smallest CPU request of any job (0 = each step's own thread count). Set it to the partition's minimum where the centre sets one. |
default_runtime_minDefault walltime (min) | 240 | Walltime of a step with no walltime of its own (see the per-step table). |
default_mem_mbDefault memory floor (MB) | 4000 | Memory of a step that declares none: the larger of this and twice the step's input size. |
retriesRetries | 1 | Times a failed job is submitted again. A retry asks for the attempt number times the walltime (the step's own or the default one), capped by the walltime cap when set. |
max_runtime_minWalltime cap (min) | 0 | Upper bound for a retried job's walltime (0 = no cap). Set it to the partition's time limit. |
max_mem_mbMemory cap for retries (MB) | 0 | When set, a retried job also asks for more memory, up to this value (e.g. the node's memory). 0 keeps the memory of a retry unchanged. |
tmpdirTemporary directory | empty | Absolute directory for each job's temporary files (STAR and samtools sort spill). Empty keeps the node's own. Quotes and '$' are not accepted, so a variable cannot be used here. |
Executor behaviour#
Setting (execution.…) | Default | What it does |
|---|---|---|
slurm_requeueRequeue | site-default | site-default leaves it to the cluster; requeue lets Slurm restart a job after a node failure or pre-emption; no-requeue forbids it. |
slurm_status_commandJob-state command | auto | auto uses sacct when present. Choose squeue on a cluster without job accounting. |
slurm_array_jobsSubmit as job arrays | empty | Empty, all, or comma-separated step or rule names whose jobs are grouped into Slurm job arrays (a step name such as fastp covers every rule that reads its settings). |
slurm_array_limitArray size limit | 0 | Largest array per submission (0 = the executor's default). |
slurm_jobname_prefixJob-name prefix | empty | Prefix shown in squeue (letters, digits, _ and -). |
slurm_pass_command_as_scriptPass commands as scripts | false | Feeds each job's command to sbatch on standard input, for sites with a short command-line limit. |
slurm_efficiency_reportEfficiency report | false | Writes logs/slurm/efficiency_report_ |
slurm_partition_configPartition limits file | empty | Optional YAML file (path relative to the project) describing partition limits, so the executor chooses a partition for each job by its size. |
latency_wait_sShared-filesystem wait (s) | 60 | How long to wait for a finished job's output to appear on the shared filesystem. |
local_coresLogin-node cores | 2 | Cores the steps that run on the submitting host may use together (downloads, enrichment). |
Internet access#
Setting (execution.…) | Default | What it does |
|---|---|---|
network_rules_on_submit_hostRun online steps on the login node | true | Downloads, GEO retrieval, enrichment, STRING and the MSigDB Hallmark set run where the run was started, because compute nodes often have no internet. |
compute_nodes_have_internetCompute nodes have internet | false | Single-allocation mode only: when false, the job leaves the online steps, and the figures, check summary and reports that depend on them, for a finishing run on the login node. |
Single-allocation mode (bulkseq slurm-script)#
Setting (execution.…) | Default | What it does |
|---|---|---|
allocation_cpusCPUs | 0 | CPUs of the one job (0 = the whole node, --exclusive). |
allocation_mem_gbMemory (GB) | 0 | Memory of the one job (0 = all of the node's memory). |
allocation_time_minWalltime (min) | 1440 | Walltime of the one job. A run that needs longer is continued by submitting the script again. |
container_imageContainer image | empty | Apptainer/Singularity image (.sif) to run the workflow in, for sites that forbid conda installs. Empty runs the installed environment. |
container_runtimeContainer command | apptainer | apptainer or singularity, whichever the cluster provides. |
container_bindsContainer bind paths | [] | Further directories the container must see, comma-separated absolute paths. The project folder, the temporary directory and the folders of the configured reference and FASTQ files are bound already. |
Per-step threads, memory, walltime and placement#
Use this section to size one step or send it to another partition. Each heavy step declares its own threads, memory and walltime; every executor reads them. Change one with bulkseq config set -C PATH rule_memory_gb.star_index 160, rule_threads.star_align 16 or rule_runtime_min.star_index 1440. A step without a walltime gets execution.default_runtime_min; one without memory gets the larger of execution.default_mem_mb and twice its input size. To send one step to another partition, QOS or node type, set execution.rule_resources.<step>.<field> with field slurm_partition, slurm_account, qos, constraint, clusters or slurm_extra. Some step keys cover several workflow rules, so one setting sizes all of them: fastqc (raw and trimmed reports), fastp (also the Trim Galore and Trimmomatic rules, single-end and paired-end), sortmerna (also its index and the RiboDetector rules) and deseq2 (also the limma, voom and edgeR differential-expression rules).
| Step | Default walltime (rule_runtime_min) | Default memory (rule_memory_gb) |
|---|---|---|
star_index | 720 min | 24 GB |
hisat2_index | 720 min | 16 GB |
salmon_index | 480 min | 16 GB |
star_align | 360 min | 24 GB |
hisat2_align | 360 min | 8 GB |
salmon_quant | 240 min | 8 GB |
sortmerna | 360 min | 12 GB |
featurecounts | 240 min | 8 GB |
deseq2 | 240 min | 12 GB |
Large genomes#
Use this section when the genome is larger than a typical mammalian one. Maize (about 2.2 Gb) and bread wheat (about 14.5 Gb) need far more than the defaults. On the bundled reference catalogue, STAR’s index build for maize peaked at 57.9 GB on the reference PC; wheat could not be indexed in 64 GB. The STAR manual asks for at least 32 GB for the 3.1 Gb human genome, roughly 10 bytes per base, which suggests on the order of 150 GB for wheat; treat that as an estimate to confirm on a first run, not a measurement. BulkSeq passes STAR a genome-generation limit of 90% of rule_memory_gb.star_index whenever that is above STAR’s 31 GB default, that is from 35 GB, so raising the memory is enough. Because the flag changes the STAR command, a project that already holds an index built with 35 GB or more rebuilds it once after this release. Aligning to a wheat STAR index also holds the whole index in memory, one alignment at a time per node; Salmon and HISAT2 need much less. Bread wheat and barley chromosomes exceed the 229−1 bp (about 537 Mb) a BAI index can address, so their BAMs are indexed as CSI automatically; another genome with such a sequence needs reference.bam_index csi, and the reference check stops the run with that instruction before alignment.
| Genome | Suggested setting | Basis |
|---|---|---|
| Maize, STAR | rule_memory_gb.star_index 72, star_align 40 | Index peak measured at 57.9 GB on the reference PC under STAR’s default limit; 72 GB gives STAR a 64.8 GB limit with headroom. Alignment is estimated from the index size |
| Wheat, STAR | rule_memory_gb.star_index 200, star_align 180, walltimes of a day or more | Estimated from the STAR manual’s human figure; not measured |
| Wheat, Salmon | Defaults, with more walltime for salmon_index | The route the benchmark plan uses for wheat on one PC |
Run stages#
Use stages when only part of a run can happen on a given host, for example downloads on the login node and computation elsewhere. --stage prefetch runs only the downloads. --stage compute runs everything except the online analysis steps (enrichment, annotation transfer, STRING and MSigDB) and what depends on them: their figures, the check summary and the reports. --stage online runs only those online steps. --stage all, or no --stage, does whatever is still missing. A staged run uses the local executor, so give --stage only with the default --exec-profile local; with another profile the command stops with an error. --cores and --memory-gb size a local run for one launch without changing the project. Inside the single-allocation job the stage is the script’s first argument: sbatch config/slurm_allocation.sbatch all runs every step, including the online ones.
bulkseq run -C PATH --stage prefetch --cores 2
bulkseq run -C PATH --stage compute --cores 128 --memory-gb 240
bulkseq run -C PATH --stage online --cores 2
bulkseq run -C PATH --cores 2Follow, inspect and control a run#
Use this section while a run is in progress or after it ended. Every job BulkSeq submits is an ordinary Slurm job, so the site’s own commands work on it. Per-step jobs are named by the run’s identifier and carry the step name in their comment; the one-allocation job is named bulkseq-<project>.
| To | Use |
|---|---|
| List your jobs and their states | squeue --me |
| See why a job is pending | squeue --me -o "%i %j %T %r" (reasons such as Resources, AssocGrpCPUMinutesLimit) |
| Inspect a job’s request and node | scontrol show job JOBID |
| Accounting after a job ends (state, time, peak memory) | sacct -j JOBID -o JobID,JobName%30,State,Elapsed,MaxRSS,ReqMem,AllocCPUS |
| Live memory of a running job | sstat -j JOBID.batch -o MaxRSS,AveCPU |
| Efficiency of finished jobs | seff JOBID where installed, or execution.slurm_efficiency_report true for logs/slurm/efficiency_report_<run id>.csv |
| Read what a job printed | logs/slurm/rule_<step>/[<sample>/]<jobid>.log; one allocation: logs/slurm/allocation-<jobid>.log |
| Read a tool’s own log | logs/<step>.log, as in a local run |
| Read the run log | logs/bulkseq_run_<time>_<profile>_<stage>.log |
| Hold or release a queued job | scontrol hold JOBID / scontrol release JOBID |
| Cancel jobs | Ctrl-C in the running bulkseq run (it cancels every job it submitted), or scancel JOBID / scancel --me |
| Debug one step interactively | srun -p PARTITION -A ACCOUNT -c 4 --mem 8G --pty bash, then run the command from bulkseq print-command with --until STEP |
| See partitions and their limits | sinfo -s, sinfo -o "%P %m %c %l" |
| See your accounts and quotas | sacctmgr show assoc user=$USER, or your centre’s own account command |
Disconnects, stopping and resuming#
Use this section after a dropped connection, an interruption or a failed job. Closing the terminal, a dropped SSH session or kill stops a per-step run the same way Ctrl-C does: Snakemake cancels the jobs it submitted, so none is left running unattended. To survive a disconnect, run inside tmux or screen, or use one allocation. Resume with --mode resume, which unlocks the project and repeats incomplete steps. A failed job is submitted again execution.retries times with more walltime; a genuine tool error fails again and stops that branch while independent steps continue.
bulkseq run -C PATH --exec-profile slurm --mode resumeThe exit status is that of a local run: 0 on success, 2 for a usage error, 3 when the project, its configuration or this host cannot be used, 5 when the workflow fails and 130 when interrupted. Exit codes and statuses lists each with what to do next.
Troubleshooting#
Use this table when a launch warning, a job state or an error message does not match what you expected. Find the message in the first column.
| What you see | Cause | What to do |
|---|---|---|
'sbatch' is not on PATH, exit 3 | The command runs on a workstation, or Slurm’s commands are not loaded. | Run it on the login node; load the site’s Slurm module if it has one. |
executor plugin … cannot be imported, exit 3 | The environment predates 0.36.0 or is incomplete. | Rerun bash scripts/setup_wsl_bioenv.sh bulkseq full from this release’s checkout. |
| The setup says it installs from the floating spec, not the lock | The host’s glibc is older than 2.28, or it is not linux-64. | Use the Apptainer image, whose environment is the pinned one. |
Invalid account or account/partition combination | The account is missing, wrong or closed. | Set execution.slurm_account to an open project. |
| A launch warning names a step that asks for more than the partition’s nodes | That step’s memory, CPUs or walltime exceed the partition. | Lower it, or place the step elsewhere with execution.rule_resources.<step>.slurm_partition. |
Jobs stay PENDING with reason Resources or a memory limit | A job asks for more than any free node offers. | Lower rule_memory_gb or rule_threads for that step, or choose another partition. |
Jobs pend with AssocGrpCPUMinutesLimit or AssocGrpCpuLimit | The project’s core-hour quota or concurrent-core limit is reached. | Wait, lower execution.jobs, or ask the centre for more. |
| A partition refuses jobs below a core count | The partition has a minimum per job. | Set execution.min_cpus_per_job, or use one allocation. |
A job ends TIMEOUT | The step needed longer than its walltime. | Raise rule_runtime_min.<step> or execution.default_runtime_min, then resume. |
A job ends OUT_OF_MEMORY | The step needed more than it requested. | Raise rule_memory_gb.<step>, or execution.default_mem_mb for a step without one, then resume. |
limitGenomeGenerateRAM … is too small from STAR | The index build needs more memory than the step reserves. | Raise rule_memory_gb.star_index; the STAR limit follows it. |
samtools index fails with a region too large for BAI | A chromosome exceeds 512 Mb and the genome was not recognised as long. | Set reference.bam_index csi. |
| A download or enrichment step cannot connect | The host running it has no outbound access. | Keep network_rules_on_submit_host true and run from a login node with internet, or stage inputs in advance. |
| Output files are reported missing after a job succeeded | The shared filesystem showed them late. | Raise execution.latency_wait_s. |
slurm_extra may not set --qos | The executor or a dedicated setting manages that option. | Use execution.slurm_qos (likewise slurm_constraint, slurm_clusters). |
The project refuses to run after an edit under workflow/ | The recorded workflow digest no longer matches. | Restore the copied workflow and put the setting in execution instead. |
Kubernetes#
The kubernetes profile is a starting point, not a supported route. Its executor plugin is not part of the environment, and every pod would need a container image carrying the full tool stack. bulkseq run --exec-profile kubernetes exits 3 while the plugin is missing; it cannot detect a missing image. Read workflow/profiles/site/kubernetes/config.yaml before attempting it.
What has been verified#
Use this section to see what the cluster support has and has not been tested against. Both modes were run on a single-node Slurm 23.11 test cluster with job accounting, under WSL2 (Ubuntu 24.04), on a synthetic 3-versus-3 paired-end project. Per-step mode submitted 53 jobs, all of which completed; sacct shows the configured partition, account, QOS, job-name prefix and the two-CPU minimum on every job, and the step placed through rule_resources carried its extra option. Single-allocation mode ran the whole offline part of the same project in one job and a login-node run finished the remainder; a script submitted from another directory logged into the project, a job stopped part-way resumed when submitted again, and the online stage followed by a job submitted with all finished a project. The count matrix and the DESeq2 table of the local, per-step and single-allocation runs are byte-identical. A hangup signal to a per-step run cancelled its 14 queued jobs. A project finished under 0.36.0, upgraded, saved by the interface and given new scheduling settings had nothing to rerun. The revised lock installed in that environment, changing only the two header packages, and solves in a dry run for glibc 2.28, 2.34 and 2.39. CSI indexing under the .bai name was checked with samtools 1.22.1 and pysam on a 600 Mb synthetic sequence. In 0.36.0 the same test cluster ran synthetic FASTQ and count-matrix projects in 54 and 16 jobs with results identical to local runs. No production cluster has been used. The Apptainer image is built and self-tested by the Environment CI workflow only, never run under a cluster’s Apptainer. Kubernetes execution has not been tested.