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