Allocate tem_communication_type and its variables
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_communication_type), | intent(inout) | :: | me | |||
integer, | intent(in) | :: | comm_size |
communicator size |
||
integer, | intent(in) | :: | nHalos(comm_size) |
number of halos for each other processes |
subroutine tem_comm_count( me, comm_size, nHalos ) ! -------------------------------------------------------------------- ! type( tem_communication_type ), intent(inout) :: me !> communicator size integer, intent(in) :: comm_size !> number of halos for each other processes integer, intent(in) :: nHalos( comm_size ) ! -------------------------------------------------------------------- ! integer :: iPartner, iProc ! -------------------------------------------------------------------- ! iPartner = 0 do iProc = 1, comm_size if( nHalos( iProc ) > 0 ) then ! Store the processes numbers to receive from iPartner = iPartner + 1 me%nElemsProc( iPartner ) = nHalos( iProc ) me%proc( iPartner ) = iProc - 1 end if end do end subroutine tem_comm_count