
ifort myMPIcode.f -lmpi icc myMPIcode.c -lmpi
Once the executable is compiled, a job script will need to be created for PBS. Here is a sample command script, parallel.cmd, which uses 8 CPUs.
cd mpi_directory
cat parallel.cmd
# parallel job using 8 processors. Runs for 4 hours (max).
#PBS -l ncpus=8,walltime=4:00:00
#
# sends mail if the process aborts, when it begins, and
# when it ends (abe). Make sure you define your email
# address as it will just get sent to the local machine
# without this.
#
#PBS -m abe
#PBS -M yourname@princeton.edu
#
cd /home/bill/mpi_directory
mpirun -np 8 ./a.out
To submit the job to the batch system, use:
qsub parallel.cmd
Please note: There is only 4G of memory per CPU. If you need memory
greater than this you'll need to modify the number of CPUs (ncpus) to
reflect exactly what you need.
Useful Tools
showbf - shows how many nodes are available and for how long
diagnose -p - shows the priority assigned to queued jobs
showq - shows jobs in the queues
xpbs - a graphical display of the queues
Last change Mar-02-2007 wgw