ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
Go to the source code of this file.
Functions | |
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 appears in the ParaMonte library path and the corresponding MPI-parallel ParaMonte library path . More... | |
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 appears in the ParaMonte library path and the corresponding MPI-parallel ParaMonte library path .
This function attempts to detect the invocation of the current MATLAB session via checking the runtime behavior of the mpiexec
binary MPI launcher instance.
mpiname
is set to an empty string ""
, meaning that strcmp(mpiname, "")
yields true
, then the algorithm has failed, implying that the current application is likely to have been launched by via an mpiexec
binary whose MPI library is supported by the ParaMonte library.mpiname
is set to an non-empty string, which must be the name of an MPI library vendor used within ParaMonte,mpiexec
binary has been used to launch the current application in parallel.0
for either of the output values nproc
and rankp1
implies the algorithm failed to infer the corresponding parameters.nproc
and rankp1
implies that the mpiexec
MPI launcher binary of the corresponding MPI library might have been used to launch MATLAB and its might have been used to launch MATLAB.1
for the output nproc
guarantees that the mpiexec
launcher has been used to launch MATLAB with the specified nproc
number of MPI images (processes).[in] | vendor | : The input scalar MATLAB string, containing the MPI library vendor supported by the ParaMonte library. Possible values are:
Note that all values are case-insensitive. (**optional, default = "any" .) |
mpiname
: The output scalar MATLAB string containing the MPI library name as it appears in the ParaMonte library path.""
implies the algorithm failed to detect a ParaMonte-compatible MPI library invoked or installed on the system.nproc
: The output scalar MATLAB non-negative whole number containing the number of MPI images in the current invocation of the mpiexec
binary MPI launcher.0
implies the algorithm failed to detect a ParaMonte-compatible MPI library or failed to infer the image count.rankp1
: The output scalar MATLAB non-negative whole number containing the image ID (e.g., MPI rank + 1) of the current MPI image in the current invocation of the mpiexec
binary MPI launcher.0
implies the algorithm failed to detect a ParaMonte-compatible MPI library or failed to infer the image count.1
, unlike the MPI rank.rankp1
stands for rank + 1
.
Possible calling interfaces ⛓
persistent
MATLAB struct
to store the results for the default input value for vendor
to expedite future inquiries using this function.
Example usage ⛓
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.
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.