Persistent state for split begin/end halo exchange
Pre-allocates combined send/recv buffers for all 4 fields in each direction, avoiding per-timestep allocate/deallocate. Buffers are stored at module level (ha_buf_*) so OpenACC can resolve present() lookups without derived-type traversal.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(decomp_t), | public | :: | decomp | ||||
| logical, | public | :: | initialised | = | .false. | ||
| integer, | public | :: | nghost | = | 0 | ||
| integer, | public | :: | nreq | = | 0 | ||
| integer, | public | :: | nx_local | = | 0 | ||
| integer, | public | :: | nx_total | = | 0 | ||
| integer, | public | :: | ny_local | = | 0 | ||
| integer, | public | :: | ny_total | = | 0 | ||
| integer, | public | :: | rank_east | = | -1 | ||
| integer, | public | :: | rank_north | = | -1 | ||
| integer, | public | :: | rank_south | = | -1 | ||
| integer, | public | :: | rank_west | = | -1 | ||
| type(request_t), | public | :: | reqs(MAX_REQS) | ||||
| integer, | public | :: | strip_ew | = | 0 | ||
| integer, | public | :: | strip_sn | = | 0 |
type :: halo_async_t !! Persistent state for split begin/end halo exchange !! !! Pre-allocates combined send/recv buffers for all 4 fields !! in each direction, avoiding per-timestep allocate/deallocate. !! Buffers are stored at module level (ha_buf_*) so OpenACC !! can resolve present() lookups without derived-type traversal. type(request_t) :: reqs(MAX_REQS) integer :: nreq = 0 integer :: strip_ew = 0 integer :: strip_sn = 0 integer :: nx_total = 0, ny_total = 0 integer :: nghost = 0, nx_local = 0, ny_local = 0 integer :: rank_west = -1, rank_east = -1 integer :: rank_south = -1, rank_north = -1 type(decomp_t) :: decomp logical :: initialised = .false. end type halo_async_t