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

Defines GPU aware MPI gather-scatter communication.

Data Types

type  gs_device_shmem_buf_t
 Buffers for non-blocking communication and packing/unpacking. More...
type  gs_device_shmem_t
 Gather-scatter communication using device SHMEM. The arrays are indexed per PE like send_pe and @ recv_pe. More...
interface  cudamalloc_nvshmem
interface  cudafree_nvshmem
interface  cuda_gs_nvshmem_pack
interface  cuda_gs_nvshmem_pack_vec
interface  cuda_gs_push
interface  cuda_gs_push_wait
interface  cuda_gs_post_ready
interface  cuda_gs_unpack
interface  cuda_gs_unpack_vec

Functions/Subroutines

subroutine gs_device_shmem_buf_init (this, pe_order, dof_stack, mark_dupes, nslabs)
subroutine gs_device_shmem_buf_free (this)
subroutine gs_device_shmem_init (this, send_pe, recv_pe)
 Initialise MPI based communication method.
subroutine gs_device_shmem_free (this)
 Deallocate MPI based communication method.
subroutine gs_device_shmem_nbsend (this, u, n, tag, deps, strm)
 Post non-blocking send operations.
subroutine gs_device_shmem_nbrecv (this, tag)
 Post non-blocking receive operations.
subroutine gs_device_shmem_nbwait (this, u, n, op, strm)
 Wait for non-blocking operations.
subroutine gs_device_shmem_nbsend_vec (this, u, n, nc, tag, deps, strm)
 Fused nc-component send. u is the compact shared device buffer (component-outer, per-component stride n = nshared). Bulk-packs the parity slab of the fused vector send buffer; see gs_device_shmem_nbsend for the ordering and parity-slab rationale.
subroutine gs_device_shmem_nbrecv_vec (this, tag, nc)
 No-op: everything happens in nbwait_vec.
subroutine gs_device_shmem_nbwait_vec (this, u, n, nc, op, strm)
 Fused nc-component push + unpack (the pack happens in nbsend_vec).

Variables

logical, parameter, public gs_device_shmem_avail = .false.
 Whether NVSHMEM was built into this Neko (–with-nvshmem). Lets callers (e.g. the gs comm. autotuner) skip the backend rather than exchanging nothing on builds without it.

Function/Subroutine Documentation

◆ gs_device_shmem_buf_free()

subroutine gs_device_shmem::gs_device_shmem_buf_free ( class(gs_device_shmem_buf_t), intent(inout) this)
private

Definition at line 296 of file gs_device_shmem.F90.

Here is the call graph for this function:

◆ gs_device_shmem_buf_init()

subroutine gs_device_shmem::gs_device_shmem_buf_init ( class(gs_device_shmem_buf_t), intent(inout) this,
integer, dimension(:), intent(inout), allocatable pe_order,
type(stack_i4_t), dimension(:), intent(inout), allocatable dof_stack,
logical, intent(in) mark_dupes,
integer, intent(in) nslabs )
private
Parameters
nslabsnumber of parity slabs (2 for send buffers, which are round-parity double-buffered so a slab is never repacked while a previous non-blocking put may still be draining it; 1 for recv buffers, whose overwrite is gated by the ready signal).

Definition at line 213 of file gs_device_shmem.F90.

Here is the call graph for this function:

◆ gs_device_shmem_free()

subroutine gs_device_shmem::gs_device_shmem_free ( class(gs_device_shmem_t), intent(inout) this)
private

Definition at line 403 of file gs_device_shmem.F90.

Here is the call graph for this function:

◆ gs_device_shmem_init()

subroutine gs_device_shmem::gs_device_shmem_init ( class(gs_device_shmem_t), intent(inout) this,
type(stack_i4_t), intent(inout) send_pe,
type(stack_i4_t), intent(inout) recv_pe )
private

Definition at line 313 of file gs_device_shmem.F90.

Here is the call graph for this function:

◆ gs_device_shmem_nbrecv()

subroutine gs_device_shmem::gs_device_shmem_nbrecv ( class(gs_device_shmem_t), intent(inout) this,
integer, intent(in) tag )
private

Definition at line 503 of file gs_device_shmem.F90.

◆ gs_device_shmem_nbrecv_vec()

subroutine gs_device_shmem::gs_device_shmem_nbrecv_vec ( class(gs_device_shmem_t), intent(inout) this,
integer, intent(in) tag,
integer, intent(in) nc )
private

Definition at line 602 of file gs_device_shmem.F90.

◆ gs_device_shmem_nbsend()

subroutine gs_device_shmem::gs_device_shmem_nbsend ( class(gs_device_shmem_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 449 of file gs_device_shmem.F90.

Here is the call graph for this function:

◆ gs_device_shmem_nbsend_vec()

subroutine gs_device_shmem::gs_device_shmem_nbsend_vec ( class(gs_device_shmem_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

Definition at line 567 of file gs_device_shmem.F90.

Here is the call graph for this function:

◆ gs_device_shmem_nbwait()

subroutine gs_device_shmem::gs_device_shmem_nbwait ( class(gs_device_shmem_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 513 of file gs_device_shmem.F90.

Here is the call graph for this function:

◆ gs_device_shmem_nbwait_vec()

subroutine gs_device_shmem::gs_device_shmem_nbwait_vec ( class(gs_device_shmem_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 608 of file gs_device_shmem.F90.

Here is the call graph for this function:

Variable Documentation

◆ gs_device_shmem_avail

logical, parameter, public gs_device_shmem::gs_device_shmem_avail = .false.

Definition at line 57 of file gs_device_shmem.F90.