To interactively launch a test MPICH program on two processors:
Create a file in your home directory named machines, and put two entries in it, such as:
compute-0-0 compute-0-1 |
Compile a test program using the MPICH environment:
$ cd $HOME $ mkdir mpich-test $ cd mpich-test $ cp /opt/mpi-tests/src/mpi-ring.c . $ /opt/mpich/gnu/bin/mpicc -o mpi-ring mpi-ring.c -lm |
Now launch the job from the frontend:
$ ssh-agent $SHELL $ ssh-add $ /opt/mpich/gnu/bin/mpirun -nolocal -np 2 -machinefile $HOME/machines \ $HOME/mpich-test/mpi-ring |
You must run MPI programs as a regular user (that is, not root). If you don't have a user account on the cluster, create one for yourself, and propogate the information to the compute nodes with:
|