2%> Return the ParaMonte-preferred MPI library
vendor name(s)
3%> as used in naming the ParaMonte MATLAB shared libraries
4%> in the order of preference on the current platform.
7%> ``names`` : The output vector of MATLAB strings containing the
8%> the ParaMonte-preferred MPI library
vendor names as
9%> used in naming the ParaMonte MATLAB shared libraries.<br>
14%> names = pm.lib.mpi.choices()
19%> Beware that
this function only verifies the existence of the
20%> relevant MPI-
parallel ParaMonte libraries on the system.<br>
21%> It does not
detect the existence of the relevant MPI
22%> runtime library installations on the system.<br>
25%> \include{lineno} example/
lib/mpi/
choices/main.m
27%> \include{lineno} example/
lib/mpi/
choices/main.out.m
32%> \JoshuaOsborne, May 21 2024, 7:18 PM, University of Texas at Arlington<br>
33%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
34%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
36 bindirs = pm.sys.path.
glob(pm.
lib.path.
lib() + "**pm_sampling*");
37 mpinames = ["mpi", "
impi", "mpich", "openmpi"];
38 names = strings(numel(bindirs), 1);
40 for ibin = 1 : numel(bindirs)
41 [basedir, ~, ~] = fileparts(bindirs(ibin));
42 [basedir, ~, ~] = fileparts(basedir);
43 [~, dirname, ~] = fileparts(
string(basedir)); % This is the library checking mode.
44 [~, dirname, ~] = fileparts(
string(dirname)); % This is the parallelism
name used in the folder naming.
45 if any(strcmp(["mpi", "
impi", "mpich", "openmpi"], dirname))
47 names(iname) =
string(dirname);
48 elseif ~strcmp(["serial", "openmp"], dirname)
50 + "Unrecognized MPI library
name detected among the ParaMonte library paths:" + newline ...
52 + pm.io.
tab +
string(names(iname)) + newline ...
54 + "The corresponding ParaMonte library path is: " + newline ...
56 + pm.io.
tab + bindirs(ibin) + newline ...
58 + "The expected MPI library names are: " + newline ...
60 + pm.io.
tab + strjoin(mpinames, ", ") + newline ...
65 names = unique(names(1 : iname));
68 %elseif pm.os.is.
lin()
69 % names = ["
impi", "mpich", "openmpi"];
71 % names = ["openmpi", "mpich"];
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 choices()
Return the ParaMonte-preferred MPI library vendor name(s) as used in naming the ParaMonte MATLAB shar...
function detect(in vendor)
Return the MPI image count and current image ID (e.g., MPI rank + 1) and the MPI library name as it a...
function glob(in pattern, in anycase)
Find all files and directory names matching the input pattern by expanding wildcards.
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...
function lin()
Return true if the current OS is Linux.
function parallel()
Return a scalar MATLAB logical that is true if and only if the current installation of MATLAB contain...
function tab()
Return a scalar MATLAB string containing 4 blank characters equivalent to a tab character.