Subsections


8.9 Which MPI do you want to use?

Starting with the OSCAR 1.3 series, there is a generalized mechanism to both set a system-level default MPI implementation, and also to allow users to override the system-level default with their own choice of MPI implementation.

This allows multiple MPI implementations to be installed on an OSCAR cluster (e.g., LAM/MPI and MPICH), yet still provide unambiguous MPI implementation selection for each user such that ``mpicc foo.c -o foo'' will give deterministic results.

8.9.1 Setting the system-level default

The system-level default MPI implementation can be set in two different (yet equivalent) ways:

  1. During the OSCAR installation, the GUI will prompt asking which MPI should be the system-level default. This will set the default for all users on the system who do not provide their own individual MPI settings.

  2. As root, execute the command:

      # switcher mpi --list
    

    This will list all the MPI implementations available. To set the system-level default, execute the command:

      # switcher mpi = name --system
    

    where ``name'' is one of the names from the output of the -list command.

NOTE: System-level defaults for switcher are currently propogated to the nodes on a periodic basis. If you set the system-level MPI default, you will either need to wait until the next automatic ``push'' of configuration information, or manually execute the /opt/opium/bin/sync_users command to push the changes to the compute nodes.

NOTE: Using the switcher command to change the default MPI implementation will modify the PATH and MANPATH for all future shell invocations - it does not change the environment of the shell in which it was invoked. For example:

  # which mpicc
  /opt/lam-1.2.3/bin/mpicc
  # switcher mpi = mpich-4.5.6 --system
  # which mpicc
  /opt/lam-1.2.3/bin/mpicc
  # bash
  # which mpicc
  /opt/mpich-4.5.6/bin/mpicc

8.9.2 Setting the user-level default

Setting a user-level default is essentially the same as setting the system-level default, except without the -system argument. This will set the user-level default instead of the system-level default:

  $ switcher mpi = lam-1.2.3

Using the special name none will indicate that no module should be loaded for the mpi tag. It is most often used by users to specify that they do not want a particular software package loaded.

  $ switcher mpi = none

Removing a user default (and therefore reverting to the system-level default) is done by removing the default attribute:

  $ switcher mpi --show
  user:default=mpich-1.2.4
  system:exists=true
  $ switcher mpi --rm-attr default
  $ switcher mpi --show
  system:default=lam-6.5.6
  system:exists=true

8.9.3 Use switcher with care!

switcher immediately affects the environment of all future shell invocations (including the environment of scripts). To get a full list of options available, read the switcher(1) man page, and/or run switcher -help.

root 2002-11-08