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

Defines GPU aware MPI gather-scatter communication.

Data Types

type  gs_device_mpi_buf_t
 Buffers for non-blocking communication and packing/unpacking. More...
type  gs_device_mpi_t
 Gather-scatter communication using device MPI. The arrays are indexed per PE like send_pe and @ recv_pe. More...
interface  hip_gs_pack
interface  hip_gs_unpack
interface  hip_gs_pack_vec
interface  hip_gs_unpack_vec
interface  device_mpi_init_reqs
interface  device_mpi_free_reqs
interface  device_mpi_isend
interface  device_mpi_irecv
interface  device_mpi_test
interface  device_mpi_waitall
interface  device_mpi_waitany

Functions/Subroutines

subroutine gs_device_mpi_buf_init (this, pe_order, dof_stack, mark_dupes)
subroutine gs_device_mpi_buf_init_vec (this)
 Allocate this buffer's fused vector slab, sized for up to GS_VEC_NC components. Deferred to the first fused exchange, see gs_comm_t.
subroutine gs_device_mpi_buf_free (this)
subroutine gs_device_mpi_init (this, send_pe, recv_pe)
 Initialise MPI based communication method.
subroutine gs_device_mpi_init_vec (this)
 Allocate the fused vector send and receive slabs in device memory, sized for GS_VEC_NC components. Deferred to the first fused exchange, see gs_comm_t. The peer lists, dof maps and streams built in init are shared with the scalar exchange, so this stays rank local.
subroutine gs_device_mpi_free (this)
 Deallocate MPI based communication method.
subroutine gs_device_mpi_nbsend (this, u, n, tag, deps, strm)
 Post non-blocking send operations.
subroutine gs_device_mpi_nbrecv (this, tag)
 Post non-blocking receive operations.
subroutine gs_device_mpi_nbwait (this, u, n, op, strm)
 Wait for non-blocking operations.
subroutine gs_device_mpi_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). Packs nc components into the interleaved send buffer and issues one Isend of nc*ndofs per peer.
subroutine gs_device_mpi_nbrecv_vec (this, tag, nc)
 Post non-blocking receives for a fused nc-component exchange.
subroutine gs_device_mpi_nbwait_vec (this, u, n, nc, op, strm)
 Wait for a fused nc-component exchange and unpack/reduce into u.

Function/Subroutine Documentation

◆ gs_device_mpi_buf_free()

subroutine gs_device_mpi::gs_device_mpi_buf_free ( class(gs_device_mpi_buf_t), intent(inout) this)
private

Definition at line 328 of file gs_device_mpi.F90.

Here is the call graph for this function:

◆ gs_device_mpi_buf_init()

subroutine gs_device_mpi::gs_device_mpi_buf_init ( class(gs_device_mpi_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 )
private

Definition at line 241 of file gs_device_mpi.F90.

Here is the call graph for this function:

◆ gs_device_mpi_buf_init_vec()

subroutine gs_device_mpi::gs_device_mpi_buf_init_vec ( class(gs_device_mpi_buf_t), intent(inout) this)
private

Definition at line 317 of file gs_device_mpi.F90.

Here is the call graph for this function:

◆ gs_device_mpi_free()

subroutine gs_device_mpi::gs_device_mpi_free ( class(gs_device_mpi_t), intent(inout) this)
private

Definition at line 391 of file gs_device_mpi.F90.

Here is the call graph for this function:

◆ gs_device_mpi_init()

subroutine gs_device_mpi::gs_device_mpi_init ( class(gs_device_mpi_t), intent(inout) this,
type(stack_i4_t), intent(inout) send_pe,
type(stack_i4_t), intent(inout) recv_pe )
private

Definition at line 342 of file gs_device_mpi.F90.

Here is the call graph for this function:

◆ gs_device_mpi_init_vec()

subroutine gs_device_mpi::gs_device_mpi_init_vec ( class(gs_device_mpi_t), intent(inout) this)
private

Definition at line 382 of file gs_device_mpi.F90.

◆ gs_device_mpi_nbrecv()

subroutine gs_device_mpi::gs_device_mpi_nbrecv ( class(gs_device_mpi_t), intent(inout) this,
integer, intent(in) tag )
private
Note
With per-peer unpacking (strategy bit 2) the previous op unpacks each slot of the receive buffer on its own stream, and nothing on the host waits for that afterwards: the caller need not sync after the op. Each slot's unpack event is therefore waited on before the slot is posted again, so that MPI cannot overwrite data that is still to be read. The wait is normally on an event that has already completed.

Definition at line 502 of file gs_device_mpi.F90.

Here is the call graph for this function:

◆ gs_device_mpi_nbrecv_vec()

subroutine gs_device_mpi::gs_device_mpi_nbrecv_vec ( class(gs_device_mpi_t), intent(inout) this,
integer, intent(in) tag,
integer, intent(in) nc )
private

Definition at line 629 of file gs_device_mpi.F90.

◆ gs_device_mpi_nbsend()

subroutine gs_device_mpi::gs_device_mpi_nbsend ( class(gs_device_mpi_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 421 of file gs_device_mpi.F90.

Here is the call graph for this function:

◆ gs_device_mpi_nbsend_vec()

subroutine gs_device_mpi::gs_device_mpi_nbsend_vec ( class(gs_device_mpi_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 595 of file gs_device_mpi.F90.

Here is the call graph for this function:

◆ gs_device_mpi_nbwait()

subroutine gs_device_mpi::gs_device_mpi_nbwait ( class(gs_device_mpi_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 521 of file gs_device_mpi.F90.

Here is the call graph for this function:

◆ gs_device_mpi_nbwait_vec()

subroutine gs_device_mpi::gs_device_mpi_nbwait_vec ( class(gs_device_mpi_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 644 of file gs_device_mpi.F90.

Here is the call graph for this function: