tem_comm_init Subroutine

public subroutine tem_comm_init(me, nProcs)

Allocate tem_communication_type and its variables

Arguments

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

Called by

proc~~tem_comm_init~~CalledByGraph proc~tem_comm_init tem_comm_init proc~tem_comm_createbuffer tem_comm_createBuffer proc~tem_comm_createbuffer->proc~tem_comm_init proc~communicate_nelemstotransfer communicate_nElemsToTransfer proc~communicate_nelemstotransfer->proc~tem_comm_init proc~communicate_elements communicate_elements proc~communicate_elements->proc~communicate_nelemstotransfer proc~tem_find_allelements tem_find_allElements proc~tem_find_allelements->proc~communicate_elements proc~tem_create_leveldesc tem_create_levelDesc proc~tem_create_leveldesc->proc~tem_find_allelements

Contents

Source Code


Source Code

  subroutine tem_comm_init( me, nProcs )
    ! -------------------------------------------------------------------- !
    type( tem_communication_type ), intent(inout) :: me
    integer, intent(in) :: nProcs
    ! -------------------------------------------------------------------- !

    if ( allocated(me%proc) )       deallocate( me%proc )
    if ( allocated(me%nElemsProc) ) deallocate( me%nElemsProc )
    if ( allocated(me%elemPos) )    deallocate( me%elemPos )
    if ( allocated(me%rqHandle) )   deallocate( me%rqHandle )
    if ( allocated(me%buf_long) )   deallocate( me%buf_long )
    if ( allocated(me%buf_int) )    deallocate( me%buf_int )
    if ( allocated(me%buf_real) )   deallocate( me%buf_real )

    me%nProcs = nProcs
    allocate( me%proc      ( nProcs ) )
    allocate( me%nElemsProc( nProcs ) )
    allocate( me%elemPos   ( nProcs ) )
    allocate( me%rqHandle  ( nProcs ) )

    allocate( me%buf_long  ( nProcs ) )
    allocate( me%buf_int   ( nProcs ) )
    allocate( me%buf_real  ( nProcs ) )

  end subroutine tem_comm_init