Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
gs_mpi_rma Module Reference

Defines MPI one-sided (RMA) gather-scatter communication.

Data Types

type  gs_mpi_rma_t
 Gather-scatter communication using MPI one-sided puts into a passive target window, with per-rank signalling for completion. More...
 

Functions/Subroutines

subroutine gs_mpi_rma_init (this, send_pe, recv_pe)
 Initialise MPI RMA based communication method.
 
subroutine gs_mpi_rma_free (this)
 Deallocate MPI RMA based communication method.
 
integer(kind=i8) function gs_mpi_rma_load (s, slot)
 Reload a signal counter through a VOLATILE dummy, so the spin in gs_mpi_rma_wait_ge reads memory on every iteration rather than a value the compiler hoisted out of the loop.
 
subroutine gs_mpi_rma_wait_ge (this, slot, val)
 Spin until the local signal counter in slot slot has reached val. Called by the master thread only.
 
subroutine gs_mpi_rma_nbsend (this, u, n, tag, deps, strm)
 Pack the gathered shared dofs and put them into each neighbour's receive window, then announce the puts. See the type comment for why the puts, the flush and the signals are separate phases.
 
subroutine gs_mpi_rma_nbrecv (this, tag)
 No-op: receives are completed by the remote put and its signal.
 
subroutine gs_mpi_rma_nbwait (this, u, n, op, strm)
 Wait per neighbour for the signal that its data has landed, reduce the slab into u, and ack the sender so it may overwrite the slab next round.
 
subroutine gs_mpi_rma_nbsend_vec (this, u, n, nc, tag, deps, strm)
 Fused nc-component send: pack nc contiguous component blocks per peer slab and put nc*ndofs reals. Buffer indexing and put sizes scale by nc; the signalling is unchanged.
 
subroutine gs_mpi_rma_nbrecv_vec (this, tag, nc)
 No-op: receives are completed by the remote put and its signal.
 
subroutine gs_mpi_rma_nbwait_vec (this, u, n, nc, op, strm)
 Fused nc-component wait/reduce: per peer, wait on the data signal and reduce nc component blocks into u, then ack the sender.
 

Variables

logical, parameter, public gs_mpi_rma_avail = .true.
 MPI RMA needs nothing beyond MPI-3, so the backend is always built. Kept as a parameter for symmetry with the other one-sided backends, which the gs comm. autotuner queries before benchmarking them.
 
integer, parameter gs_mpi_rma_poke = 64
 Number of spin iterations between the progress pokes in gs_mpi_rma_wait_ge.
 
logical, save gs_mpi_rma_flush_all = .true.
 Whether to complete the payload puts with a single MPI_Win_flush_all rather than one MPI_Win_flush per peer. Batched is the default, set NEKO_GS_RMA_FLUSH_ALL=0 for the per-peer form.
 
logical, save gs_mpi_rma_flush_bound = .false.
 Whether the flush strategy has been read from the environment. It is a program-wide binding, read once on the first init.
 

Function/Subroutine Documentation

◆ gs_mpi_rma_free()

subroutine gs_mpi_rma::gs_mpi_rma_free ( class(gs_mpi_rma_t), intent(inout this)
private

Definition at line 258 of file gs_mpi_rma.f90.

◆ gs_mpi_rma_init()

subroutine gs_mpi_rma::gs_mpi_rma_init ( class(gs_mpi_rma_t), intent(inout this,
type(stack_i4_t), intent(inout send_pe,
type(stack_i4_t), intent(inout recv_pe 
)

Definition at line 127 of file gs_mpi_rma.f90.

◆ gs_mpi_rma_load()

integer(kind=i8) function gs_mpi_rma::gs_mpi_rma_load ( integer(kind=i8), dimension(:), volatile  s,
integer, intent(in slot 
)
private
Parameters
sthe signal array to read from
slot1-based slot to read
Returns
its current value

Definition at line 296 of file gs_mpi_rma.f90.

Here is the caller graph for this function:

◆ gs_mpi_rma_nbrecv()

subroutine gs_mpi_rma::gs_mpi_rma_nbrecv ( class(gs_mpi_rma_t), intent(inout this,
integer, intent(in tag 
)
private

Definition at line 418 of file gs_mpi_rma.f90.

◆ gs_mpi_rma_nbrecv_vec()

subroutine gs_mpi_rma::gs_mpi_rma_nbrecv_vec ( class(gs_mpi_rma_t), intent(inout this,
integer, intent(in tag,
integer, intent(in nc 
)
private

Definition at line 581 of file gs_mpi_rma.f90.

◆ gs_mpi_rma_nbsend()

subroutine gs_mpi_rma::gs_mpi_rma_nbsend ( class(gs_mpi_rma_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 
)
private

Definition at line 350 of file gs_mpi_rma.f90.

Here is the call graph for this function:

◆ gs_mpi_rma_nbsend_vec()

subroutine gs_mpi_rma::gs_mpi_rma_nbsend_vec ( class(gs_mpi_rma_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 
)
private
Parameters
ucompact shared buffer, component-outer: u((c-1)*n + idx).

Definition at line 524 of file gs_mpi_rma.f90.

Here is the call graph for this function:

◆ gs_mpi_rma_nbwait()

subroutine gs_mpi_rma::gs_mpi_rma_nbwait ( class(gs_mpi_rma_t), intent(inout this,
real(kind=rp), dimension(n), intent(inout u,
integer, intent(in n,
integer  op,
type(c_ptr), intent(inout strm 
)
private

Definition at line 426 of file gs_mpi_rma.f90.

Here is the call graph for this function:

◆ gs_mpi_rma_nbwait_vec()

subroutine gs_mpi_rma::gs_mpi_rma_nbwait_vec ( class(gs_mpi_rma_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 
)
private

Definition at line 589 of file gs_mpi_rma.f90.

Here is the call graph for this function:

◆ gs_mpi_rma_wait_ge()

subroutine gs_mpi_rma::gs_mpi_rma_wait_ge ( class(gs_mpi_rma_t), intent(inout this,
integer, intent(in slot,
integer(kind=i8), intent(in val 
)
private
Parameters
thisthe backend whose signal window is polled
slot1-based slot in the signal window: rank+1 for a data signal, pe_size+rank+1 for an ack
valthe value to wait for, compared with >=

Definition at line 315 of file gs_mpi_rma.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ gs_mpi_rma_avail

logical, parameter, public gs_mpi_rma::gs_mpi_rma_avail = .true.

Definition at line 58 of file gs_mpi_rma.f90.

◆ gs_mpi_rma_flush_all

logical, save gs_mpi_rma::gs_mpi_rma_flush_all = .true.
private

Definition at line 66 of file gs_mpi_rma.f90.

◆ gs_mpi_rma_flush_bound

logical, save gs_mpi_rma::gs_mpi_rma_flush_bound = .false.
private

Definition at line 69 of file gs_mpi_rma.f90.

◆ gs_mpi_rma_poke

integer, parameter gs_mpi_rma::gs_mpi_rma_poke = 64
private

Definition at line 61 of file gs_mpi_rma.f90.