halo_sync_buffers_cleanup Subroutine

public subroutine halo_sync_buffers_cleanup()

Release the persistent halo buffers. Idempotent.

Arguments

None

Called by

proc~~halo_sync_buffers_cleanup~~CalledByGraph proc~halo_sync_buffers_cleanup halo_sync_buffers_cleanup proc~halo_sync_buffers_ensure halo_sync_buffers_ensure proc~halo_sync_buffers_ensure->proc~halo_sync_buffers_cleanup proc~halo_exchange_2d_device halo_exchange_2d_device proc~halo_exchange_2d_device->proc~halo_sync_buffers_ensure

Source Code

   subroutine halo_sync_buffers_cleanup()
      !! Release the persistent halo buffers.  Idempotent.
      if (.not. allocated(hs_buf_send_west)) return

      !$acc exit data delete(hs_buf_send_west, hs_buf_recv_west, &
      !$acc&                 hs_buf_send_east, hs_buf_recv_east, &
      !$acc&                 hs_buf_send_south, hs_buf_recv_south, &
      !$acc&                 hs_buf_send_north, hs_buf_recv_north)
      deallocate (hs_buf_send_west, hs_buf_recv_west)
      deallocate (hs_buf_send_east, hs_buf_recv_east)
      deallocate (hs_buf_send_south, hs_buf_recv_south)
      deallocate (hs_buf_send_north, hs_buf_recv_north)

      hs_nghost = 0
      hs_nx_total = 0
      hs_ny_total = 0

   end subroutine halo_sync_buffers_cleanup