FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(redist_type), | intent(inout) | :: | r | |||
complex, | intent(in), | dimension (r%from_low(1):, r%from_low(2):, r%from_low(3):) | :: | from_here | ||
complex, | intent(inout), | dimension (r%to_low(1):, r%to_low(2):, r%to_low(3):, r%to_low(4):, r%to_low(5):, r%to_low(6):) | :: | to_here | ||
integer, | intent(in) | :: | ntgrid |
subroutine c_redist_36 (r, from_here, to_here, ntgrid)
use job_manage, only: time_message
use mp, only: iproc,get_mp_times
implicit none
integer, intent(in) :: ntgrid
type (redist_type), intent (in out) :: r
complex, dimension (r%from_low(1):, &
r%from_low(2):, &
r%from_low(3):), intent (in) :: from_here
complex, dimension (r%to_low(1):, &
r%to_low(2):, &
r%to_low(3):, &
r%to_low(4):, &
r%to_low(5):, &
r%to_low(6):), intent (in out) :: to_here
integer :: i
real :: mp_total, mp_total_after
!Timing
if (.not. using_measure_scatter) then
call time_message(.false.,time_redist,' Redistribute')
call get_mp_times(total_time = mp_total)
end if
!If overlapping then start comms now
! if(opt_redist_persist_overlap) call c_redist_36_mpi_copy_persist_start(r, from_here)
! redistribute from local processor to local processor
do i = 1, r%from(iproc)%nn
to_here(:,:,r%to(iproc)%m(i), &
r%to(iproc)%n(i), &
r%to(iproc)%o(i), &
r%to(iproc)%p(i)) &
= from_here(:,:,r%from(iproc)%m(i))
end do
if(opt_redist_nbk)then
! if(opt_redist_persist)then
! if(.not.opt_redist_persist_overlap) call c_redist_36_mpi_copy_persist_start(r, from_here) !DD
! call c_redist_36_mpi_copy_persist_end(r, to_here) !DD
! else
call c_redist_36_mpi_copy_nonblock(r, from_here, to_here, ntgrid) !DD
! endif
else
call c_redist_36_mpi_copy(r, from_here, to_here, ntgrid)
endif
!Timing
if (.not. using_measure_scatter) then
call time_message(.false.,time_redist,' Redistribute')
call get_mp_times(total_time = mp_total_after)
time_redist_mpi = time_redist_mpi + (mp_total_after - mp_total)
end if
end subroutine c_redist_36