Note:

If you exported any variables, such as SLURM_JOBID and SLURM_NPROCS, be sure to unset them as follows before submitting any further jobs from the second terminal:

$ unset SLURM_JOBID

$ unset SLURM_NPROCS

You do not need to launch the /bin/bash shell to be able to interact with any compute node resources; any running job will suffice. This is excellent for checking on long-running jobs. For example, if you had submitted a CPU-intensive job, you could execute the uptime command on all nodes in the allocation to confirm an expected high load on the nodes. The following is an example of this; the LSF JOBID is 200 and the SLURM JOBID is 250:

$ srun --jobid=250 uptime

If you are concerned about allocating the resources too long or leaving them allocated long after you finished using them, you could submit a simple sleep job to limit the allocation time, as follows:

$ bsub -n4 -ext "SLURM[nodes=4]" -o %J.out sleep 300 Job <125> is submitted to the default queue <normal>.

After you confirm that this job is running using the bjobs -l 125 command, you can operate interactively for with the resources. If LSF observes no SLURM activity within the allocation after 5 minutes, it terminates the job. Any existing SLURM activity (including running MPI jobs with the mpirun -sruncommand) is allowed to continue.

10.14 LSF Equivalents of SLURM srun Options

Table 10-3describes the srun options and lists their LSF equivalents.Table 10-3 LSF Equivalents of SLURM srun Options

srun Option

Description

LSF Equivalent

-n

Number of processes (tasks) to run.

bsub -n num

--ntasks=ntasks

 

 

 

 

 

-c

Specifies the number of cores per task.

HP XC does not provide this option because

--processors-per-task=ntasks

Min processors per node =

the meaning of this option can be covered by

 

MAX(ncpus, mincpus)

bsub -n and mincpus=n.

-N

Specifies the minimum and, optionally,

-ext "SLURM[nodes=minmax]"

--nodes=min[-max]

maximum number of nodes allocated

where minmax is min[-max]

 

to job. The job allocation will contain

 

 

at least the minimum number of nodes.

 

 

 

 

--mincpus=n

Specifies the minimum number of

-ext "SLURM[mincpus=n]"

 

cores per node. Min processors per

 

 

node = MAX(-c ncpus, --mincpus=n).

 

 

Default value is 1.

 

 

 

 

--mem=MB

Specifies a minimum amount of real

-ext "SLURM[mem=MB]"

 

memory of each node. By default, job

 

 

does not require -ext.

 

 

 

 

--tmp=MB

Specifies a minimum amount of

-ext "SLURM[tmp=MB]"

 

temporary disk space of each node. By

 

 

default, job does not require -ext.

 

-C

--constraint=list

Specifies a list of constraints. The list -ext "SLURM[constraint=list]" may include multiple features

separated by the & character (meaning ANDed) or the (meaning ORed). By default, job does not require -ext.

10.14 LSF Equivalents of SLURM srun Options 103