3.7. How to execute a MPI job

3.7.1. Description

Intel MPI is available on all servers for MPI environment. In addition, nvhpc’s Open MPI is also available on the XD670.

3.7.2. Usage(IntelMPI)

Use mpirun command to execute a job.

mpirun [ -np parallel number] [ -ppn parallel number per node ] program

Attention

To improve job performance, specify values so that:

[Parallel number(the value of “-np”)] = [Number of nodes(the value of “#PBS -l select=”)] ×[Parallel number per node(the value of “-ppn”)]

3.7.3. Example

#!/bin/bash
#PBS -l select=1

cd $PBS_O_WORKDIR

module load oneapi 2> /dev/null
mpirun -np 56 /work/app/ABINIT/abinit-10.2.7_cpu/bin/abinit < input.files > result.out 2> result.err

3.7.4. Usage(OpenMPI)

Use mpirun command to execute a job.

mpirun [ -np parallel number] [ -N parallel number per node ] -hostfile $PBS_NODEFILE -x LD_LIBRARY_PATH -x HCOLL_MAIN_IB=all program

Attention

To improve job performance, specify values so that:

[Parallel number(the value of “-np”)] = [Number of nodes(the value of “#PBS -l select=”)] ×[Parallel number per node(the value of “-N”)]

3.7.5. Example

#!/bin/bash
#PBS -l select=1:ncpus=4:ngpus=4

cd $PBS_O_WORKDIR

module load nvhpc > /dev/null
mpirun -np 4 -N 4 -hostfile $PBS_NODEFILE -x LD_LIBRARY_PATH -x HCOLL_MAIN_IB=all /work/app/VASP6/vasp.6.5.1_gpu/bin/vasp_std > vasp.out 2> vasp.err