|
Open MPI’s MPI_T interface - General information DESCRIPTIONThere are a few Open MPI-specific notes worth mentioning about its MPI_T interface implementation. MPI_T Control VariablesOpen MPI’s implementation of the MPI_T Control Variable (“cvar”) APIs is an interface to Open MPI’s underlying Modular Component Architecture (MCA) parameters/variables. Simply put: using the MPI_T cvar interface is another mechanism to get/set Open MPI MCA parameters. In order of precedence (highest to lowest), Open MPI provides the following mechanisms to set MCA parameters:
MPI initializationAn application may use the MPI_T interface before MPI is initialized to set MCA parameters. Setting MPI-level MCA parameters before MPI is initialized may affect how MPI is initialized (e.g., by influencing which frameworks and components are selected). The following example sets the pml and btl MCA params before invoking MPI_Init in order to force a specific selection of PML and BTL components: int provided, index, count;
MPI_T_cvar_handle pml_handle, btl_handle;
char pml_value[64], btl_value[64];
MPI_T_init_thread(MPI_THREAD_SINGLE, &provided);
MPI_T_cvar_get_index("pml", &index);
MPI_T_cvar_handle_alloc(index, NULL, &pml_handle, &count);
MPI_T_cvar_write(pml_handle, "ob1");
MPI_T_cvar_get_index("btl", &index);
MPI_T_cvar_handle_alloc(index, NULL, &btl_handle, &count);
MPI_T_cvar_write(btl_handle, "tcp,vader,self");
MPI_T_cvar_read(pml_handle, pml_value);
MPI_T_cvar_read(btl_handle, btl_value);
printf("Set value of cvars: PML: %s, BTL: %s\n",
Note that once MPI is initialized, most Open MPI cvars become read-only. For example, after MPI is initialized, it is no longer possible to set the PML and BTL selection mechanisms. This is because many of these MCA parameters are only used during MPI initialization; setting them after MPI has already been initialized would be meaningless, anyway. MPI_T CategoriesOpen MPI’s MPI_T categories are organized hierarchically:
SEE ALSO:
COPYRIGHT2003-2025, The Open MPI Community
|