Gather-scatter communication using device SHMEM. The arrays are indexed per PE like send_pe and @ recv_pe.
More...
|
| procedure, pass(this) | init (this, send_pe, recv_pe) |
| | Initialise MPI based communication method.
|
| |
| procedure, pass(this) | free (this) |
| | Deallocate MPI based communication method.
|
| |
| procedure, pass(this) | nbsend (this, u, n, tag, deps, strm) |
| | Post non-blocking send operations.
|
| |
| procedure, pass(this) | nbrecv (this, tag) |
| | Post non-blocking receive operations.
|
| |
| procedure, pass(this) | nbwait (this, u, n, op, strm) |
| | Wait for non-blocking operations.
|
| |
| procedure, pass(this) | 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.
|
| |
| procedure, pass(this) | nbrecv_vec (this, tag, nc) |
| | No-op: everything happens in nbwait_vec.
|
| |
| procedure, pass(this) | nbwait_vec (this, u, n, nc, op, strm) |
| | Fused nc-component push + unpack (the pack happens in nbsend_vec).
|
| |
| procedure(gs_comm_init), deferred, pass | init gs_comm_init |
| |
| procedure(gs_comm_free), deferred, pass | free gs_comm_free |
| |
| procedure(gs_nbsend), deferred, pass | nbsend gs_nbsend |
| |
| procedure(gs_nbrecv), deferred, pass | nbrecv gs_nbrecv |
| |
| procedure(gs_nbwait), deferred, pass | nbwait gs_nbwait |
| |
| procedure, pass(this) | init_dofs (this) |
| |
| procedure, pass(this) | free_dofs (this) |
| |
| procedure, pass(this) | init_order (this, send_pe, recv_pe) |
| | Obtains which ranks to send and receive data from.
|
| |
| procedure, pass(this) | free_order (this) |
| |
| procedure, pass(this) | take_schedule (this, src) |
| | Take over the gather-scatter schedule (dof lists and peer order) of src, avoiding a second (expensive) pass over the connectivity. The data is moved rather than copied, so src is left without a schedule and must not be used for communication afterwards (it can still be freed). No communication resources are set up here; complete the handover with init_schedule once src has been freed, so that the two backends never hold their resources at the same time.
|
| |
| procedure, pass(this) | init_schedule (this) |
| | Set up this communication method for the schedule taken over by take_schedule. Collective, as init is.
|
| |
| procedure, pass(this) | init_vec (this) |
| | Fused vector halo exchange. Default implementations abort; backends that set vec_supported = .true. override them.
|
| |
| procedure, pass(this) | nbsend_vec (this, u, n, nc, tag, deps, strm) |
| | Default fused vector send. Abort unless a backend overrides it.
|
| |
| procedure, pass(this) | nbrecv_vec (this, tag, nc) |
| | Default fused vector receive. Abort unless a backend overrides it.
|
| |
| procedure, pass(this) | nbwait_vec (this, u, n, nc, op, strm) |
| | Default fused vector wait/reduce. Abort unless a backend overrides it.
|
| |
|
| type(gs_device_shmem_buf_t) | send_buf |
| |
| type(gs_device_shmem_buf_t) | recv_buf |
| |
| type(c_ptr), dimension(:), allocatable | stream |
| |
| type(c_ptr), dimension(:), allocatable | event |
| |
| integer | iter = 0 |
| | Round counter for the rank-indexed signal protocol. Advances once per gs op (lockstep across ranks, SPMD); all waits use CMP_GE, so no cross-rank counter matching is required and peer counts may differ between ranks.
|
| |
| type(c_ptr) | done_sig_d = C_NULL_PTR |
| | Symmetric rank-indexed signal arrays, pe_size slots each (a single collective allocation per array, so nvshmem_malloc collectivity is independent of the local peer count). done_sig(r) on our PE is set to iter by rank r's put_signal when its slab has landed in our recv buffer; ready_sig(r) on our PE is set to iter by rank r once it has consumed our round-iter slab (so we may put into its recv slab again).
|
| |
| type(c_ptr) | ready_sig_d = C_NULL_PTR |
| |
| type(c_ptr) | pack_event = C_NULL_PTR |
| | Records the bulk pack on the main stream in nbsend; every per-peer stream waits on it, ordering all reads of the shared buffer u before any unpack write to u.
|
| |
| type(stack_i4_t), dimension(:), allocatable | send_dof |
| | A list of stacks of dof indices local to this process to send to rank_i.
|
| |
| type(stack_i4_t), dimension(:), allocatable | recv_dof |
| | recv_dof(rank_i) is a stack of dof indices local to this process to receive from rank_i. size(recv_dof) == pe_size
|
| |
| integer, dimension(:), allocatable | send_pe |
| | Array of ranks that this process should send to.
|
| |
| integer, dimension(:), allocatable | recv_pe |
| | array of ranks that this process will receive messages from
|
| |
| logical | vec_supported = .false. |
| | Whether this backend implements the fused vector (multi-component) halo exchange (nbsend_vec/nbrecv_vec/nbwait_vec). When .false., the gs_op_r3 caller falls back to nc independent scalar exchanges.
|
| |
| logical | vec_ready = .false. |
| | Whether the buffers the fused vector exchange needs are in place. They are sized GS_VEC_NC times the halo, quadrupling what the backend holds, and only gs_op_r3 ever touches them, so a backend that can allocate them on its own defers that to the first fused exchange (see init_vec) rather than paying for it in every run. A backend whose vector buffers are part of an allocation the whole run has to agree on – symmetric memory, coarrays, registered memory, an RMA window – cannot defer, since a rank with no shared dofs never reaches the first fused exchange; those allocate in init and set this there.
|
| |
Definition at line 80 of file gs_device_shmem.F90.