FIXME : Add documentation
DD>
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(redist_type), | intent(inout) | :: | r | |||
complex, | intent(in), | dimension (r%to_low(1):, r%to_low(2):) | :: | from_here | ||
complex, | intent(inout), | dimension (r%from_low(1):, r%from_low(2):) | :: | to_here |
subroutine c_redist_22_inv (r, from_here, to_here)
use job_manage, only: time_message
use mp, only: get_mp_times
type (redist_type), intent (in out) :: r
complex, dimension (r%to_low(1):, &
r%to_low(2):), intent (in) :: from_here
complex, dimension (r%from_low(1):, &
r%from_low(2):), intent (in out) :: to_here
real :: mp_total, mp_total_after
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_22_inv_mpi_copy_persist_start(r, from_here)
! redistribute from local processor to local processor
if(opt_local_copy .and. (r%redistname .eq. 'x2y')) then
! c_redist_22_inv_new_copy is the new local copy functionality where
! indirect addressing has largely been removed
call c_redist_22_inv_new_copy(r, from_here, to_here)
else
! c_redist_22_inv_old_copy is the original local copy functionality
call c_redist_22_inv_old_copy(r, from_here, to_here)
end if
! c_redist_22_inv_mpi_copy contains all the remote to local
! copy functionality
!<DD>
if(opt_redist_nbk)then
if(opt_redist_persist)then
if(.not.opt_redist_persist_overlap) call c_redist_22_inv_mpi_copy_persist_start(r, from_here)
call c_redist_22_inv_mpi_copy_persist_end(r, to_here)
else
call c_redist_22_inv_mpi_copy_nonblock(r, from_here, to_here)
endif
else
call c_redist_22_inv_mpi_copy(r, from_here, to_here)
endif
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_22_inv