NAME
MMPPIIQQuueerryytthhrreeaadd - Returns the current level of thread support
SSYYNNTTAAXX CC SSyynnttaaxx#include
int MPIQuerythread(int *provided) FFoorrttrraann SSyynnttaaxx INCLUDE 'mpif.h'MPIQUERYTHREAD(PROVIDED, IERROR)
INTEGER PROVIDED, IERROR
CC++++ SSyynnttaaxx#include
int MPI::Querythread() OOUUTTPPUUTT PPAARRAAMMEETTEERRSS provided C/Fortran only: Level of thread support (integer).IERROR Fortran only: Error status (integer).
DESCRIPTION
This routine returns in provided the current level of thread support. If MPI was initialized by a call to MPIInitthread, provided will have the same value as was returned by that function. The possible values of provided are as follows: MPITHREADSINGLE Only one thread may execute. MPITHREADFUNNELED If the process is multithreaded, only the thread that called MPIInit[thread] may make MPI calls. MPITHREADSERIALIZED If the process is multithreaded, only one thread may make MPI library calls at one time. MPITHREADMULTIPLE If the process is multithreaded, multiplethreads may call MPI at once with no restric-
tions. NNOOTTEESS In Open MPI, provided is always MPITHREADSINGLE, unless the program has been linked with the multithreaded library, in which case provided is MPITHREADMULTIPLE. EERRRROORRSS Almost all MPI routines return an error value; C routines as the valueof the function and Fortran routines in the last argument. C++ func-
tions do not return errors. If the default error handler is set toMPI::ERRORSTHROWEXCEPTIONS, then on error the C++ exception mechanism
will be used to throw an MPI:Exception object. Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed withMPICommseterrhandler; the predefined error handler MPIERRORSRETURN
may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. See the MPI man page for a full list of MPI error codes.SEE ALSO
MPIInit MPIInitthread Open MPI 1.2 September 2006 MPIQuerythread(3OpenMPI)