|
Neko 1.99.9
A portable framework for high-order spectral element flow simulations
|
Gather-scatter communication using a crystal router on the device. More...


Public Member Functions | |
| procedure, pass(this) | init (this, send_pe, recv_pe) |
| Initialise crystal router based device communication See gs_comm.f90 for details. | |
| procedure, pass(this) | free (this) |
| Deallocate crystal router based device communication. | |
| procedure, pass(this) | nbsend (this, u, n, tag, deps, strm) |
| Pack the shared vector and post the send of the first routing stage. | |
| procedure, pass(this) | nbrecv (this, tag) |
| Post the receives of the first routing stage. | |
| procedure, pass(this) | nbwait (this, u, n, op, strm) |
| Drive the remaining routing stages and reduce what is delivered into the shared vector. | |
| procedure, pass(this) | nbsend_vec (this, u, n, nc, tag, deps, strm) |
| Pack the shared vector and post the send of the first routing stage, fused nc-component. | |
| procedure, pass(this) | nbrecv_vec (this, tag, nc) |
| Post the receives of the first routing stage, fused nc-component. | |
| procedure, pass(this) | nbwait_vec (this, u, n, nc, op, strm) |
| Drive the remaining routing stages and reduce what is delivered into the shared vector, fused nc-component. | |
| 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) | 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 | |
| type(gs_crystal_plan_t) | plan |
| The routing plan, worked out once from the schedule. | |
| type(c_ptr), dimension(2) | buf_d = C_NULL_PTR |
| Working buffer columns, plannwrk words each. | |
| type(c_ptr) | sbuf_d = C_NULL_PTR |
| Send buffer, plannsmax words. | |
| type(c_ptr), dimension(2) | buf_v_d = C_NULL_PTR |
| Fused vector working and send buffers, GS_VEC_NC times as long. Positions are interleaved, matching the gs vector pack kernels. | |
| type(c_ptr) | sbuf_v_d = C_NULL_PTR |
| type(c_ptr), dimension(:), allocatable | keep_idx_d |
| Per-stage index lists of the words that stay and the words that go, as positions in the stage's source column. | |
| type(c_ptr), dimension(:), allocatable | send_idx_d |
| type(c_ptr), dimension(:), allocatable | keep_idx_v_d |
| The same lists expanded over the components of the fused vector exchange, built on first use for the number of components seen. | |
| type(c_ptr), dimension(:), allocatable | send_idx_v_d |
| type(c_ptr) | pack_keep_d = C_NULL_PTR |
| Shared vector indices for the first stage and for the reduction. | |
| type(c_ptr) | pack_send_d = C_NULL_PTR |
| type(c_ptr) | unpack_d = C_NULL_PTR |
| type(c_ptr) | sreqs = C_NULL_PTR |
| Requests of the stage in flight, at most one send and two receives. | |
| type(c_ptr) | rreqs = C_NULL_PTR |
| integer | nsreq = 0 |
| integer | nrreq = 0 |
| integer | tag = 0 |
| Tag of the operation in flight, taken from nbrecv since the later stages are driven from nbwait, which is not given one. | |
| integer | vec_nc = 0 |
| Number of components the expanded index lists were built for, 0 until the first fused vector exchange. | |
| 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 61 of file gs_device_crystal.F90.
| procedure, pass(this) gs_device_crystal::gs_device_crystal_t::free | ( | class(gs_device_crystal_t), intent(inout) | this | ) |
Definition at line 94 of file gs_device_crystal.F90.
Definition at line 71 of file gs_comm.f90.
|
inherited |
Definition at line 76 of file gs_comm.f90.
|
inherited |
Definition at line 78 of file gs_comm.f90.
| procedure, pass(this) gs_device_crystal::gs_device_crystal_t::init | ( | class(gs_device_crystal_t), intent(inout) | this, |
| type(stack_i4_t), intent(inout) | send_pe, | ||
| type(stack_i4_t), intent(inout) | recv_pe | ||
| ) |
Definition at line 93 of file gs_device_crystal.F90.
Definition at line 70 of file gs_comm.f90.
|
inherited |
Definition at line 75 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 77 of file gs_comm.f90.
|
inherited |
Definition at line 80 of file gs_comm.f90.
| procedure, pass(this) gs_device_crystal::gs_device_crystal_t::nbrecv | ( | class(gs_device_crystal_t), intent(inout) | this, |
| integer, intent(in) | tag | ||
| ) |
Definition at line 96 of file gs_device_crystal.F90.
Definition at line 73 of file gs_comm.f90.
| procedure, pass(this) gs_device_crystal::gs_device_crystal_t::nbrecv_vec | ( | class(gs_device_crystal_t), intent(inout) | this, |
| integer, intent(in) | tag, | ||
| integer, intent(in) | nc | ||
| ) |
Definition at line 99 of file gs_device_crystal.F90.
|
inherited |
Definition at line 84 of file gs_comm.f90.
| procedure, pass(this) gs_device_crystal::gs_device_crystal_t::nbsend | ( | class(gs_device_crystal_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 95 of file gs_device_crystal.F90.
Definition at line 72 of file gs_comm.f90.
| procedure, pass(this) gs_device_crystal::gs_device_crystal_t::nbsend_vec | ( | class(gs_device_crystal_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 device buffer, component-outer with stride n |
Definition at line 98 of file gs_device_crystal.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 83 of file gs_comm.f90.
| procedure, pass(this) gs_device_crystal::gs_device_crystal_t::nbwait | ( | class(gs_device_crystal_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 97 of file gs_device_crystal.F90.
Definition at line 74 of file gs_comm.f90.
| procedure, pass(this) gs_device_crystal::gs_device_crystal_t::nbwait_vec | ( | class(gs_device_crystal_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 100 of file gs_device_crystal.F90.
|
inherited |
Definition at line 85 of file gs_comm.f90.
|
inherited |
| src | the backend to take the schedule from, left without one |
Definition at line 79 of file gs_comm.f90.
| type(c_ptr), dimension(2) gs_device_crystal::gs_device_crystal_t::buf_d = C_NULL_PTR |
Definition at line 65 of file gs_device_crystal.F90.
| type(c_ptr), dimension(2) gs_device_crystal::gs_device_crystal_t::buf_v_d = C_NULL_PTR |
Definition at line 70 of file gs_device_crystal.F90.
| type(c_ptr), dimension(:), allocatable gs_device_crystal::gs_device_crystal_t::keep_idx_d |
Definition at line 74 of file gs_device_crystal.F90.
| type(c_ptr), dimension(:), allocatable gs_device_crystal::gs_device_crystal_t::keep_idx_v_d |
Definition at line 77 of file gs_device_crystal.F90.
| integer gs_device_crystal::gs_device_crystal_t::nrreq = 0 |
Definition at line 85 of file gs_device_crystal.F90.
| integer gs_device_crystal::gs_device_crystal_t::nsreq = 0 |
Definition at line 85 of file gs_device_crystal.F90.
| type(c_ptr) gs_device_crystal::gs_device_crystal_t::pack_keep_d = C_NULL_PTR |
Definition at line 79 of file gs_device_crystal.F90.
| type(c_ptr) gs_device_crystal::gs_device_crystal_t::pack_send_d = C_NULL_PTR |
Definition at line 80 of file gs_device_crystal.F90.
| type(gs_crystal_plan_t) gs_device_crystal::gs_device_crystal_t::plan |
Definition at line 63 of file gs_device_crystal.F90.
|
inherited |
Definition at line 58 of file gs_comm.f90.
|
inherited |
Definition at line 64 of file gs_comm.f90.
| type(c_ptr) gs_device_crystal::gs_device_crystal_t::rreqs = C_NULL_PTR |
Definition at line 84 of file gs_device_crystal.F90.
| type(c_ptr) gs_device_crystal::gs_device_crystal_t::sbuf_d = C_NULL_PTR |
Definition at line 67 of file gs_device_crystal.F90.
| type(c_ptr) gs_device_crystal::gs_device_crystal_t::sbuf_v_d = C_NULL_PTR |
Definition at line 71 of file gs_device_crystal.F90.
|
inherited |
Definition at line 55 of file gs_comm.f90.
| type(c_ptr), dimension(:), allocatable gs_device_crystal::gs_device_crystal_t::send_idx_d |
Definition at line 74 of file gs_device_crystal.F90.
| type(c_ptr), dimension(:), allocatable gs_device_crystal::gs_device_crystal_t::send_idx_v_d |
Definition at line 77 of file gs_device_crystal.F90.
|
inherited |
Definition at line 62 of file gs_comm.f90.
| type(c_ptr) gs_device_crystal::gs_device_crystal_t::sreqs = C_NULL_PTR |
Definition at line 83 of file gs_device_crystal.F90.
| integer gs_device_crystal::gs_device_crystal_t::tag = 0 |
Definition at line 88 of file gs_device_crystal.F90.
| type(c_ptr) gs_device_crystal::gs_device_crystal_t::unpack_d = C_NULL_PTR |
Definition at line 81 of file gs_device_crystal.F90.
| integer gs_device_crystal::gs_device_crystal_t::vec_nc = 0 |
Definition at line 91 of file gs_device_crystal.F90.
|
inherited |
Definition at line 68 of file gs_comm.f90.