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