Setting Up a MPI Compiler

The Message Passing Interface (MPI) compilers installed in the Linux cluster can be found in /usr/usc/mpich/default. The compilers with the prefix ‘mx’ generate code that use the Myrinet interconnects.

When logging in, source the setup.csh or setup.sh of the specific MPI compiler that you want to use. You do not need to source any other setup file if you are going to use an MPI compiler. The various environment and path variables are preset when you source the setup.csh file.

For example, if you want to use the default compiler with the tcsh or csh shell, you would type:

source /usr/usc/mpich/default/setup.csh

or if you want to use the default compiler with the bash or sh shell, you would type:

source /usr/usc/mpich/default/setup.sh

The default compiler is the Myrinet version of the GCC compiler.

If you wish to use the same compiler repeatedly, you can include the above source command line to your shell startup file (.login or .bash_profile) so that you do not have to source it manually every time you login.