Running MPICH
From Bootable Cluster CD
MPICH is usually the default...
Good news! At the time of this writing, the BCCD is already set up with MPICH as the default environment. On other systems, or to double check, to find out if MPICH is your default environment, issue the command:
which mpirun
If it comes back saying:
/mpich/bin/mpirun
then that means you are good to go and can skip to the next part! But if you received any other result, you must read on.
If not...
Edit the User's Path Variable
We need to set the bccd user's PATH setting to point to the MPICH binaries. To do this, we need to modify the PATH seting in the bccd user's .bashrc file:
vi ~/.bashrc
Look for the line that starts with:
export PATH=(something...)
and change it to read:
export PATH=$PATH:/mpich/bin
Allow the Changes to Take Effect
Log out of every shell, or source your .bashrc. Changes in your .bashrc settings do not take effect immediately. These changes will "stick" the next time you log in, or if you do what is referred to as "sourcing your .bashrc file". So you will have to do one of the following actions:
- Shutdown X and/or log out of every shell. Then log back in.
- Or issue
. ~/.bashrc
Once Again...
Once again, issue:
which mpirun
and if everything went a-ok you should get:
/mpich/bin/mpirun
Now go on!
Compiling and Running an MPI Program
Now that your environment is set, click on Compiling and Running to learn how to run a sample MPI program. Or, take a look at some MPICH debuggers, such as Debugging with MPE or Debugging with Upshot. Remember, all the example MPICH programs are in the directory ~/mpich/examples/, and are ready to be run after a simple make command!

