38 use,
intrinsic :: iso_c_binding
48 integer,
allocatable :: send_pe(:)
49 integer,
allocatable :: recv_pe(:)
53 procedure(
gs_nbsend), pass(this),
deferred :: nbsend
54 procedure(
gs_nbrecv), pass(this),
deferred :: nbrecv
55 procedure(
gs_nbwait), pass(this),
deferred :: nbwait
89 integer,
intent(in) :: n
90 real(kind=
rp),
dimension(n),
intent(inout) :: u
91 type(c_ptr),
intent(inout) :: deps
92 type(c_ptr),
intent(inout) :: strm
112 integer,
intent(in) :: n
113 real(kind=
rp),
dimension(n),
intent(inout) :: u
115 type(c_ptr),
intent(inout) :: strm
126 call this%free_dofs()
128 allocate(this%send_dof(0:
pe_size-1))
129 allocate(this%recv_dof(0:
pe_size-1))
132 call this%send_dof(i)%init()
133 call this%recv_dof(i)%init()
142 if (
allocated(this%send_dof))
then
144 call this%send_dof(i)%free()
146 deallocate(this%send_dof)
149 if (
allocated(this%recv_dof))
then
151 call this%recv_dof(i)%free()
153 deallocate(this%recv_dof)
162 integer,
pointer :: sp(:)
165 allocate(this%send_pe(send_pe%size()))
167 sp => send_pe%array()
168 do i = 1, send_pe%size()
169 this%send_pe(i) = sp(i)
172 allocate(this%recv_pe(recv_pe%size()))
174 sp => recv_pe%array()
175 do i = 1, recv_pe%size()
176 this%recv_pe(i) = sp(i)
184 if (
allocated(this%send_pe))
then
185 deallocate(this%send_pe)
188 if (
allocated(this%recv_pe))
then
189 deallocate(this%recv_pe)
Abstract interface for deallocating a Gather-scatter communication method.
Abstract interface for initialising a Gather-scatter communication method.
Abstract interface for initiating non-blocking receive operations.
Abstract interface for initiating non-blocking send operations.
Abstract interface for watining on non-blocking operations.
integer 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)
subroutine free_dofs(this)
subroutine free_order(this)
integer, parameter, public rp
Global precision used in computations.
Implements a dynamic stack ADT.
Gather-scatter communication method.