|
Neko 1.99.5
A portable framework for high-order spectral element flow simulations
|
Gather-scatter communication using one-sided uTofu puts. More...


Public Member Functions | |
| procedure, pass(this) | init (this, send_pe, recv_pe) |
| Initialise the uTofu communication method. See gs_comm.f90 for details. | |
| procedure, pass(this) | free (this) |
| Deallocate the uTofu communication method. | |
| procedure, pass(this) | nbsend (this, u, n, tag, deps, strm) |
| Pack the send slabs and fire all one-sided puts (non-blocking). | |
| procedure, pass(this) | nbrecv (this, tag) |
| No-op: the one-sided receive buffer is registered once at init, so there is nothing to post per round. | |
| procedure, pass(this) | nbwait (this, u, n, op, strm) |
| Poll for incoming puts, reducing each slab into u as it lands, then wait for our own sends to drain and flip the double-buffer parity. | |
| procedure, pass(this) | nbsend_vec (this, u, n, nc, tag, deps, strm) |
| Pack the fused nc-component send slabs and fire the puts (non-blocking). | |
| procedure, pass(this) | nbrecv_vec (this, tag, nc) |
| No-op: the vector receive buffer is registered once at init, so there is nothing to post per round. | |
| procedure, pass(this) | nbwait_vec (this, u, n, nc, op, strm) |
| Poll for incoming vector puts, reducing each nc-component slab into u as it lands, then flip the vector double-buffer parity. Same protocol as gs_nbwait_utofu, on the vector context and parity. | |
| 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) | nbsend_vec (this, u, n, nc, tag, deps, strm) |
| Fused vector halo exchange. Default implementations abort; backends that set vec_supported = .true. override them. | |
| 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. | |
Public Attributes | |
| real(kind=rp), dimension(:), pointer | send_buf => null() |
| Concatenated send slabs, one per peer (the put sources). Registered with uTofu; a pointer (not allocatable) so c_loc can take its address – the standard forbids the target attribute on a type component. | |
| real(kind=rp), dimension(:), pointer | recv_buf => null() |
| Double-buffered receive slabs: two halves of buf_size elements each, selected by parity. Registered with uTofu; pointer for the same reason as send_buf. | |
| integer, dimension(:), allocatable | send_len |
| Per-peer slab lengths and 0-based offsets into send_buf / recv_buf. | |
| integer, dimension(:), allocatable | recv_len |
| integer, dimension(:), allocatable | send_offset |
| integer, dimension(:), allocatable | recv_offset |
| integer(c_int64_t), dimension(:), allocatable | send_off64 |
| Int64 views of the send layout, passed to the C transport. | |
| integer(c_int64_t), dimension(:), allocatable | send_len64 |
| integer(c_int64_t), dimension(:), allocatable | rmt_vcq_id |
| Per send-peer remote put targets, learned from each receiver at init: its receive VCQ id, buffer STADD, the byte-offsets of our slab in its two parity halves, and the edata tag it wants us to stamp. | |
| integer(c_int64_t), dimension(:), allocatable | rmt_stadd |
| integer(c_int64_t), dimension(:), allocatable | dst_off0 |
| integer(c_int64_t), dimension(:), allocatable | dst_off1 |
| integer(c_int), dimension(:), allocatable | dst_tag |
| integer(c_int), dimension(:), allocatable | recv_indices |
| Scratch for the unpack-as-ready loop: receive-peer indices completed by the latest poll and how many (c_int to match the C transport). | |
| integer(c_int) | ncompleted = 0 |
| integer | buf_size = 0 |
| Size in elements of one receive half (= total receive count). | |
| integer | send_size = 0 |
| Size in elements of one send half (= total send count); send_buf is double-buffered (2 * send_size) so a round can pack while the previous round's puts are still draining. | |
| integer | elem_size = 0 |
| Storage size of one element in bytes. | |
| integer | parity = 0 |
| Active double-buffer half for the next round. | |
| type(c_ptr) | ctx = c_null_ptr |
| Opaque per-instance uTofu context (registrations + notice stash). | |
| real(kind=rp), dimension(:), pointer | send_buf_v => null() |
| Fused vector (multi-component) path: double-buffered send/recv slabs sized for GS_VEC_NC components. Each peer slab holds nc consecutive component blocks, so the scalar layout is reused scaled by nc. The path has its OWN uTofu context (registrations, receive VCQ and thus private MRQ, completion counters) and its own parity: a neighbour racing from a vector round into a scalar round (or vice versa) must not land notices in the other path's queue. | |
| real(kind=rp), dimension(:), pointer | recv_buf_v => null() |
| integer(c_int64_t), dimension(:), allocatable | rmt_vcq_id_v |
| Per send-peer vector-path put targets: the receiver's vector recv VCQ id and buffer STADD, our slab's scalar element offset within one of its halves, and its scalar half size (both unscaled; the sender scales by nc and folds the parity in at round time). | |
| integer(c_int64_t), dimension(:), allocatable | rmt_stadd_v |
| integer(c_int64_t), dimension(:), allocatable | rmt_off_v |
| integer(c_int64_t), dimension(:), allocatable | rmt_bufsz_v |
| integer(c_int64_t), dimension(:), allocatable | send_off64_v |
| Per-round scratch, computed by the master each nbsend_vec: the send layout scaled by nc and the absolute destination element offsets (vector parity already folded in). | |
| integer(c_int64_t), dimension(:), allocatable | send_len64_v |
| integer(c_int64_t), dimension(:), allocatable | dst_off_v |
| integer | parity_v = 0 |
| Active vector double-buffer half for the next vector round. | |
| type(c_ptr) | ctx_v = c_null_ptr |
| Opaque uTofu context of the vector path. | |
| 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. | |
Definition at line 67 of file gs_utofu.F90.
Definition at line 129 of file gs_utofu.F90.
Definition at line 70 of file gs_comm.f90.
|
inherited |
Definition at line 75 of file gs_comm.f90.
|
inherited |
Definition at line 77 of file gs_comm.f90.
| procedure, pass(this) gs_utofu::gs_utofu_t::init | ( | class(gs_utofu_t), intent(inout) | this, |
| type(stack_i4_t), intent(inout) | send_pe, | ||
| type(stack_i4_t), intent(inout) | recv_pe | ||
| ) |
Definition at line 128 of file gs_utofu.F90.
Definition at line 69 of file gs_comm.f90.
|
inherited |
Definition at line 74 of file gs_comm.f90.
|
inherited |
| send_pe,only | contains rank ids this porcesss should send to |
| recv_pe,only | the ranks this process should receive from |
Definition at line 76 of file gs_comm.f90.
| procedure, pass(this) gs_utofu::gs_utofu_t::nbrecv | ( | class(gs_utofu_t), intent(inout) | this, |
| integer, intent(in) | tag | ||
| ) |
Definition at line 131 of file gs_utofu.F90.
Definition at line 72 of file gs_comm.f90.
|
inherited |
Definition at line 81 of file gs_comm.f90.
| procedure, pass(this) gs_utofu::gs_utofu_t::nbrecv_vec | ( | class(gs_utofu_t), intent(inout) | this, |
| integer, intent(in) | tag, | ||
| integer, intent(in) | nc | ||
| ) |
Definition at line 134 of file gs_utofu.F90.
| procedure, pass(this) gs_utofu::gs_utofu_t::nbsend | ( | class(gs_utofu_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 | ||
| ) |
Definition at line 130 of file gs_utofu.F90.
Definition at line 71 of file gs_comm.f90.
|
inherited |
| u | compact shared buffer, component-outer: u((c-1)*n + idx) |
| n | number of shared dofs (per component) |
| nc | number of components |
Definition at line 80 of file gs_comm.f90.
| procedure, pass(this) gs_utofu::gs_utofu_t::nbsend_vec | ( | class(gs_utofu_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 | ||
| ) |
| u | compact shared buffer, component-outer: u((c-1)*n + idx). Peer i's slab holds nc consecutive blocks of send_len(i) values, so the scalar layout is reused scaled by nc. Same protocol as gs_nbsend_utofu, on the vector context and parity. |
Definition at line 133 of file gs_utofu.F90.
| procedure, pass(this) gs_utofu::gs_utofu_t::nbwait | ( | class(gs_utofu_t), intent(inout) | this, |
| real(kind=rp), dimension(n), intent(inout) | u, | ||
| integer, intent(in) | n, | ||
| integer | op, | ||
| type(c_ptr), intent(inout) | strm | ||
| ) |
Definition at line 132 of file gs_utofu.F90.
Definition at line 73 of file gs_comm.f90.
|
inherited |
Definition at line 82 of file gs_comm.f90.
| procedure, pass(this) gs_utofu::gs_utofu_t::nbwait_vec | ( | class(gs_utofu_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 | ||
| ) |
Definition at line 135 of file gs_utofu.F90.
| integer gs_utofu::gs_utofu_t::buf_size = 0 |
Definition at line 92 of file gs_utofu.F90.
| type(c_ptr) gs_utofu::gs_utofu_t::ctx = c_null_ptr |
Definition at line 102 of file gs_utofu.F90.
| type(c_ptr) gs_utofu::gs_utofu_t::ctx_v = c_null_ptr |
Definition at line 126 of file gs_utofu.F90.
| integer(c_int64_t), dimension(:), allocatable gs_utofu::gs_utofu_t::dst_off0 |
Definition at line 85 of file gs_utofu.F90.
| integer(c_int64_t), dimension(:), allocatable gs_utofu::gs_utofu_t::dst_off1 |
Definition at line 85 of file gs_utofu.F90.
| integer(c_int64_t), dimension(:), allocatable gs_utofu::gs_utofu_t::dst_off_v |
Definition at line 122 of file gs_utofu.F90.
| integer(c_int), dimension(:), allocatable gs_utofu::gs_utofu_t::dst_tag |
Definition at line 86 of file gs_utofu.F90.
| integer gs_utofu::gs_utofu_t::elem_size = 0 |
Definition at line 98 of file gs_utofu.F90.
| integer(c_int) gs_utofu::gs_utofu_t::ncompleted = 0 |
Definition at line 90 of file gs_utofu.F90.
| integer gs_utofu::gs_utofu_t::parity = 0 |
Definition at line 100 of file gs_utofu.F90.
| integer gs_utofu::gs_utofu_t::parity_v = 0 |
Definition at line 124 of file gs_utofu.F90.
Definition at line 75 of file gs_utofu.F90.
Definition at line 111 of file gs_utofu.F90.
|
inherited |
Definition at line 57 of file gs_comm.f90.
| integer(c_int), dimension(:), allocatable gs_utofu::gs_utofu_t::recv_indices |
Definition at line 89 of file gs_utofu.F90.
| integer, dimension(:), allocatable gs_utofu::gs_utofu_t::recv_len |
Definition at line 77 of file gs_utofu.F90.
| integer, dimension(:), allocatable gs_utofu::gs_utofu_t::recv_offset |
Definition at line 78 of file gs_utofu.F90.
|
inherited |
Definition at line 63 of file gs_comm.f90.
| integer(c_int64_t), dimension(:), allocatable gs_utofu::gs_utofu_t::rmt_bufsz_v |
Definition at line 117 of file gs_utofu.F90.
| integer(c_int64_t), dimension(:), allocatable gs_utofu::gs_utofu_t::rmt_off_v |
Definition at line 117 of file gs_utofu.F90.
| integer(c_int64_t), dimension(:), allocatable gs_utofu::gs_utofu_t::rmt_stadd |
Definition at line 84 of file gs_utofu.F90.
| integer(c_int64_t), dimension(:), allocatable gs_utofu::gs_utofu_t::rmt_stadd_v |
Definition at line 116 of file gs_utofu.F90.
| integer(c_int64_t), dimension(:), allocatable gs_utofu::gs_utofu_t::rmt_vcq_id |
Definition at line 84 of file gs_utofu.F90.
| integer(c_int64_t), dimension(:), allocatable gs_utofu::gs_utofu_t::rmt_vcq_id_v |
Definition at line 116 of file gs_utofu.F90.
Definition at line 71 of file gs_utofu.F90.
Definition at line 110 of file gs_utofu.F90.
|
inherited |
Definition at line 54 of file gs_comm.f90.
| integer, dimension(:), allocatable gs_utofu::gs_utofu_t::send_len |
Definition at line 77 of file gs_utofu.F90.
| integer(c_int64_t), dimension(:), allocatable gs_utofu::gs_utofu_t::send_len64 |
Definition at line 80 of file gs_utofu.F90.
| integer(c_int64_t), dimension(:), allocatable gs_utofu::gs_utofu_t::send_len64_v |
Definition at line 121 of file gs_utofu.F90.
| integer(c_int64_t), dimension(:), allocatable gs_utofu::gs_utofu_t::send_off64 |
Definition at line 80 of file gs_utofu.F90.
| integer(c_int64_t), dimension(:), allocatable gs_utofu::gs_utofu_t::send_off64_v |
Definition at line 121 of file gs_utofu.F90.
| integer, dimension(:), allocatable gs_utofu::gs_utofu_t::send_offset |
Definition at line 78 of file gs_utofu.F90.
|
inherited |
Definition at line 61 of file gs_comm.f90.
| integer gs_utofu::gs_utofu_t::send_size = 0 |
Definition at line 96 of file gs_utofu.F90.
|
inherited |
Definition at line 67 of file gs_comm.f90.