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

Defines Coarray Fortran gather-scatter communication.

Data Types

type  gs_caf_t
 Gather-scatter communication using Coarray Fortran (F2008). Each image puts directly into the (module-level) receive coarray on the destination image. The signaling mode (NEKO_GS_CAF_SIGNALING) selects how segment ordering is established: sync uses sync images over the union of send and recv peers, atomic uses per-peer atomic_define/atomic_ref on data_ready/buf_ready counters, and event uses coarray events. More...
 

Functions/Subroutines

subroutine gs_caf_init (this, send_pe, recv_pe)
 Initialise Coarray Fortran based communication method.
 
subroutine gs_caf_free (this)
 Deallocate Coarray Fortran based communication method. The shared module-level recv coarray is intentionally retained so it can be reused by subsequent gs_caf_t instances.
 
subroutine gs_nbsend_caf (this, u, n, deps, strm)
 Pack u into per-peer slabs and put each slab into the remote image's recv_buf. Double buffering means each round writes to a different half of the recv coarray, so no back-pressure synchronisation is needed in sync mode – the visibility synchronisation in nbwait suffices. Atomic and event modes still use their per-pair signalling.
 
subroutine gs_nbrecv_caf (this)
 No-op for coarrays: senders push into the receiver's buffer, so the receive side does not need to post anything.
 
subroutine gs_nbwait_caf (this, u, n, op, strm)
 Wait for all incoming puts and reduce them into u. In sync mode a sync_images bracket pairs with the senders' nbsend; in atomic mode each sender is awaited via its data_ready counter and credited via buf_ready after unpack.
 

Variables

integer, parameter, public gs_caf_signal_sync = 1
 
integer, parameter, public gs_caf_signal_atomic = 2
 
integer, parameter, public gs_caf_signal_event = 3
 

Function/Subroutine Documentation

◆ gs_caf_free()

subroutine gs_caf::gs_caf_free ( class(gs_caf_t), intent(inout this)
private

Definition at line 311 of file gs_caf.F90.

◆ gs_caf_init()

subroutine gs_caf::gs_caf_init ( class(gs_caf_t), intent(inout this,
type(stack_i4_t), intent(inout send_pe,
type(stack_i4_t), intent(inout recv_pe 
)

Definition at line 162 of file gs_caf.F90.

◆ gs_nbrecv_caf()

subroutine gs_caf::gs_nbrecv_caf ( class(gs_caf_t), intent(inout this)
private

Definition at line 452 of file gs_caf.F90.

◆ gs_nbsend_caf()

subroutine gs_caf::gs_nbsend_caf ( class(gs_caf_t), intent(inout this,
real(kind=rp), dimension(n), intent(inout u,
integer, intent(in n,
type(c_ptr), intent(inout deps,
type(c_ptr), intent(inout strm 
)
private

Definition at line 334 of file gs_caf.F90.

◆ gs_nbwait_caf()

subroutine gs_caf::gs_nbwait_caf ( class(gs_caf_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 460 of file gs_caf.F90.

Variable Documentation

◆ gs_caf_signal_atomic

integer, parameter, public gs_caf::gs_caf_signal_atomic = 2

Definition at line 54 of file gs_caf.F90.

◆ gs_caf_signal_event

integer, parameter, public gs_caf::gs_caf_signal_event = 3

Definition at line 55 of file gs_caf.F90.

◆ gs_caf_signal_sync

integer, parameter, public gs_caf::gs_caf_signal_sync = 1

Definition at line 53 of file gs_caf.F90.