GitHub
11/26/2025, 4:22 PMSLURM allocation: 18 CPUs (--cpus-per-task=18)
Flux resource list: 9 cores available
Result: Tasks requesting >9 CPUs fail
Root Cause: Flux uses hwloc for resource discovery, which honors SLURM's cpuset binding and discovers physical cores only. SLURM's --cpus-per-task allocates logical CPUs (including hyperthreads), creating a 2:1 mismatch.
## Test Results
# SLURM Environment
SLURM_CPUS_ON_NODE: 18
SLURM_JOB_PARTITION: cm4_tiny
# Flux Resource View
flux resource list:
STATE NNODES NCORES NODELIST
free 1 9 cm4r15c01s05
# Nextflow Process Results
Process with cpus=4: ✅ Success
Process with cpus=16: ❌ Failed (exceeds Flux limit)
## Temp Solution for Nextflow Configs
Adjust resourceLimits to account for the hyperthread→physical core conversion:
cpus: System.getenv("SLURM_JOB_PARTITION") == 'cm4_std' ? 112 * System.getenv('SLURM_NNODES').toInteger() / 2 : (System.getenv("SLURM_CPUS_ON_NODE") ? System.getenv("SLURM_CPUS_ON_NODE").toInteger() / 2 : 64),
Explanation:
• cm4_std: 112 logical CPUs per node → 56 physical cores per node
• cm4_tiny: Uses SLURM_CPUS_ON_NODE / 2 for shared allocations
• Default fallback: 32 physical cores
## Possible Alternative Solutions
1. Investigate SLURM binding: Check if --hint=nomultithread affects Flux's hwloc discovery
2. Flux hwloc configuration: May require custom topology XML (not tested)
nf-core/configsGitHub
12/11/2025, 2:33 PM