What is MPI_Initialized?
MPI library
MPI (Message Passing Interface) is a library that enables you to write parallel programs in C or Fortran77. The library uses commonly available operating system services to create parallel processes and exchange information among these processes.
MPI_Initialized
This function indicates if the MPI_Init method was called in a program.
Syntax
int MPI_Initialized(int *flag)
Parameters
flagacts as an output parameter that returnstrueif theMPI_InitorMPI_Init_threadis called, andfalseotherwise.
Return value
The function returns an error if it is unsuccessful. By default, the error aborts the MPI job.
In case of success, it returns MPI_SUCCESS, the value returned upon successful termination of any MPI routine.
Free Resources
Copyright ©2026 Educative, Inc. All rights reserved