User guide
4–Running MPI on QLogic Adapters
Open MPI
IB0054606-02 A 4-17
Setting MCA Parameters
The -mca switch allows the passing of parameters to various Modular Component
Architecture (MCA) modules. MCA modules have direct impact on MPI programs
because they allow tunable parameters to be set at run time (such as which BTL
communication device driver to use, what parameters to pass to that BTL, and so
on.).
The -mca switch takes two arguments: key and value. The key argument
generally specifies which MCA module will receive the value. For example, the
key btl is used to select which BTL to be used for transporting MPI messages.
The value argument is the value that is passed. For example:
mpirun -mca btl tcp,self -np 1 foo
Tells Open MPI to use the tcp and self BTLs, and to run a single copy of foo an
allocated node.
mpirun -mca btl self -np 1 foo
Tells Open MPI to use the self BTL, and to run a single copy of foo an allocated
node.
The -mca switch can be used multiple times to specify different key and/or
value arguments. If the same key is specified more than once, the values are
concatenated with a comma (",") separating them.
Note that the -mca switch is simply a shortcut for setting environment variables.
The same effect may be accomplished by setting corresponding environment
variables before running mpirun. The form of the environment variables that
Open MPI sets is:
OMPI_MCA_key=value
Thus, the -mca switch overrides any previously set environment variables. The
-mca settings similarly override MCA parameters set in these two files, which are
searched (in order):
1. $HOME/.openmpi/mca-params.conf: The user-supplied set of values
takes the highest precedence.
2. $prefix/etc/openmpi-mca-params.conf: The system-supplied set
of values has a lower precedence.