[slurm-users] How do I set SBATCH_EXCLUSIVE to its default value?

296 views
Skip to first unread message

Carl Ponder

unread,
May 19, 2023, 6:37:06 AM5/19/23
to slurm...@lists.schedmd.com

The SBATCH_EXCLUSIVE environment-variable is supposed to be equivalent to using the --exclusive flag on the command-line or in the sbatch-header

--exclusive[={user|mcs}]
The job allocation can not share nodes with other running jobs (or just other users with the "=user" option or with the "=mcs" option). If user/mcs are not specified (i.e. the job allocation can not share nodes with other running jobs), the job is allocated all CPUs and GRES on all nodes in the allocation, but is only allocated as much memory as it requested. This is by design to support gang scheduling, because suspended jobs still reside in memory. To request all the memory on a node, use --mem=0. The default shared/exclusive behavior depends on system configuration and the partition's OverSubscribe option takes precedence over the job's option. NOTE: Since shared GRES (MPS) cannot be allocated at the same time as a sharing GRES (GPU) this option only allocates all sharing GRES and no underlying shared GRES.

NOTE: This option is mutually exclusive with --oversubscribe.

SBATCH_EXCLUSIVE
Same as --exclusive
I get that these correspond

--exclusive=user        export SBATCH_EXCLUSIVE=user
--exclusive=mcs         export SBATCH_EXCLUSIVE=mcs

But --exclusive has a default behavior if I don't assign it a value. What do I set SBATCH_EXCLUSIVE to, to get the same default behavior?


Jeffrey T Frey

unread,
May 19, 2023, 11:13:57 AM5/19/23
to Slurm User Community List
> I get that these correspond
>
> --exclusive=user export SBATCH_EXCLUSIVE=user
> --exclusive=mcs export SBATCH_EXCLUSIVE=mcs
> But --exclusive has a default behavior if I don't assign it a value. What do I set SBATCH_EXCLUSIVE to, to get the same default behavior?


Try setting the env var to an empty string:


export SBATCH_EXCLUSIVE=""
Reply all
Reply to author
Forward
0 new messages