MPI_Is_thread_main
Determines if thread called MPI_Init
#include <mpi.h>
int MPI_Is_thread_main(int *flag)
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_IS_THREAD_MAIN(FLAG, IERROR)
LOGICAL FLAG
INTEGER IERROR
USE mpi_f08
MPI_Is_thread_main(flag, ierror)
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
flag
: True if calling thread is main thread (boolean).ierror
: Fortran only: Error status (integer).
MPI_Is_thread_main
is called by a thread to find out whether the caller is the main thread (that is, the thread that called MPI_Init
or MPI_Init_thread).
* MPI_Init
* MPI_Init_thread