to the number provided by the
The
Example
Example
$ bsub -n4 -I mpirun -srun ./hello_world
Job <24> is submitted to default queue <normal>. <<Waiting for dispatch ...>>
<<Starting on lsfhost.localdomain>> Hello world!
Hello world! I'm 1 of 4 on host1 Hello world! I'm 3 of 4 on host2 Hello world! I'm 0 of 4 on host1 Hello world! I'm 2 of 4 on host2
You can use the
Example
Example
$ bsub
<<Waiting for dispatch ...>> <<Starting on lsfhost.localdomain>> Hello world!
Hello world! I'm 1 of 4 on host1 Hello world! I'm 2 of 4 on host2 Hello world! I'm 3 of 4 on host3 Hello world! I'm 4 of 4 on host4
Some preprocessing may need to be done:
•If the MPI job requires the use of an appfile
•If there is another reason that prohibits the use of the srun command as the task launcher
This preprocessing should determine the node hostnames to which mpirun's standard task launcher should launch the tasks. In such scenarios, you need to write a batch script; there are several methods available for determining the nodes in an allocation. One method is to use the SLURM_JOBID environment variable with the squeue command to query the nodes. Another method is to use the
Submitting a Batch Job or Job Script
Use the following bsub command format to submit a batch job or job script:
bsub -n num-procs [bsub-options] script-name
The
The
The script will execute once on the first allocated node, and the srun or mpirun commands within the script will be run on the allocated compute nodes.
Submitting a Batch Job or Job Script | 49 |