ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
verify.m File Reference

Go to the source code of this file.

Functions

function verify (in vendor)
 Verify the existence of ParaMonte-compatible MPI library installations on the current system using a brute-force system path search.
More...
 

Function Documentation

◆ verify()

function verify ( in  vendor)

Verify the existence of ParaMonte-compatible MPI library installations on the current system using a brute-force system path search.

Because of the intensive nature of the search, this algorithm may take some time to accomplish the task on some platforms with large file systems.

The installation detection is performed by searching for available mpiexec MPI-launcher binaries for different MPI library installations.

Parameters
[in]vendor: The input scalar or vector MATLAB string, containing the MPI library vendor supported by the ParaMonte library.
Possible values are:
  1. OpenMPI, representing the OpenMPI library.
  2. MPICH, representing the MPICH MPI library.
  3. Intel, representing the Intel MPI library.
  4. all, representing all available MPI library.
    Specifying this value can lead to a comprehensive search for all available ParaMonte-compatible MPI installations on the system, which may time-consuming on some platforms.
    This comprehensive system-level search only if the initial shallow search for the ParaMonte-compatible MPI library installations fails.
Note that all values are case-insensitive.
(**optional, default = "all".)
Returns
failed : The output scalar MATLAB logical that is true if and only if the mpiexec verification fails.


Possible calling interfaces

failed = pm.sys.path.mpiexec.verify()
failed = pm.sys.path.mpiexec.verify(vendor)
function vendor(in name)
Return the MPI library vendor name from the input MPI name based on the internal ParaMonte shared lib...
Warning
This function has side-effects by printing messages on screen.


Example usage

1cd(fileparts(mfilename('fullpath'))); % Change working directory to source code directory.
2addpath('../../../../../'); % Add the ParaMonte library root directory to the search path.
3
4disp("")
5disp('pm.sys.path.mpiexec.verify()')
6disp( pm.sys.path.mpiexec.verify() )
7
8disp("")
9disp('pm.sys.path.mpiexec.verify("Intel")')
10disp( pm.sys.path.mpiexec.verify("Intel") )
11
12disp("")
13disp('pm.sys.path.mpiexec.verify("MPICH")')
14disp( pm.sys.path.mpiexec.verify("MPICH") )
15
16disp("")
17disp('pm.sys.path.mpiexec.verify("OpenMPI")')
18disp( pm.sys.path.mpiexec.verify("OpenMPI") )
19
20disp("")
21disp('pm.sys.path.mpiexec.verify("all")')
22disp( pm.sys.path.mpiexec.verify("all") )
23
24disp("")
25disp('pm.sys.path.mpiexec.verify("any")')
26disp( pm.sys.path.mpiexec.verify("any") )
function verify(in varval, in vartype, in varsize, in varname)
Verify the type and number of elements of the input varval match the specified input vartype and vars...
function root()
Return a scalar MATLAB string containing the root directory of the ParaMonte library package.

Example output
1pm.sys.path.mpiexec.verify()
2Checking for the Intel MPI library installations. This may take a bit...
3 The following Intel ``mpiexec`` binaries were detected:
4 /mnt/c/Program Files (x86)/Intel/oneAPI/mpi/latest/bin/mpiexec.exe
5 /opt/intel/oneapi/mpi/latest/bin/mpiexec
6Checking for the MPICH MPI library installations. This may take a bit...
7 The following MPICH ``mpiexec`` binaries were detected:
8 /usr/bin/mpiexec.mpich
9Checking for the OpenMPI MPI library installations. This may take a bit...
10 The following OpenMPI ``mpiexec`` binaries were detected:
11 /usr/bin/mpiexec
12
13At least one MPI runtime library installation from vendors
14compatible with the ParaMonte library exists on your system.
15
16On Linux/macOS systems, launch the MPI-parallel ParaMonte
17simulation on the shell terminal via the following command:
18
19 mpiexec -n 3 matlab -batch "main"
20
21where,
22
23 1. ``mpiexec`` is the MPI launcher application.
24 2. ``-n 3`` specified three processes to be used for the MPI-parallel simulation.
25 3. ``matlab -batch`` launches the LANG_NAME software per MPI process on the command line.
26 5. ``main`` is the name of your script containing the ParaMonte library task to run in parallel.
27 Replace the script name with whatever the actual name of your script file is.
28 Notice the MATLAB filename `main` appears without the file extension.
29 Notice the MATLAB filename is enclosed with quotation marks.
30
31On Windows systems using the Intel MPI library, an additional ``-localonly`` flag is required:
32
33 mpiexec -localonly -n 3 matlab -batch "main"
34
35where,
36
37 1. ``-localonly`` indicates a parallel simulation on only a single node.
38 This flag will obviate the need for MPI library credentials registration.
39 For more information, visit the Intel MPI library website.
40
41 0
42pm.sys.path.mpiexec.verify("Intel")
43Checking for the Intel MPI library installations. This may take a bit...
44 The following Intel ``mpiexec`` binaries were detected:
45 /mnt/c/Program Files (x86)/Intel/oneAPI/mpi/latest/bin/mpiexec.exe
46 /opt/intel/oneapi/mpi/latest/bin/mpiexec
47Checking for the MPICH MPI library installations. This may take a bit...
48 The following MPICH ``mpiexec`` binaries were detected:
49 /usr/bin/mpiexec.mpich
50Checking for the OpenMPI MPI library installations. This may take a bit...
51 The following OpenMPI ``mpiexec`` binaries were detected:
52 /usr/bin/mpiexec
53
54At least one MPI runtime library installation from vendors
55compatible with the ParaMonte library exists on your system.
56
57On Linux/macOS systems, launch the MPI-parallel ParaMonte
58simulation on the shell terminal via the following command:
59
60 mpiexec -n 3 matlab -batch "main"
61
62where,
63
64 1. ``mpiexec`` is the MPI launcher application.
65 2. ``-n 3`` specified three processes to be used for the MPI-parallel simulation.
66 3. ``matlab -batch`` launches the LANG_NAME software per MPI process on the command line.
67 5. ``main`` is the name of your script containing the ParaMonte library task to run in parallel.
68 Replace the script name with whatever the actual name of your script file is.
69 Notice the MATLAB filename `main` appears without the file extension.
70 Notice the MATLAB filename is enclosed with quotation marks.
71
72On Windows systems using the Intel MPI library, an additional ``-localonly`` flag is required:
73
74 mpiexec -localonly -n 3 matlab -batch "main"
75
76where,
77
78 1. ``-localonly`` indicates a parallel simulation on only a single node.
79 This flag will obviate the need for MPI library credentials registration.
80 For more information, visit the Intel MPI library website.
81
82 0
83pm.sys.path.mpiexec.verify("MPICH")
84Checking for the Intel MPI library installations. This may take a bit...
85 The following Intel ``mpiexec`` binaries were detected:
86 /mnt/c/Program Files (x86)/Intel/oneAPI/mpi/latest/bin/mpiexec.exe
87 /opt/intel/oneapi/mpi/latest/bin/mpiexec
88Checking for the MPICH MPI library installations. This may take a bit...
89 The following MPICH ``mpiexec`` binaries were detected:
90 /usr/bin/mpiexec.mpich
91Checking for the OpenMPI MPI library installations. This may take a bit...
92 The following OpenMPI ``mpiexec`` binaries were detected:
93 /usr/bin/mpiexec
94
95At least one MPI runtime library installation from vendors
96compatible with the ParaMonte library exists on your system.
97
98On Linux/macOS systems, launch the MPI-parallel ParaMonte
99simulation on the shell terminal via the following command:
100
101 mpiexec -n 3 matlab -batch "main"
102
103where,
104
105 1. ``mpiexec`` is the MPI launcher application.
106 2. ``-n 3`` specified three processes to be used for the MPI-parallel simulation.
107 3. ``matlab -batch`` launches the LANG_NAME software per MPI process on the command line.
108 5. ``main`` is the name of your script containing the ParaMonte library task to run in parallel.
109 Replace the script name with whatever the actual name of your script file is.
110 Notice the MATLAB filename `main` appears without the file extension.
111 Notice the MATLAB filename is enclosed with quotation marks.
112
113On Windows systems using the Intel MPI library, an additional ``-localonly`` flag is required:
114
115 mpiexec -localonly -n 3 matlab -batch "main"
116
117where,
118
119 1. ``-localonly`` indicates a parallel simulation on only a single node.
120 This flag will obviate the need for MPI library credentials registration.
121 For more information, visit the Intel MPI library website.
122
123 0
124pm.sys.path.mpiexec.verify("OpenMPI")
125Checking for the Intel MPI library installations. This may take a bit...
126 The following Intel ``mpiexec`` binaries were detected:
127 /mnt/c/Program Files (x86)/Intel/oneAPI/mpi/latest/bin/mpiexec.exe
128 /opt/intel/oneapi/mpi/latest/bin/mpiexec
129Checking for the MPICH MPI library installations. This may take a bit...
130 The following MPICH ``mpiexec`` binaries were detected:
131 /usr/bin/mpiexec.mpich
132Checking for the OpenMPI MPI library installations. This may take a bit...
133 The following OpenMPI ``mpiexec`` binaries were detected:
134 /usr/bin/mpiexec
135
136At least one MPI runtime library installation from vendors
137compatible with the ParaMonte library exists on your system.
138
139On Linux/macOS systems, launch the MPI-parallel ParaMonte
140simulation on the shell terminal via the following command:
141
142 mpiexec -n 3 matlab -batch "main"
143
144where,
145
146 1. ``mpiexec`` is the MPI launcher application.
147 2. ``-n 3`` specified three processes to be used for the MPI-parallel simulation.
148 3. ``matlab -batch`` launches the LANG_NAME software per MPI process on the command line.
149 5. ``main`` is the name of your script containing the ParaMonte library task to run in parallel.
150 Replace the script name with whatever the actual name of your script file is.
151 Notice the MATLAB filename `main` appears without the file extension.
152 Notice the MATLAB filename is enclosed with quotation marks.
153
154On Windows systems using the Intel MPI library, an additional ``-localonly`` flag is required:
155
156 mpiexec -localonly -n 3 matlab -batch "main"
157
158where,
159
160 1. ``-localonly`` indicates a parallel simulation on only a single node.
161 This flag will obviate the need for MPI library credentials registration.
162 For more information, visit the Intel MPI library website.
163
164 0
165pm.sys.path.mpiexec.verify("all")
166Checking for the Intel MPI library installations. This may take a bit...
167 The following Intel ``mpiexec`` binaries were detected:
168 /mnt/c/Program Files (x86)/Intel/oneAPI/mpi/latest/bin/mpiexec.exe
169 /opt/intel/oneapi/mpi/latest/bin/mpiexec
170Checking for the MPICH MPI library installations. This may take a bit...
171 The following MPICH ``mpiexec`` binaries were detected:
172 /usr/bin/mpiexec.mpich
173Checking for the OpenMPI MPI library installations. This may take a bit...
174 The following OpenMPI ``mpiexec`` binaries were detected:
175 /usr/bin/mpiexec
176
177At least one MPI runtime library installation from vendors
178compatible with the ParaMonte library exists on your system.
179
180On Linux/macOS systems, launch the MPI-parallel ParaMonte
181simulation on the shell terminal via the following command:
182
183 mpiexec -n 3 matlab -batch "main"
184
185where,
186
187 1. ``mpiexec`` is the MPI launcher application.
188 2. ``-n 3`` specified three processes to be used for the MPI-parallel simulation.
189 3. ``matlab -batch`` launches the LANG_NAME software per MPI process on the command line.
190 5. ``main`` is the name of your script containing the ParaMonte library task to run in parallel.
191 Replace the script name with whatever the actual name of your script file is.
192 Notice the MATLAB filename `main` appears without the file extension.
193 Notice the MATLAB filename is enclosed with quotation marks.
194
195On Windows systems using the Intel MPI library, an additional ``-localonly`` flag is required:
196
197 mpiexec -localonly -n 3 matlab -batch "main"
198
199where,
200
201 1. ``-localonly`` indicates a parallel simulation on only a single node.
202 This flag will obviate the need for MPI library credentials registration.
203 For more information, visit the Intel MPI library website.
204
205 0
206pm.sys.path.mpiexec.verify("any")
207Checking for the Intel MPI library installations. This may take a bit...
208 The following Intel ``mpiexec`` binaries were detected:
209 /mnt/c/Program Files (x86)/Intel/oneAPI/mpi/latest/bin/mpiexec.exe
210 /opt/intel/oneapi/mpi/latest/bin/mpiexec
211Checking for the MPICH MPI library installations. This may take a bit...
212 The following MPICH ``mpiexec`` binaries were detected:
213 /usr/bin/mpiexec.mpich
214Checking for the OpenMPI MPI library installations. This may take a bit...
215 The following OpenMPI ``mpiexec`` binaries were detected:
216 /usr/bin/mpiexec
217
218At least one MPI runtime library installation from vendors
219compatible with the ParaMonte library exists on your system.
220
221On Linux/macOS systems, launch the MPI-parallel ParaMonte
222simulation on the shell terminal via the following command:
223
224 mpiexec -n 3 matlab -batch "main"
225
226where,
227
228 1. ``mpiexec`` is the MPI launcher application.
229 2. ``-n 3`` specified three processes to be used for the MPI-parallel simulation.
230 3. ``matlab -batch`` launches the LANG_NAME software per MPI process on the command line.
231 5. ``main`` is the name of your script containing the ParaMonte library task to run in parallel.
232 Replace the script name with whatever the actual name of your script file is.
233 Notice the MATLAB filename `main` appears without the file extension.
234 Notice the MATLAB filename is enclosed with quotation marks.
235
236On Windows systems using the Intel MPI library, an additional ``-localonly`` flag is required:
237
238 mpiexec -localonly -n 3 matlab -batch "main"
239
240where,
241
242 1. ``-localonly`` indicates a parallel simulation on only a single node.
243 This flag will obviate the need for MPI library credentials registration.
244 For more information, visit the Intel MPI library website.
245
246 0
function name(in vendor)
Return the MPI library name as used in naming the ParaMonte MATLAB shared library directories.
function parallel()
Return a scalar MATLAB logical that is true if and only if the current installation of MATLAB contain...


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, 11:51 PM Monday, November 11, 2024, Dallas, TX