High Performance Computing

Parallel Compilation and Execution

To test that the parallel work environment works for you there is a very simple test you can do on your clone:

cd ~/EXAMPLE/parallel-score/PMB
make
cd ..
mpisub 4x2 ./PMB

This compiles and submits a standard benchmark test. The mpisub 4x2 is a script that will request 4 nodes with 2 processors per node, generate the SGE script, and submit it for you all in one go. Perform this very simple test just to check that your parallel environment works for you, or indeed if you need a simple test to revert back to. Other things to note from this run is that it will have generated a couple of extra files ending in .pe and .po (parallel error and output files).

Normally, to compile your code in a serial environment with the f77 compiler one issues f77 mycode.f. If you now want to compile a piece of code for parallel execution just prepend that with mpi: mpif77 mycode.f. Thus, to proceed with compiling your own code you can use mpif77, mpif90, mpicc, mpiCC, mpic++ compilers when compiling. The default compiler for each of these is the GNU compiler; so mpif77 uses the g77 compiler. To submit it to the cluster just issue mpisub Nx2 a.out where N is the number of nodes you would like ( you will therefor be using 2N processors, as there are 2 processors per node).

If you would like to use the PGI f77 compiler, then do mpif77 -compiler pgi, or for PathScale, mpif77 -compiler pathsc.