Hi Alfonso,

"Pardo Diaz, Alfonso"
<[email protected]> writes:

> Hi, 
>
> I am trying to understand how to use the parameter “--exclusive” with sbatch.
> At first, I will explain my scenario:
>
> 2 Nodes with 12 cores and 2 CUDA cards per node:
>
> Now if I run:
>
> First I send job1: sbatch -N 1 --ntasks-per-node=4 --gres=gpu:2 ./my.job.sh —>
> It run in Node1 (OK!)
> Then I send job2: sbatch -N 1 --ntasks-per-node=8 --exclusive ./my_job.sh —> 
> it
> run in Node2 (OK!)
> Finally I send job3: sbatch -N 1 --ntasks-per-node=8 --exclusive ./my_job.sh 
> —>
> it run in Node1 with the job1!!! 
>
> Why my job3 is running in the Node1 if I want a exclusive node for the job3??
>
> Thanks in advance.
>
> Alfonso Pardo
> CETA-CIemat

You may be misunderstanding the purpose of the option --exclusive.  It
means that no other job can run on the nodes assigned to the job, even
if some cores are unused.  It doesn't affect which nodes are assigned.
See this extract from 'man sbatch':

  --exclusive[=user]

      The job allocation can not share nodes with other running jobs (or
      just other users with the "=user" option).  The default
      shared/exclusive behavior depends on system configuration and the
      partition’s Shared option takes precedence over the job’s option.

If you want to restrict a job to a certain set of nodes, you need to use
--nodelist:

   -w, --nodelist=<node name list>
       
       Request a specific list of hosts.  The job will contain all of
       these hosts and possibly additional hosts as needed to satisfy
       resource requirements.  The list may be specified as a
       comma-separated list of hosts, a range of hosts (host[1-5,7,...]
       for example), or a file- name.  The host list will be assumed to
       be a filename if it contains a "/" character.  If you specify a
       minimum node or processor count larger than can be satisfied by
       the supplied host list, additional resources will be allocated on
       other nodes as needed.  Duplicate node names in the list will be
       ignored.  The order of the node names in the list is not
       important; the node names will be sorted by Slurm.

Cheers,

Loris

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin         Email [email protected]

Reply via email to