179 lines
4.8 KiB
Groff
179 lines
4.8 KiB
Groff
.\" Man page generated from reStructuredText.
|
||
.
|
||
.TH "MPI_T" "3" "Feb 14, 2025" "" "Open MPI"
|
||
.
|
||
.nr rst2man-indent-level 0
|
||
.
|
||
.de1 rstReportMargin
|
||
\\$1 \\n[an-margin]
|
||
level \\n[rst2man-indent-level]
|
||
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||
-
|
||
\\n[rst2man-indent0]
|
||
\\n[rst2man-indent1]
|
||
\\n[rst2man-indent2]
|
||
..
|
||
.de1 INDENT
|
||
.\" .rstReportMargin pre:
|
||
. RS \\$1
|
||
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
|
||
. nr rst2man-indent-level +1
|
||
.\" .rstReportMargin post:
|
||
..
|
||
.de UNINDENT
|
||
. RE
|
||
.\" indent \\n[an-margin]
|
||
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||
.nr rst2man-indent-level -1
|
||
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
||
..
|
||
.sp
|
||
Open MPI’s MPI_T interface \- General information
|
||
.SH DESCRIPTION
|
||
.sp
|
||
There are a few Open MPI\-specific notes worth mentioning about its MPI_T
|
||
interface implementation.
|
||
.SS MPI_T Control Variables
|
||
.sp
|
||
Open 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.
|
||
.sp
|
||
In order of precedence (highest to lowest), Open MPI provides the
|
||
following mechanisms to set MCA parameters:
|
||
.INDENT 0.0
|
||
.IP 1. 3
|
||
The MPI_T interface has the highest precedence. Specifically: values
|
||
set via the MPI_T interface will override all other settings.
|
||
.IP 2. 3
|
||
The mpirun(1) / mpiexec(1) command line (e.g., via the –mca
|
||
parameter).
|
||
.IP 3. 3
|
||
Environment variables.
|
||
.IP 4. 3
|
||
Parameter files have the lowest precedence. Specifically: values set
|
||
via parameter files can be overridden by any of the other
|
||
MCA\-variable setting mechanisms.
|
||
.UNINDENT
|
||
.SS MPI initialization
|
||
.sp
|
||
An 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 \fIhow\fP MPI is initialized (e.g., by influencing
|
||
which frameworks and components are selected).
|
||
.sp
|
||
The following example sets the pml and btl MCA params before invoking
|
||
\fI\%MPI_Init\fP in order to force a specific selection of PML and BTL
|
||
components:
|
||
.INDENT 0.0
|
||
.INDENT 3.5
|
||
.sp
|
||
.nf
|
||
.ft C
|
||
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\en",
|
||
pml_value, btl_value);
|
||
|
||
MPI_T_cvar_handle_free(&pml_handle);
|
||
MPI_T_cvar_handle_free(&btl_handle);
|
||
|
||
MPI_Init(NULL, NULL);
|
||
|
||
// ...
|
||
|
||
MPI_Finalize();
|
||
|
||
MPI_T_finalize();
|
||
.ft P
|
||
.fi
|
||
.UNINDENT
|
||
.UNINDENT
|
||
.sp
|
||
Note that once MPI is initialized, most Open MPI cvars become read\-only.
|
||
.sp
|
||
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.
|
||
.SS MPI_T Categories
|
||
.sp
|
||
Open MPI’s MPI_T categories are organized hierarchically:
|
||
.INDENT 0.0
|
||
.IP 1. 3
|
||
Layer (or “project”). There are two layers in Open MPI:
|
||
.INDENT 3.0
|
||
.IP \(bu 2
|
||
ompi: This layer contains cvars, pvars, and sub categories related
|
||
to MPI characteristics.
|
||
.IP \(bu 2
|
||
opal: This layer generally contains cvars, pvars, and sub
|
||
categories of lower\-layer constructions, such as operating system
|
||
issues, networking issues, etc.
|
||
.UNINDENT
|
||
.IP 2. 3
|
||
Framework or section.
|
||
.INDENT 3.0
|
||
.IP \(bu 2
|
||
In most cases, the next level in the hierarchy is the Open MPI MCA
|
||
framework.
|
||
.INDENT 3.0
|
||
.IP \(bu 2
|
||
For example, you can find the btl framework under the opal
|
||
layer (because it has to do with the underlying networking).
|
||
.IP \(bu 2
|
||
Additionally, the pml framework is under the ompi layer
|
||
(because it has to do with MPI semantics of point\-to\-point
|
||
messaging).
|
||
.UNINDENT
|
||
.IP \(bu 2
|
||
There are a few non\-MCA\-framework entities under the layer,
|
||
however.
|
||
.INDENT 3.0
|
||
.IP \(bu 2
|
||
For example, there is an mpi section under both the opal and
|
||
ompi layers for general/core MPI constructs.
|
||
.UNINDENT
|
||
.UNINDENT
|
||
.IP 3. 3
|
||
Component.
|
||
.INDENT 3.0
|
||
.IP \(bu 2
|
||
If relevant, the third level in the hierarchy is the MCA
|
||
component.
|
||
.IP \(bu 2
|
||
For example, the tcp component can be found under the opal
|
||
framework in the opal layer.
|
||
.UNINDENT
|
||
.UNINDENT
|
||
.sp
|
||
\fBSEE ALSO:\fP
|
||
.INDENT 0.0
|
||
.INDENT 3.5
|
||
.INDENT 0.0
|
||
.IP \(bu 2
|
||
\fI\%MPI_T_init_thread\fP
|
||
.UNINDENT
|
||
.UNINDENT
|
||
.UNINDENT
|
||
.SH COPYRIGHT
|
||
2003-2025, The Open MPI Community
|
||
.\" Generated by docutils manpage writer.
|
||
.
|