tem_comm_destroy Subroutine

public subroutine tem_comm_destroy(me, commPattern)

Arguments

Type IntentOptional Attributes Name
type(tem_communication_type), intent(inout) :: me

communication type to be destroyed

type(tem_commPattern_type), intent(in) :: commPattern

Communication pattern


Calls

proc~~tem_comm_destroy~~CallsGraph proc~tem_comm_destroy tem_comm_destroy interface~destroy~9 destroy proc~tem_comm_destroy->interface~destroy~9 proc~destroy_da_label destroy_da_label interface~destroy~9->proc~destroy_da_label

Contents

Source Code


Source Code

  subroutine tem_comm_destroy( me, commPattern )
    ! -------------------------------------------------------------------------!
    !> communication type to be destroyed
    type(tem_communication_type), intent(inout) :: me
    !> Communication pattern
    type(tem_commPattern_type), intent(in) :: commPattern
    ! -------------------------------------------------------------------------!
    integer :: iProc
    ! -------------------------------------------------------------------------!

    do iProc = 1, me%nProcs
      call commPattern%finbuf_real( me%buf_real(iProc) )
      call commPattern%finbuf_long( me%buf_long(iProc) )
      call commPattern%finbuf_int(  me%buf_int(iProc)  )
    end do

    deallocate( me%buf_real )
    deallocate( me%buf_long )
    deallocate( me%buf_int  )

    deallocate( me%proc )
    deallocate( me%nElemsProc )
    do iProc = 1, me%nProcs
      call destroy( me%elemPos(iProc) )
    end do
    deallocate( me%elemPos )
    deallocate( me%rqHandle )

  end subroutine tem_comm_destroy