Go to the source code of this file.
|
function | nproc (in vendor) |
| Return the runtime number of MPI processes with which the mpiexec launcher may have been invoked.
More...
|
|
◆ nproc()
function nproc |
( |
in |
vendor | ) |
|
Return the runtime number of MPI processes with which the mpiexec
launcher may have been invoked.
Otherwise, return 1
if no use of mpiexec
launcher is detected or it is invoked with only 1
MPI process.
An output value of >1
can be used as an indication of the use of the mpiexec
launcher in launching the ParaMonte library.
- Parameters
-
- Returns
value
: The output MATLAB scalar positive whole number, containing the number of MPI processes launched by the mpiexec
command or 1
if no mpiexec
invocation has occurred or mpiexec
has been launched with only one process or the rank inference fails.
Possible calling interfaces ⛓
value = pm.lib.mpi.runtime.nproc()
value = pm.lib.mpi.runtime.nproc([])
value = pm.lib.mpi.runtime.nproc(
vendor)
function vendor(in name)
Return the MPI library vendor name from the input MPI name based on the internal ParaMonte shared lib...
Example usage ⛓
1cd(fileparts(mfilename(
'fullpath'))); % Change working directory to source code directory.
2addpath(
'../../../../../'); % Add the ParaMonte library
root directory to the search path.
4disp(
'pm.lib.mpi.runtime.nproc()')
5disp( pm.lib.mpi.runtime.nproc() )
16disp('pm.
lib.mpi.runtime.
nproc("INTEL")')
17disp( pm.
lib.mpi.runtime.
nproc("INTEL") )
20disp('pm.
lib.mpi.runtime.
nproc("intel")')
21disp( pm.
lib.mpi.runtime.
nproc("intel") )
28disp('pm.
lib.mpi.runtime.
nproc("openmpi")')
29disp( pm.
lib.mpi.runtime.
nproc("openmpi") )
32disp('pm.
lib.mpi.runtime.
nproc("open-mpi")')
33disp( pm.
lib.mpi.runtime.
nproc("open-mpi") )
36disp('pm.
lib.mpi.runtime.
nproc("mpich")')
37disp( pm.
lib.mpi.runtime.
nproc("mpich") )
40disp('pm.
lib.mpi.runtime.
nproc("unknown")')
41disp( pm.
lib.mpi.runtime.
nproc("unknown") )
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 nproc(in vendor)
Return the runtime number of MPI processes with which the mpiexec launcher may have been invoked.
function ompi()
Return the MPI image count and the current image ID (e.g., MPI rank + 1) if the application has been ...
function root()
Return a scalar MATLAB string containing the root directory of the ParaMonte library package.
Example output ⛓ 1pm.lib.mpi.runtime.nproc()
3pm.lib.mpi.runtime.nproc([])
5pm.lib.mpi.runtime.nproc(
"impi")
7pm.lib.mpi.runtime.nproc(
"INTEL")
9pm.lib.mpi.runtime.nproc(
"intel")
11pm.lib.mpi.runtime.nproc(
"ompi")
13pm.lib.mpi.runtime.nproc(
"openmpi")
15pm.lib.mpi.runtime.nproc(
"open-mpi")
17pm.lib.mpi.runtime.nproc(
"mpich")
19pm.lib.mpi.runtime.nproc(
"unknown")
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.
-
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.
-
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.
- Copyright
- Computational Data Science Lab
- Author:
- Fatemeh Bagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.
Amir Shahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin