Setting MCA parameters
IBM Spectrum® MPI gives precedence to parameter values that are set by using the mpirun command. Therefore, a parameter's value that was set by using the mpirun command overrides the same parameter that was previously set as an environment variable or in a text file.
Setting MCA parameters with the mpirun command
mpirun --mca param_name value
mpirun --mca mpi_show_handle_leaks 1 -np 4 a.out
mpirun --mca param "multiple_word_value" ...
Setting MCA parameters as environment variables
OMPI_MCA_param="multiple_word_value"
A csh style
example is:setenv OMPI_MCA_param "multiple_word_value"
The way in which you specify an MCA parameter as an environment variable differs, depending on the shell that you are using.
OMPI_MCA_mpi_show_handle_leaks=1
export OMPI_MCA_mpi_show_handle_leaks
mpirun -np 4 a.out
setenv OMPI_MCA_mpi_show_handle_leaks 1
mpirun -np 4 a.out
Note that if you want to specify a value that includes multiple words, you must surround the value in quotes so that the shell and IBM Spectrum MPI understand that it is a single value.
Setting MCA parameters with a text file
- $HOME/.openmpi/mca-params.conf: This is the user-supplied set of values, which has the highest precedence.
- $prefix/etc/openmpi-mca-params.conf: This is the system-supplied set of values, which has a lower precedence.
# This is a comment
# Set the same MCA parameter as in previous examples
mpi_show_handle_leaks = 1
In MCA parameter files, quotes are not necessary for setting values that contain multiple words. If you include quotes in the MCA parameter file, they will be used as part of the value itself.