How to submit an MPI parallel job
This article explains the submission of an MPI parallel job to LOTUS. It covers:
- What is an MPI parallel job?
- MPI implementation and LSF
- Parallel MPI job submission
What is an MPI parallel job?
An MPI parallel job runs on more than one core and more than one host using the Message Passing Interface (MPI) library for communication between all cores. A simple script, such as the one given below "my_script_name.bsub"
# MPI myname #BSUB -cwd /home/user/work #BSUB -q par-multi #BSUB -n 36 #BSUB -W 00:30 #BSUB -o %J.lo #BSUB -e %J.err # Load any environment modules (needed for mpi_myname.exe) module load libfftw/intel/3.2.2_mpi # Submit the job using mpirun.lotus ./mpi_myname.exe
-n refers to the number of processors or cores you wish to run on. The rest of the
#BSUB input options, and many more besides, can be found in the
bsub manual page or in the related articles.
mpirun.lotus is a wrapper around the native Platform MPI
mpirun command that ensures the use of the special LSF launch mechanism (
blaunch) and forces the MPI communications to run over the private MPI network.
To submit the job, do not run the script, but rather use it as the standard input to bsub, like so:
$ bsub -x < my_script_name
-x flag is used to group the parallel jobs on to the smallest number of hosts.
MPI implementation and LSF
module load pgi mpif90
module load intel-compiler mpicc