will hang until 2 CPU cores are available, while the 2 tasks are independent I would like one to start proceeding on the single CPU core available. How to do that?
Jun 3, 1:26pm
To achieve your goal—running two independent tasks on a Slurm node with only 2 CPU cores, but allowing one task to start immediately if only 1 core is available—you need to adjust your resource request to avoid the strict "all-or-nothing" behavior of --cpus-per-task and --ntasks.
--ntasks-per-core=1 tells Slurm to pack tasks as tightly as possible on available cores.
This allows one task to start if only 1 core is free, and the second task will start when another core becomes available.
Alternative: Use --overcommit
If you want to force Slurm to start tasks even if resources are oversubscribed (not recommended for CPU-bound tasks, but useful for I/O-bound or lightweight tasks):
--overcommit allows Slurm to ignore strict resource limits and start tasks immediately, even if it means oversubscribing cores.
Key Takeaways
--ntasks-per-core=1
Packs tasks tightly, starts as many as possible with available cores
Best for independent, lightweight tasks
--overcommit
Forces immediate start, may oversubscribe cores
Useful for I/O-bound or non-CPU-intensive tasks
Recommendation: Use --ntasks-per-core=1 for your case. It respects Slurm's resource management while allowing tasks to start as soon as cores are free.
Jun 3, 1:26pm
This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.