Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_sparta_type), | intent(in) | :: | me | |||
integer(kind=long_k), | intent(inout), | allocatable | :: | val(:,:) | ||
integer, | intent(in) | :: | nComponents | |||
integer, | intent(in) | :: | comm |
subroutine tem_exchange_long2( me, val, nComponents, comm )
! ---------------------------------------------------------------------------
type( tem_sparta_type ), intent(in) :: me
integer, intent(in) :: nComponents
integer(kind=long_k), allocatable, intent(inout) :: val(:,:)
integer, intent(in) :: comm
! ---------------------------------------------------------------------------
integer(kind=long_k), allocatable :: old_val(:,:)
integer :: iError
! ---------------------------------------------------------------------------
call move_alloc( val, old_val )
allocate( val(nComponents, me%new_size) )
call mpi_alltoallv( old_val, me%send_count*nComponents, me%send_index*nComponents, long_k_mpi,&
val, me%recv_count*nComponents, me%recv_index*nComponents, long_k_mpi,&
comm, ierror )
deallocate( old_val )
end subroutine tem_exchange_long2