Search code examples
parallel-processingmpidistributed-computingopenmpihpc

How to check which MCA parameters are used in OpenMPI?


In the OpenMPI codebase, each module has multiple variants. When calling mpirun, you can select the modules from the Modular Component Architecture (MCA) that you would like to use. The options include...

  • collective algorithms (coll): basic, tuned, inter, cuda, ml, sm, ...
  • byte-transfer layer (btl): openib, tcp, ...
  • point-to-point management layer (pml): cm, ob1, ...
  • matching transport layer (mtl): mxm, psm, ...

You can specify your choice of MCA components like this:

mpirun --mca btl self,openib --mca pml ob1 -np $nProcs ./myprogram


My questions:

  1. If I leave some MCA parameters unspecified, what are the defaults?
  2. Is there a verbose mode that will print all of the MCA components that are being used? (I tried adding -v to my mpirun command, and it didn't print anything extra.)

Solution

  • Depending on the version of Open MPI you have, either ompi_info --param all all (older versions) or ompi_info --all (newer versions) dumps the full list of MCA parameters available. The default values and their source are shown in the list and most of the parameters are also documented. Some MCA parameters only become available if certain other parameters are set. For example, the parameters that control the selection of algorithms for the collective communication operations in the tuned module only become available if one set coll_tuned_use_dynamic_rules to true. To have ompi_info list those too, --mca coll_tuned_use_dynamic_rules true has to be passed to it.

    To have all MCA variables dumped the moment MPI_Init() is called, set mpi_show_mca_params to all. The value of each MCA parameter and where that value comes from are then dumped to the standard error stream.