•exclude=
•contiguous=yes
The srun(1) manpage provides details on these options and their arguments.
The following are interactive examples showing how these options can be used on an HP XC system.
•To launch the hostname command on 10 cores in parallel:
$ bsub -n 10 -I srun hostname
•To launch the hostname command on 10 nodes in parallel:
$ bsub -n 10 -ext "SLURM[nodes=10]" -I srun hostname
•To launch the hostname command on 10 nodes in parallel, but avoiding node n16:
$ bsub -n 10 -ext "SLURM[nodes=10;exclude=n16]" -I srun hostname
•To launch the hostname command on 10 cores on nodes with a dualcore SLURM feature assigned to them:
$ bsub -n 10 -ext "SLURM[constraint=dualcore]" -I srun hostname
•To launch the hostname command once on nodes n1 through n10
$ bsub -n 10 -ext "SLURM[nodelist=n[1-10]]" srun hostname
•To determine the external SLURM scheduler options that apply to jobs submitted to the LSF dualcore queue:
$ bqueues -l dualcore grep SLURM
MANDATORY_EXTSCHED: SLURM[constraint=dualcore]
Notes on
The following are noteworthy items for users of
•A SLURM partition named lsf is used to manage
•
The total number of cores listed by the lshosts and bhosts commands for that host should be equal to the total number of cores assigned to the SLURM lsf partition.
•When a job is submitted and the resources are available,
SLURM_JOBID This environment variable is created so that subsequent srun commands make use of the SLURM allocation created by
$ squeue --jobs $SLURM_JOBID
"Translating SLURM and
SLURM_NPROCS This environment variable passes along the total number of tasks requested with the bsub
•Use the bjobs
•Use the bkill command to kill jobs.
72 Using LSF