2%> Return the a MATLAB
string containing the path to
3%> the first ``mpiexec`` executable binary found in system path.
6%> The output of
this function is what is typically returned
7%> by the Unix command ``command -v mpiexec`` or the Windows CMD
8%> command ``where mpiexec``.<br>
11%> Note that
this function intentionally skips any ``mpiexec``
12%> path that is installed by and within the MATLAB binary directory.<br>
14%> \param[in]
vendor : The input scalar MATLAB string, containing the MPI
15%> library
vendor that should match the ``mpiexec`` binary.<br>
16%> Possible values are:<br>
18%> <li> ``
"Intel"`` : representing the Intel MPI library.
19%> <li> ``
"MPICH"`` : representing the MPICH MPI library.
20%> <li> ``
"OpenMPI"`` : representing the OpenMPI library.
22%> (**optional**,
default = ``
""`` representing all possible vendors.)
25%> ``path`` : The output MATLAB
string containing the paths to
26%> the first ``mpiexec`` executable binary found in system path.<br>
27%> If the ``mpiexec`` does not exist or match the specified ``
vendor``,
28%> the output will be an empty
string ``
""``.<br>
34%> path = pm.sys.path.mpiexec.which()
35%> path = pm.sys.path.mpiexec.which(
vendor)
40%> \include{lineno} example/sys/path/mpiexec/
which/main.m
42%> \include{lineno} example/sys/path/mpiexec/
which/main.out.m
47%> \JoshuaOsborne, May 21 2024, 5:06 AM, University of Texas at Arlington<br>
48%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
49%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
52 vendorLower = lower(
vendor);
53 if vendorLower ==
"impi"
54 vendorLower =
"intel";
55 elseif vendorLower ==
"open-mpi" || vendorLower ==
"openrte"
56 vendorLower =
"openmpi";
62 appNameList = [
"mpiexec",
"mpiexec.openmpi",
"mpiexec.mpich"];
63 for appName = appNameList
65 [failed, stdout] = system(
"where " + appName);
67 [failed, stdout] = system(
"command -v " + appName);
71 path = string(strip(stdout, newline));
72 % On Windows, ``where()`` returns a
list of all identified paths.
73 % Note that MATLAB has also its own ``mpiexec``
which can
show up in ``path``.
75 pathList = split(path, newline);
76 for i = 1 : length(pathList)
78 if ~contains(item, "MATLAB" + filesep + "R")
83 vendorNameLower = lower(pm.sys.path.mpiexec.
vendor(path));
84 if vendorNameLower ~= ""
85 if ~(contains(appName, vendorLower) || contains(vendorNameLower, vendorLower))
93 path =
string(strip(path, newline));
function vendor(in name)
Return the MPI library vendor name from the input MPI name based on the internal ParaMonte shared lib...
function list()
Return a list of MATLAB strings containing the names of OS platforms supported by the ParaMonte MATLA...
function show(in obj, in name, in hidden)
Display the components of an input MATLAB variable on MATLAB Console recursively.
function which(in vendor)
Return the a MATLAB string containing the path to the first mpiexec executable binary found in system...