check_additionalComm Subroutine

private subroutine check_additionalComm(levelDesc, proc, doAdditional, minlevel)

Check if additional communications have to be performed

Arguments

Type IntentOptional Attributes Name
type(tem_levelDesc_type), intent(in) :: levelDesc(minlevel:)

level descriptor

type(tem_comm_env_type), intent(in) :: proc

Process description to use.

logical, intent(out) :: doAdditional

do addtional steps to identify neighbors of elems in require list

integer, intent(in) :: minlevel

minlevel in tree


Calls

proc~~check_additionalcomm~~CallsGraph proc~check_additionalcomm check_additionalComm mpi_barrier mpi_barrier proc~check_additionalcomm->mpi_barrier mpi_allreduce mpi_allreduce proc~check_additionalcomm->mpi_allreduce

Called by

proc~~check_additionalcomm~~CalledByGraph proc~check_additionalcomm check_additionalComm proc~tem_find_allelements tem_find_allElements proc~tem_find_allelements->proc~check_additionalcomm proc~tem_create_leveldesc tem_create_levelDesc proc~tem_create_leveldesc->proc~tem_find_allelements proc~tem_dimbydim_construction tem_dimByDim_construction proc~tem_dimbydim_construction->proc~tem_create_leveldesc proc~tem_build_face_info tem_build_face_info proc~tem_build_face_info->proc~tem_dimbydim_construction

Contents

Source Code


Source Code

  subroutine check_additionalComm( levelDesc, proc, doAdditional, minlevel )
    ! ---------------------------------------------------------------------------
    !> minlevel in tree
    integer, intent(in) :: minlevel
    !> level descriptor
    type(tem_levelDesc_type), intent(in) :: levelDesc(minlevel:)
    !> Process description to use.
    type(tem_comm_env_type), intent(in) :: proc
    !> do addtional steps to identify neighbors of elems in require list
    ! and do overall communication again, if require%nVals > 0
    logical, intent(out) :: doAdditional
    ! ---------------------------------------------------------------------------
    integer :: iError, iLevel
    logical :: do_local
    ! ---------------------------------------------------------------------------
    doAdditional = .false.
    do_local = .false.
    do iLevel = minlevel, ubound( levelDesc, 1 )
      do_local = ( do_local .or. (levelDesc( iLevel )%require%nVals > 0))
    end do
    ! JUROPA work-around for crash in the mpi_allreduce
    call mpi_barrier( proc%comm, iError )
    call mpi_allreduce( do_local, doAdditional, 1, mpi_logical,                &
      &                 mpi_LOR, proc%comm, iError )
    if( doAdditional ) then
      write(dbgUnit(1),*)'Perform additional exchanges for required neighbors'
    end if

  end subroutine check_additionalComm