copy_halo Subroutine

public subroutine copy_halo(dst, src, n_data)

Periodic wrap-around on a single rank: copies the first n_data elements of a halo buffer, the groups of the direction being exchanged. The buffers are sized for the direction with the most groups, so a whole-array assignment would copy that maximum on every exchange (16 times the data in use on an elongated mesh).

The copy is a device array section assignment, which CUDA Fortran runs on the device in the default stream like the kernels around it. The dummies are plain assumed shape: declaring them contiguous made the caller copy its arguments through a host temporary in a debug build, touching device memory from the host.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout), device, dimension(:, :, :) :: dst
real(kind=dp), intent(in), device, dimension(:, :, :) :: src
integer, intent(in) :: n_data

Calls

proc~~copy_halo~~CallsGraph proc~copy_halo m_cuda_sendrecv::copy_halo proc~abort_run m_logger::abort_run proc~copy_halo->proc~abort_run interface~str m_logger::str proc~abort_run->interface~str mpi_abort mpi_abort proc~abort_run->mpi_abort mpi_barrier mpi_barrier proc~abort_run->mpi_barrier mpi_comm_rank mpi_comm_rank proc~abort_run->mpi_comm_rank mpi_comm_size mpi_comm_size proc~abort_run->mpi_comm_size mpi_finalized mpi_finalized proc~abort_run->mpi_finalized mpi_initialized mpi_initialized proc~abort_run->mpi_initialized

Called by

proc~~copy_halo~~CalledByGraph proc~copy_halo m_cuda_sendrecv::copy_halo proc~sendrecv_3fields m_cuda_sendrecv::sendrecv_3fields proc~sendrecv_3fields->proc~copy_halo proc~sendrecv_fields~2 m_cuda_sendrecv::sendrecv_fields proc~sendrecv_fields~2->proc~copy_halo proc~exec_dist_tds_compact~2 m_cuda_exec_dist::exec_dist_tds_compact proc~exec_dist_tds_compact~2->proc~sendrecv_fields~2 proc~exec_dist_transeq_3fused~2 m_cuda_exec_dist::exec_dist_transeq_3fused proc~exec_dist_transeq_3fused~2->proc~sendrecv_3fields proc~tds_solve_dist~3 m_cuda_backend::cuda_backend_t%tds_solve_dist proc~tds_solve_dist~3->proc~sendrecv_fields~2 proc~tds_solve_dist~3->proc~exec_dist_tds_compact~2 proc~transeq_cuda_dist m_cuda_backend::cuda_backend_t%transeq_cuda_dist proc~transeq_cuda_dist->proc~sendrecv_3fields proc~transeq_cuda_dist->proc~exec_dist_transeq_3fused~2 proc~transeq_species_cuda m_cuda_backend::cuda_backend_t%transeq_species_cuda proc~transeq_species_cuda->proc~sendrecv_fields~2 proc~transeq_species_cuda->proc~exec_dist_transeq_3fused~2 proc~tds_solve_cuda m_cuda_backend::cuda_backend_t%tds_solve_cuda proc~tds_solve_cuda->proc~tds_solve_dist~3 proc~transeq_x_cuda m_cuda_backend::cuda_backend_t%transeq_x_cuda proc~transeq_x_cuda->proc~transeq_cuda_dist proc~transeq_y_cuda m_cuda_backend::cuda_backend_t%transeq_y_cuda proc~transeq_y_cuda->proc~transeq_cuda_dist proc~transeq_z_cuda m_cuda_backend::cuda_backend_t%transeq_z_cuda proc~transeq_z_cuda->proc~transeq_cuda_dist