comm_finalize Subroutine

private subroutine comm_finalize(this)

Frees the MPI communicator resources

Type Bound

comm_t

Arguments

Type IntentOptional Attributes Name
class(comm_t), intent(inout) :: this

Calls

proc~~comm_finalize~~CallsGraph proc~comm_finalize comm_t%comm_finalize mpi_comm_free mpi_comm_free proc~comm_finalize->mpi_comm_free

Called by

proc~~comm_finalize~~CalledByGraph proc~comm_finalize comm_t%comm_finalize proc~darrays_finalize darrays_finalize proc~darrays_finalize->proc~comm_finalize

Variables

Type Visibility Attributes Name Initial
integer(kind=int32), private :: ierr

Source Code

   subroutine comm_finalize(this)
      !! Frees the MPI communicator resources
      class(comm_t), intent(inout) :: this
      integer(int32) :: ierr

      if (this%is_valid .and. this%m_comm /= MPI_COMM_NULL) then
         call MPI_Comm_free(this%m_comm, ierr)
         this%is_valid = .false.
         this%m_comm = MPI_COMM_NULL
      end if
   end subroutine comm_finalize