3.3. Launching parallel jobs

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
Here we ask for 4 nodes and mpiexec will pick up the nodelist from the queueing system and start the job on the correct nodes.