2%> Return the ID (MPI rank + 1) of the current MPI image (process),
3%> **starting from the number one**.<br>
6%> Beware that this routine returns ``1``
7%> for the MPI rank of the first process
which is ``0``.<br>
8%> This is the reason for the naming used for this function ``
rankp1``
9%> standing for ``rank + 1``, consistent with the
parallel ParaMonte
10%> library conventions across all supported programming languages.<br>
12%> This function can be used to automate the inclusion or exclusion of
13%> single-process activities within the ParaMonte library by creating a fence
14%> around the activities (e.g., visualization, or postprocessing tasks) to
15%> be done only by a specific (normally the first)
parallel process.<br>
16%> See the documentation of [pm.sampling.
Paradram](@ref
Paradram) for example usage.<br>
19%> (**optional**. The default is set by [pm.
lib.mpi.runtime.
detect](@ref
detect).)
22%> ``value`` : The output MATLAB scalar positive whole-number containing the
23%> image (process) ID of the MPI processes launched by the ``mpiexec``.<br>
24%> If no MPI parallelism is involved with current application session,
25%> of if an error occurs while inferring the MPI image ID,
26%> the returned value is always ``1``.<br>
31%> value = pm.lib.mpi.runtime.rankp1()
32%> value = pm.lib.mpi.runtime.rankp1([])
33%> value = pm.lib.mpi.runtime.rankp1(
vendor)
38%> \include{lineno} example/
lib/mpi/runtime/
rankp1/main.m
40%> \include{lineno} example/
lib/mpi/runtime/
rankp1/main.out.m
45%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
46%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
51 [~, ~, value] = pm.lib.mpi.runtime.detect(
vendor);
52 value = max(1, value);
function vendor(in name)
Return the MPI library vendor name from the input MPI name based on the internal ParaMonte shared lib...
This is the ParaDRAM class for generating instances of serial and parallel Delayed-Rejection Adaptive...
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 lib()
Return a scalar MATLAB string containing the path to the lib directory of the ParaMonte library packa...
function parallel()
Return a scalar MATLAB logical that is true if and only if the current installation of MATLAB contain...
function rankp1(in vendor)
Return the ID (MPI rank + 1) of the current MPI image (process), starting from the number one.
function which(in vendor)
Return the a MATLAB string containing the path to the first mpiexec executable binary found in system...