Neko 1.99.5
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
gs_neighbour::gs_neighbour_t Type Referenceabstract

Gather-scatter communication using an MPI neighbourhood collective. The whole halo exchange is carried out by a single MPI_Ineighbor_alltoallv over a distributed-graph communicator built once from the send/recv peer lists. Compared to the point-to-point gs_mpi_t this trades N Isend/Irecv pairs for one collective call: a single entry into the (serialised, on Fugaku) MPI runtime, leaving the library free to stripe the transfers across all network interfaces internally. More...

Inheritance diagram for gs_neighbour::gs_neighbour_t:
Collaboration diagram for gs_neighbour::gs_neighbour_t:

Public Member Functions

procedure, pass(thisinit (this, send_pe, recv_pe)
 Initialise the neighbourhood-collective communication method See gs_comm.f90 for details.
 
procedure, pass(thisfree (this)
 Deallocate the neighbourhood-collective communication method.
 
procedure, pass(thisnbsend (this, u, n, tag, deps, strm)
 See gs_comm.f90 for more details on these routines.
 
procedure, pass(thisnbrecv (this, tag)
 No-op: the neighbourhood collective issued in nbsend handles both the send and receive directions, so there is nothing to pre-post here.
 
procedure, pass(thisnbwait (this, u, n, op, strm)
 Wait for the neighbourhood collective and reduce the received slabs.
 
procedure, pass(thisnbsend_vec (this, u, n, nc, tag, deps, strm)
 Pack the nc components and launch a single neighbourhood collective.
 
procedure, pass(thisnbrecv_vec (this, tag, nc)
 No-op: the collective is launched in nbsend_vec.
 
procedure, pass(thisnbwait_vec (this, u, n, nc, op, strm)
 Wait for the vector collective and reduce each received slab into u. Peer i's received slab holds nc consecutive blocks of recvcounts(i) values, matching the sender's packing convention.
 
procedure(gs_comm_init), deferred, pass init gs_comm_init
 
procedure(gs_comm_free), deferred, pass free gs_comm_free
 
procedure(gs_nbsend), deferred, pass nbsend gs_nbsend
 
procedure(gs_nbrecv), deferred, pass nbrecv gs_nbrecv
 
procedure(gs_nbwait), deferred, pass nbwait gs_nbwait
 
procedure, pass(thisinit_dofs (this)
 
procedure, pass(thisfree_dofs (this)
 
procedure, pass(thisinit_order (this, send_pe, recv_pe)
 Obtains which ranks to send and receive data from.
 
procedure, pass(thisfree_order (this)
 
procedure, pass(thisnbsend_vec (this, u, n, nc, tag, deps, strm)
 Fused vector halo exchange. Default implementations abort; backends that set vec_supported = .true. override them.
 
procedure, pass(thisnbrecv_vec (this, tag, nc)
 Default fused vector receive. Abort unless a backend overrides it.
 
procedure, pass(thisnbwait_vec (this, u, n, nc, op, strm)
 Default fused vector wait/reduce. Abort unless a backend overrides it.
 

Public Attributes

real(kind=rp), dimension(:), allocatable send_buf
 Concatenated send slabs, one per peer, in send_pe order.
 
real(kind=rp), dimension(:), allocatable recv_buf
 Concatenated recv slabs, one per peer, in recv_pe order.
 
integer, dimension(:), allocatable sendcounts
 Per-peer counts and 0-based element displacements for the neighbourhood collective. send_* follow send_pe (the graph destinations), recv_* follow recv_pe (the graph sources).
 
integer, dimension(:), allocatable sdispls
 
integer, dimension(:), allocatable recvcounts
 
integer, dimension(:), allocatable rdispls
 
type(mpi_comm) neigh_comm
 Distributed-graph communicator over the halo neighbourhood.
 
type(mpi_request) request
 In-flight non-blocking neighbourhood collective.
 
real(kind=rp), dimension(:), allocatable send_buf_v
 Fused vector (multi-component) exchange buffers, sized for up to GS_VEC_NC components. Each peer slab holds nc consecutive component blocks. sendcounts_v/sdispls_v etc. are the nc-scaled collective descriptors, filled per call.
 
real(kind=rp), dimension(:), allocatable recv_buf_v
 
integer, dimension(:), allocatable sendcounts_v
 
integer, dimension(:), allocatable sdispls_v
 
integer, dimension(:), allocatable recvcounts_v
 
integer, dimension(:), allocatable rdispls_v
 
type(stack_i4_t), dimension(:), allocatable send_dof
 A list of stacks of dof indices local to this process to send to rank_i.
 
type(stack_i4_t), dimension(:), allocatable recv_dof
 recv_dof(rank_i) is a stack of dof indices local to this process to receive from rank_i. size(recv_dof) == pe_size
 
integer, dimension(:), allocatable send_pe
 Array of ranks that this process should send to.
 
integer, dimension(:), allocatable recv_pe
 array of ranks that this process will receive messages from
 
logical vec_supported = .false.
 Whether this backend implements the fused vector (multi-component) halo exchange (nbsend_vec/nbrecv_vec/nbwait_vec). When .false., the gs_op_r3 caller falls back to nc independent scalar exchanges.
 

Detailed Description

Definition at line 56 of file gs_neighbour.f90.

Member Function/Subroutine Documentation

◆ free() [1/2]

procedure, pass(this) gs_neighbour::gs_neighbour_t::free ( class(gs_neighbour_t), intent(inout this)

Definition at line 80 of file gs_neighbour.f90.

◆ free() [2/2]

procedure(gs_comm_free), deferred, pass gs_comm::gs_comm_t::free
pure virtualinherited

Definition at line 70 of file gs_comm.f90.

◆ free_dofs()

procedure, pass(this) gs_comm::gs_comm_t::free_dofs ( class(gs_comm_t), intent(inout this)
inherited

Definition at line 75 of file gs_comm.f90.

◆ free_order()

procedure, pass(this) gs_comm::gs_comm_t::free_order ( class(gs_comm_t), intent(inout this)
inherited

Definition at line 77 of file gs_comm.f90.

◆ init() [1/2]

procedure, pass(this) gs_neighbour::gs_neighbour_t::init ( class(gs_neighbour_t), intent(inout this,
type(stack_i4_t), intent(inout send_pe,
type(stack_i4_t), intent(inout recv_pe 
)

Definition at line 79 of file gs_neighbour.f90.

◆ init() [2/2]

procedure(gs_comm_init), deferred, pass gs_comm::gs_comm_t::init
pure virtualinherited

Definition at line 69 of file gs_comm.f90.

◆ init_dofs()

procedure, pass(this) gs_comm::gs_comm_t::init_dofs ( class(gs_comm_t), intent(inout this)
inherited

Definition at line 74 of file gs_comm.f90.

◆ init_order()

procedure, pass(this) gs_comm::gs_comm_t::init_order ( class(gs_comm_t), intent(inout this,
type(stack_i4_t), intent(inout send_pe,
type(stack_i4_t), intent(inout recv_pe 
)
inherited
Parameters
send_pe,onlycontains rank ids this porcesss should send to
recv_pe,onlythe ranks this process should receive from

Definition at line 76 of file gs_comm.f90.

◆ nbrecv() [1/2]

procedure, pass(this) gs_neighbour::gs_neighbour_t::nbrecv ( class(gs_neighbour_t), intent(inout this,
integer, intent(in tag 
)

Definition at line 83 of file gs_neighbour.f90.

◆ nbrecv() [2/2]

procedure(gs_nbrecv), deferred, pass gs_comm::gs_comm_t::nbrecv
pure virtualinherited

Definition at line 72 of file gs_comm.f90.

◆ nbrecv_vec() [1/2]

procedure, pass(this) gs_comm::gs_comm_t::nbrecv_vec ( class(gs_comm_t), intent(inout this,
integer, intent(in tag,
integer, intent(in nc 
)
inherited

Definition at line 81 of file gs_comm.f90.

◆ nbrecv_vec() [2/2]

procedure, pass(this) gs_neighbour::gs_neighbour_t::nbrecv_vec ( class(gs_neighbour_t), intent(inout this,
integer, intent(in tag,
integer, intent(in nc 
)

Definition at line 86 of file gs_neighbour.f90.

◆ nbsend() [1/2]

procedure, pass(this) gs_neighbour::gs_neighbour_t::nbsend ( class(gs_neighbour_t), intent(inout this,
real(kind=rp), dimension(n), intent(inout u,
integer, intent(in n,
integer, intent(in tag,
type(c_ptr), intent(inout deps,
type(c_ptr), intent(inout strm 
)

Definition at line 82 of file gs_neighbour.f90.

◆ nbsend() [2/2]

procedure(gs_nbsend), deferred, pass gs_comm::gs_comm_t::nbsend
pure virtualinherited

Definition at line 71 of file gs_comm.f90.

◆ nbsend_vec() [1/2]

procedure, pass(this) gs_comm::gs_comm_t::nbsend_vec ( class(gs_comm_t), intent(inout this,
real(kind=rp), dimension(nc*n), intent(inout u,
integer, intent(in n,
integer, intent(in nc,
integer, intent(in tag,
type(c_ptr), intent(inout deps,
type(c_ptr), intent(inout strm 
)
inherited
Parameters
ucompact shared buffer, component-outer: u((c-1)*n + idx)
nnumber of shared dofs (per component)
ncnumber of components

Definition at line 80 of file gs_comm.f90.

◆ nbsend_vec() [2/2]

procedure, pass(this) gs_neighbour::gs_neighbour_t::nbsend_vec ( class(gs_neighbour_t), intent(inout this,
real(kind=rp), dimension(nc*n), intent(inout u,
integer, intent(in n,
integer, intent(in nc,
integer, intent(in tag,
type(c_ptr), intent(inout deps,
type(c_ptr), intent(inout strm 
)
Parameters
ucompact shared buffer, component-outer: u((c-1)*n + idx). Peer i's slab in send_buf_v holds nc consecutive blocks of sendcounts(i) values, so the collective descriptors are simply nc times the scalar ones.

Definition at line 85 of file gs_neighbour.f90.

◆ nbwait() [1/2]

procedure, pass(this) gs_neighbour::gs_neighbour_t::nbwait ( class(gs_neighbour_t), intent(inout this,
real(kind=rp), dimension(n), intent(inout u,
integer, intent(in n,
integer  op,
type(c_ptr), intent(inout strm 
)

Definition at line 84 of file gs_neighbour.f90.

◆ nbwait() [2/2]

procedure(gs_nbwait), deferred, pass gs_comm::gs_comm_t::nbwait
pure virtualinherited

Definition at line 73 of file gs_comm.f90.

◆ nbwait_vec() [1/2]

procedure, pass(this) gs_comm::gs_comm_t::nbwait_vec ( class(gs_comm_t), intent(inout this,
real(kind=rp), dimension(nc*n), intent(inout u,
integer, intent(in n,
integer, intent(in nc,
integer  op,
type(c_ptr), intent(inout strm 
)
inherited

Definition at line 82 of file gs_comm.f90.

◆ nbwait_vec() [2/2]

procedure, pass(this) gs_neighbour::gs_neighbour_t::nbwait_vec ( class(gs_neighbour_t), intent(inout this,
real(kind=rp), dimension(nc*n), intent(inout u,
integer, intent(in n,
integer, intent(in nc,
integer  op,
type(c_ptr), intent(inout strm 
)

Definition at line 87 of file gs_neighbour.f90.

Member Data Documentation

◆ neigh_comm

type(mpi_comm) gs_neighbour::gs_neighbour_t::neigh_comm

Definition at line 67 of file gs_neighbour.f90.

◆ rdispls

integer, dimension(:), allocatable gs_neighbour::gs_neighbour_t::rdispls

Definition at line 65 of file gs_neighbour.f90.

◆ rdispls_v

integer, dimension(:), allocatable gs_neighbour::gs_neighbour_t::rdispls_v

Definition at line 77 of file gs_neighbour.f90.

◆ recv_buf

real(kind=rp), dimension(:), allocatable gs_neighbour::gs_neighbour_t::recv_buf

Definition at line 60 of file gs_neighbour.f90.

◆ recv_buf_v

real(kind=rp), dimension(:), allocatable gs_neighbour::gs_neighbour_t::recv_buf_v

Definition at line 75 of file gs_neighbour.f90.

◆ recv_dof

type(stack_i4_t), dimension(:), allocatable gs_comm::gs_comm_t::recv_dof
inherited

Definition at line 57 of file gs_comm.f90.

◆ recv_pe

integer, dimension(:), allocatable gs_comm::gs_comm_t::recv_pe
inherited

Definition at line 63 of file gs_comm.f90.

◆ recvcounts

integer, dimension(:), allocatable gs_neighbour::gs_neighbour_t::recvcounts

Definition at line 65 of file gs_neighbour.f90.

◆ recvcounts_v

integer, dimension(:), allocatable gs_neighbour::gs_neighbour_t::recvcounts_v

Definition at line 77 of file gs_neighbour.f90.

◆ request

type(mpi_request) gs_neighbour::gs_neighbour_t::request

Definition at line 69 of file gs_neighbour.f90.

◆ sdispls

integer, dimension(:), allocatable gs_neighbour::gs_neighbour_t::sdispls

Definition at line 64 of file gs_neighbour.f90.

◆ sdispls_v

integer, dimension(:), allocatable gs_neighbour::gs_neighbour_t::sdispls_v

Definition at line 76 of file gs_neighbour.f90.

◆ send_buf

real(kind=rp), dimension(:), allocatable gs_neighbour::gs_neighbour_t::send_buf

Definition at line 58 of file gs_neighbour.f90.

◆ send_buf_v

real(kind=rp), dimension(:), allocatable gs_neighbour::gs_neighbour_t::send_buf_v

Definition at line 74 of file gs_neighbour.f90.

◆ send_dof

type(stack_i4_t), dimension(:), allocatable gs_comm::gs_comm_t::send_dof
inherited

Definition at line 54 of file gs_comm.f90.

◆ send_pe

integer, dimension(:), allocatable gs_comm::gs_comm_t::send_pe
inherited
Note
: this will usually be fewer than the total number of ranks size(send_pe) <= pe_size

Definition at line 61 of file gs_comm.f90.

◆ sendcounts

integer, dimension(:), allocatable gs_neighbour::gs_neighbour_t::sendcounts

Definition at line 64 of file gs_neighbour.f90.

◆ sendcounts_v

integer, dimension(:), allocatable gs_neighbour::gs_neighbour_t::sendcounts_v

Definition at line 76 of file gs_neighbour.f90.

◆ vec_supported

logical gs_comm::gs_comm_t::vec_supported = .false.
inherited

Definition at line 67 of file gs_comm.f90.


The documentation for this type was generated from the following file: