PlatformMPI

Platform MPI is an implementation of the Message Passing Interface.

Here is an example of how to use Platform MPI to compile and run an example Fortran code which computes PI:

wesley% module load PMPI/modulefile
wesley% cp /opt/platform_mpi/help/compute_pi.f .
wesley% mpif90 -o compute_pi compute_pi.f

Create a job file that contains the following. In this example we will call it: compute_pi.pbs

#!/bin/bash -l

cd $PBS_O_WORKDIR

module load PMPI/modulefile

nprocs=`wc -l < $PBS_NODEFILE`
echo nprocs = $nprocs
echo
echo ----------
echo Nodes are:
cat $PBS_NODEFILE
echo ----------
echo
echo Starting job with version: `which mpirun`

mpirun -np $nprocs -hostfile $PBS_NODEFILE ./compute_pi

Finally, you can submit your job to the queue to be executed. You must specify the number of processors desired and, possibly, how they should be distributed across nodes. For example,
To run on 12 processors on a single node:

wesley%  qsub -l nodes=1:ppn=12 compute_pi.pbs

To run on 12 processors, but distributed such that 6 processors are allocated onto each of two nodes, use:

wesley%  qsub -l nodes=2:ppn=6 compute_pi.pbs