ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
vendor.m
Go to the documentation of this file.
1%> \brief
2%> Return the MPI library vendor name from the input MPI name based
3%> on the internal ParaMonte shared libraries naming conventions.<br>
4%>
5%> \param[in] name : The output scalar MATLAB string containing the MPI
6%> library name corresponding to the output MPI ``vendor``.<br>
7%> If the input ``name`` is not supported, the default
8%> string ``"mpi"`` is returned as the value of ``str``.<br>
9%> Possible values are:<br>
10%> <ol>
11%> <li> ``"mpi"`` : The corresponding output vendor name ``txt`` would be unknown and set to ``"MPI"``.<br>
12%> <li> ``"impi"`` : The corresponding output vendor name ``txt`` would be set to ``"Intel"``.<br>
13%> <li> ``"mpich"`` : The corresponding output vendor name ``txt`` would be set to ``"MPICH"``.<br>
14%> <li> ``"openmpi"`` : The corresponding output vendor name ``txt`` would be set to ``"OpenMPI"``.<br>
15%> </ol>
16%> Note that **all values are case-insensitive**.<br>
17%>
18%> \return
19%> ``str`` : The output scalar MATLAB string, containing the MPI
20%> library vendor name supported by the ParaMonte library.<br>
21%> Possible values are:<br>
22%> <ol>
23%> <li> ``"MPI"``, representing an unknown MPI library vendor.
24%> <li> ``"Intel"``, representing the Intel MPI library vendor.
25%> <li> ``"MPICH"``, representing the MPICH MPI library vendor.
26%> <li> ``"OpenMPI"``, representing the OpenMPI library vendor.
27%> </ol>
28%>
29%> \interface{vendor}
30%> \code{.m}
31%>
32%> str = pm.lib.mpi.vendor(name)
33%>
34%> \endcode
35%>
36%> \see
37%> [pm.lib.mpi.name()](@ref name)<br>
38%> [pm.lib.mpi.vendor()](@ref vendor)<br>
39%> [pm.sys.path.mpiexec.vendor()](@ref vendor)<br>
40%>
41%> \example{vendor}
42%> \include{lineno} example/lib/mpi/vendor/main.m
43%> \output{vendor}
44%> \include{lineno} example/lib/mpi/vendor/main.out.m
45%>
46%> \final{vendor}
47%>
48%> \author
49%> \JoshuaOsborne, May 21 2024, 7:20 PM, University of Texas at Arlington<br>
50%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
51%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin<br>
52function str = vendor(name)
53 if nargin < 1
54 name = [];
55 end
56 if isempty(name)
57 help("pm.lib.mpi.vendor");
58 disp("name");
59 disp( name );
60 error ( newline ...
61 + "The input argument ``name`` must be present and non-empty." + newline ...
62 + "For more information, see the documentation displayed above." + newline ...
63 + newline ...
64 );
65 end
66 nameLower = lower(string(name));
67 for i = length(nameLower) : -1 : 1
68 if strcmp(nameLower(i), "openmpi") || strcmp(nameLower(i), "open-mpi") || strcmp(nameLower(i), "ompi")
69 str(i) = "OpenMPI";
70 elseif strcmp(nameLower(i), "mpich") || strcmp(nameLower(i), "mmpi")
71 str(i) = "MPICH";
72 elseif strcmp(nameLower(i), "intel") || strcmp(nameLower(i), "impi")
73 str(i) = "Intel";
74 else
75 str(i) = "MPI";
76 end
77 end
78end
function name(in vendor)
Return the MPI library name as used in naming the ParaMonte MATLAB shared library directories.
function vendor(in name)
Return the MPI library vendor name from the input MPI name based on the internal ParaMonte shared lib...
function impi()
Return the MPI image count and the current image ID (e.g., MPI rank + 1) if the application has been ...
function lib()
Return a scalar MATLAB string containing the path to the lib directory of the ParaMonte library packa...