The preferred way of launching mpi jobs is to use the mpiexec utility, it uses the tm-interface of PBS to start the jobs, which is a lot faster than mpirun that uses ssh to start jobs on the nodes. Applications must be linked with the mpi library in /opt/mpich/gnu/ for mpiexec to be able to start them. Here is an example:
$ cat parallel-jobscript.sh #!/bin/bash #PBS -lwalltime=0:10:0 #PBS -lnodes=4 echo starting mpiexec some-mpi-app echo ending |