Neko 1.99.7
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
gs_shmem.F90 File Reference

Go to the source code of this file.

Data Types

type  gs_shmem::gs_shmem_buf_t
 Symmetric buffer for one direction of OpenSHMEM communication. More...
 
type  gs_shmem::gs_shmem_t
 Gather-scatter communication using OpenSHMEM one-sided puts with per-rank signaling for completion (OpenSHMEM 1.5). More...
 

Modules

module  gs_shmem
 Defines OpenSHMEM gather-scatter communication.
 

Functions/Subroutines

subroutine gs_shmem::gs_shmem_buf_init (this, pe_order, dof_stack)
 Allocate symmetric memory and per-neighbor bookkeeping for one direction of communication.
 
subroutine gs_shmem::gs_shmem_buf_free (this)
 Release symmetric memory and bookkeeping.
 
subroutine gs_shmem::gs_shmem_init (this, send_pe, recv_pe)
 Initialise OpenSHMEM based communication method.
 
subroutine gs_shmem::gs_shmem_free (this)
 Deallocate OpenSHMEM based communication method.
 
subroutine gs_shmem::gs_shmem_nbsend (this, u, n, tag, deps, strm)
 Pack the gathered shared dofs into the symmetric send buffer and issue non-blocking puts with signaling to each neighbor's recv buffer. Before each put, wait for the receiver's ack of our previous round so we never overwrite a buffer the receiver hasn't consumed yet.
 
subroutine gs_shmem::gs_shmem_nbrecv (this, tag)
 No-op: receives are completed via remote put-with-signal.
 
subroutine gs_shmem::gs_shmem_nbwait (this, u, n, op, strm)
 Wait per-neighbor for the signal indicating that data has landed, apply the gather-scatter operation from the recv buffer into u, and ack the sender so they may overwrite the buffer in the next round.
 
subroutine gs_shmem::gs_shmem_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 with a single signal. Buffer indexing and put size scale by nc; the per-rank signalling is unchanged.
 
subroutine gs_shmem::gs_shmem_nbrecv_vec (this, tag, nc)
 No-op: receives are completed via remote put-with-signal.
 
subroutine gs_shmem::gs_shmem_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 gs_shmem::gs_shmem_thread_multiple = .false.
 True when the OpenSHMEM library provides SHMEM_THREAD_MULTIPLE. The send path then lets each OpenMP thread run the back-pressure wait, the pack and the put for its own share of the send peers; otherwise every SHMEM call is funnelled through the master thread, mirroring how gs_mpi keys off NEKO_MPI_THREAD_PROVIDED. Queried on every gs_shmem_t init (the level is a property of the library, so all instances agree).
 
logical, parameter, public gs_shmem::gs_shmem_avail = .false.
 Whether a native OpenSHMEM library was built into this Neko (–with-openshmem). Lets callers (e.g. the gs comm. autotuner) skip the backend rather than aborting in init on builds without it.