38 use,
intrinsic :: iso_c_binding
56 integer,
allocatable :: send_pe(:)
58 integer,
allocatable :: recv_pe(:)
62 procedure(
gs_nbsend), pass(this),
deferred :: nbsend
63 procedure(
gs_nbrecv), pass(this),
deferred :: nbrecv
64 procedure(
gs_nbwait), pass(this),
deferred :: nbwait
105 integer,
intent(in) :: n
106 real(kind=
rp),
dimension(n),
intent(inout) :: u
107 type(c_ptr),
intent(inout) :: deps
108 type(c_ptr),
intent(inout) :: strm
137 integer,
intent(in) :: n
138 real(kind=
rp),
dimension(n),
intent(inout) :: u
140 type(c_ptr),
intent(inout) :: strm
151 call this%free_dofs()
153 allocate(this%send_dof(0:
pe_size-1))
154 allocate(this%recv_dof(0:
pe_size-1))
157 call this%send_dof(i)%init()
158 call this%recv_dof(i)%init()
167 if (
allocated(this%send_dof))
then
169 call this%send_dof(i)%free()
171 deallocate(this%send_dof)
174 if (
allocated(this%recv_dof))
then
176 call this%recv_dof(i)%free()
178 deallocate(this%recv_dof)
190 integer,
pointer :: sp(:)
193 allocate(this%send_pe(send_pe%size()))
195 sp => send_pe%array()
196 do i = 1, send_pe%size()
197 this%send_pe(i) = sp(i)
200 allocate(this%recv_pe(recv_pe%size()))
202 sp => recv_pe%array()
203 do i = 1, recv_pe%size()
204 this%recv_pe(i) = sp(i)
212 if (
allocated(this%send_pe))
then
213 deallocate(this%send_pe)
216 if (
allocated(this%recv_pe))
then
217 deallocate(this%recv_pe)
Abstract interface for deallocating a Gather-scatter communication method.
Abstract interface for initializing a Gather-scatter communication method.
Abstract interface for initiating non-blocking recieve operations Posts non-blocking recieve of value...
Abstract interface for initiating non-blocking send operations Sends the values in u(send_dof(send_pe...
Abstract interface for waiting on non-blocking operations Waits and checks that data is in buffers an...
integer, public pe_size
MPI size of communicator.
Defines a gather-scatter communication method.
subroutine init_dofs(this)
integer, parameter, public gs_comm_mpigpu
integer, parameter, public gs_comm_mpi
subroutine init_order(this, send_pe, recv_pe)
Obtains which ranks to send and receive data from.
integer, parameter, public gs_comm_nvshmem
integer, parameter, public gs_comm_openshmem
subroutine free_dofs(this)
integer, parameter, public gs_comm_nccl
subroutine free_order(this)
integer, parameter, public gs_comm_caf
integer, parameter, public rp
Global precision used in computations.
Implements a dynamic stack ADT.
Gather-scatter communication method.