Running MPI on K42 at Watson for one node (see end for multiple nodes)
You need a few modifications on the default k42 tree in order to run mpi. Here are the steps (also see end for running with multiple nodes):
1. mount the mpi directory by adding the following line to your K42Nfs 9.2.208.204 /opt/lam-mpi-gentoo /opt/lam-mpi-gentoo
2. You have to use linux source tree linux-027. This has been the default since May 23rd. Whenever you want to change, edit the definition of LINUXSRCROOT in MakePath.proto. Important:: From DilmaDaSilva's experience, it seems you should do a build from scratch (remove your powerpc/install directories) after changing the linux source tree.
3. Build your tree.
4. Boot K42.
5. Run mpi:
LAM-MPI comes with a set of examples; if can copy then from /u/dilma/k42-home/mpi/examples, or just use the pre-built ones in /opt/lam-mpi-gentoo/examples.
Build the examples on kxs3 or kxs5, for example:
cd examples/hello mpicc -o hello hello
Run there to see if things are ok, for example mpirun C hello
- rlogin in the system
- setup the environment:
export PATH=/opt/lam-mpi-gentoo/bin:$PATH export LAMHOME=/opt/lam-mpi-gentoo export MANPATH=/opt/lam-mpi-gentoo/man:$MANPATH
run lamboot (but see below for multiple nodes)
- go to whetever directory contains the example you want to run
- run the example, for example hello:
mpirun C hello
To run on multiple nodes
Instead of running lamboot do the following two steps:
1. Create a hostfile that contains the machines's numerical ip addresses
- example: (numerical addresses are needed when doing this in k42)
echo 9.2.X.Y > hostfile
echo 9.2.X.Z >> hostfile
2. Run lamboot by:
- LAMRSH=ssh lamboot -ssi boot rsh hostfile
