mpi_flow_shutdown Subroutine

public subroutine mpi_flow_shutdown()

Shuts down the MPI environment if it was started by this module.

Arguments

None

Source Code

   subroutine mpi_flow_shutdown()
      logical :: finalized
      integer :: ierr

      call MPI_Finalized(finalized, ierr)
      if (ierr /= MPI_SUCCESS) return
      if (finalized) return

      if (mpi_started_here) then
         call MPI_Finalize(ierr)
      end if
   end subroutine mpi_flow_shutdown