HP XC System Software User's Guide Version 3.2

bsub -n num-procs [bsub-options] srun [srun-options] jobname [job-options]
The bsub command submits the job to LSF-HPC.
The -n num-procs parameter, which is required for parallel jobs, specifies the number of cores
requested for the job. The num-procs parameter may be expressed as minprocs[,maxprocs]
where minprocs specifies the minimum number of cores and the optional value maxprocs
specifies the maximum number of cores.
The SLURM srun command is required to run jobs on an LSF-HPC node allocation. The srun
command is the user job launched by the LSF bsub command. SLURM launches the jobname
in parallel on the reserved cores in the lsf partition.
The jobname parameter is the name of an executable file or command to be run in parallel.
Example 5-5 illustrates a non-MPI parallel job submission. The job output shows that the job
srun hostname” was launched from the LSF execution host lsfhost.localdomain, and
that it ran on 4 cores from the compute nodes n1 and n2.
Example 5-5 Submitting a Non-MPI Parallel Job
$ bsub -n4 -I srun hostname
Job <21> is submitted to default queue <normal>
<<Waiting for dispatch ...>>
<<Starting on lsfhost.localdomain>>
n1
n1
n2
n2
You can use the LSF-SLURM external scheduler to specify additional SLURM options on the
command line. As shown in Example 5-6, it can be used to submit a job to run one task per
compute node (on SMP nodes):
Example 5-6 Submitting a Non-MPI Parallel Job to Run One Task per Node
$ bsub -n4 -ext "SLURM[nodes=4]" -I srun hostname
Job <22> is submitted to default queue <normal>
<<Waiting for dispatch ...>>
<<Starting on lsfhost.localdomain>>
n1
n2
n3
n4
5.3.2 Submitting a Parallel Job That Uses the HP-MPI Message Passing Interface
Use the following format of the LSF bsub command to submit a parallel job that makes use of
HP-MPI:
bsub -n num-procs [bsub-options] mpijob
The bsub command submits the job to LSF-HPC.
The -n num-procs parameter, which is required for parallel jobs, specifies the number of cores
requested for the job.
The mpijob argument has the following format:
mpirun [mpirun-options] [-srun] [srun-options] [mpi-jobname] [job-options]
See the mpirun(1) manpage for more information on this command.
The mpirun command's -srun option is required if the MPI_USESRUN environment variable
is not set or if you want to use additional srun options to execute your job.
56 Submitting Jobs