One of the goals of MPI is to allow for layered libraries. A library using the World Model needs to know if MPI has been initialized using either of MPI_INIT or MPI_INIT_THREAD. In MPI the function MPI_INITIALIZED is provided to tell if MPI had been initialized using the World Model. In the World Model, once MPI has been finalized it cannot be restarted. A library needs to be able to determine this to act accordingly. To achieve this, the function MPI_FINALIZED is needed.
MPI_INITIALIZED(flag) | |
OUT flag | Flag is true if MPI_INIT or MPI_INIT_THREAD has been called and false otherwise (logical) |
This routine may be used to determine whether MPI_INIT or MPI_INIT_THREAD has been called. MPI_INITIALIZED returns true if the calling process has called either of these MPI procedures. Whether MPI_FINALIZE has been called does not affect the behavior of MPI_INITIALIZED. This function must always be thread-safe, as defined in Section MPI and Threads. This function returns false for applications using the Sessions Model exclusively.
MPI_FINALIZED(flag) | |
OUT flag | true if MPI_FINALIZE has been called and false otherwise. (logical) |
This routine returns true if MPI_FINALIZE has completed. It is valid to call MPI_FINALIZED before MPI_INIT and after MPI_FINALIZE. This function must always be thread-safe, as defined in Section MPI and Threads.