(Re)allocate both buffers for nslab slabs per peer
(exit-delete / dealloc / alloc / enter-create, as
ocean_halo_buffers_ensure_nz). Never while a group is open.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nslab |
subroutine grow_buffers(nslab) !! (Re)allocate both buffers for `nslab` slabs per peer !! (exit-delete / dealloc / alloc / enter-create, as !! `ocean_halo_buffers_ensure_nz`). Never while a group is open. integer, intent(in) :: nslab if (fx_open) error stop "rdb_ocean_fold_exchange: buffer growth inside an open group" if (allocated(fx_sbuf)) then !$acc exit data delete(fx_sbuf, fx_rbuf) deallocate (fx_sbuf, fx_rbuf) end if fx_slab_cap = nslab fx_cap = nslab*fx_nmax allocate (fx_sbuf(fx_cap*max(fx_npeer, 1)), fx_rbuf(fx_cap*max(fx_npeer, 1))) !$acc enter data create(fx_sbuf, fx_rbuf) end subroutine grow_buffers