Defines Coarray Fortran gather-scatter communication.
|
| logical function, public | gs_caf_usable () |
| | Whether the coarray backend can actually run in this job. GS_CAF_AVAIL only says that the compiler accepted coarrays when Neko was configured; a compiler may well do so and still provide a single image per process (gfortran's -fcoarray=single, a coarray runtime that was not linked in), in which case every image sees num_images() == 1 and no halo can be exchanged. The images must map one-to-one onto the ranks of NEKO_COMM, as the backend addresses its peers by image number (rank + 1) – which also rules out a run split into several communicators (NEKO_COMM_ID).
|
| |
| logical function, public | gs_caf_signal_auto () |
| | Whether the signaling mode should be selected by benchmarking, i.e. NEKO_GS_CAF_SIGNALING=auto. The mode is a program-wide binding shared by every gs_caf_t instance, so the caller (the gs comm. autotuner) must bind it once and keep it: see gs_caf_set_mode.
|
| |
| integer function, dimension(:), allocatable, public | gs_caf_signal_modes () |
| | The signaling modes this build can run, in the order they should be benchmarked. Events are only available with a compiler that implements them.
|
| |
| integer function, public | gs_caf_mode_get () |
| | The signaling mode currently in force, or 0 if none has been bound yet (no gs_caf_t has been initialised and the autotuner has not run).
|
| |
| character(len=12) function, public | gs_caf_mode_name (mode) |
| | Name of the signaling mode mode, right-adjusted for the log.
|
| |
| subroutine, public | gs_caf_set_mode (mode) |
| | Bind the signaling mode shared by every gs_caf_t instance, allocating whatever module-level state the mode needs. Idempotent per mode, so it may be called again to switch modes while no gs op is in flight and no gs_caf_t instance is live – which is what the autotuner does to benchmark the modes against each other.
|
| |
| 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, tag, 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, tag) |
| | 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.
|
| |
| subroutine | gs_nbsend_vec_caf (this, u, n, nc, tag, deps, strm) |
| | Fused nc-component put. Each peer slab is nc consecutive component blocks; the remote placement offset and slab length scale by nc, the per-peer signalling (sync/atomic/event) is unchanged.
|
| |
| subroutine | gs_nbrecv_vec_caf (this, tag, nc) |
| | No-op: senders push into the receiver's buffer.
|
| |
| subroutine | gs_nbwait_vec_caf (this, u, n, nc, op, strm) |
| | Fused nc-component wait/reduce for the coarray backend.
|
| |