ocean_bc_state_enter_data Subroutine

public subroutine ocean_bc_state_enter_data(this)

GPU mapping for ocean_bc_state_t.

Parent-first rule (design §1, GPU storage): copyin(this) MUST precede the component copies so the device descriptor for this is live before the component attach. Reverse applies on exit (components first, parent last). Missing the parent copyin causes UVM-page-fault per DC launch.

The reservoir arrays (§1) and Orlanski radiation arrays (§2) are mapped; the data_* buffers remain host-only (not consumed by device kernels).

Arguments

Type IntentOptional Attributes Name
type(ocean_bc_state_t), intent(inout) :: this

Called by

proc~~ocean_bc_state_enter_data~~CalledByGraph proc~ocean_bc_state_enter_data ocean_bc_state_enter_data proc~ocean_state_enter_data ocean_state_enter_data proc~ocean_state_enter_data->proc~ocean_bc_state_enter_data proc~engine_enter_data engine_enter_data proc~engine_enter_data->proc~ocean_state_enter_data proc~complete_ocean_create complete_ocean_create proc~complete_ocean_create->proc~engine_enter_data proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_enter_data proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean proc~rdb_ocean_create_finalize rdb_ocean_create_finalize proc~rdb_ocean_create_finalize->proc~complete_ocean_create proc~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~complete_ocean_create

Source Code

   subroutine ocean_bc_state_enter_data(this)
      !! GPU mapping for `ocean_bc_state_t`.
      !!
      !! Parent-first rule (design §1, GPU storage): `copyin(this)` MUST precede
      !! the component copies so the device descriptor for `this` is live before
      !! the component attach.  Reverse applies on exit (components first, parent
      !! last).  Missing the parent copyin causes UVM-page-fault per DC launch.
      !!
      !! The reservoir arrays (§1) and Orlanski radiation arrays (§2) are mapped;
      !! the data_* buffers remain host-only (not consumed by device kernels).
      type(ocean_bc_state_t), intent(inout) :: this
      if (.not. this%is_init) return
      !$acc enter data copyin(this)
      if (allocated(this%tres_west)) then
         !$acc enter data copyin(this%tres_west)
      end if
      if (allocated(this%tres_east)) then
         !$acc enter data copyin(this%tres_east)
      end if
      if (allocated(this%tres_south)) then
         !$acc enter data copyin(this%tres_south)
      end if
      if (allocated(this%tres_north)) then
         !$acc enter data copyin(this%tres_north)
      end if
      ! Orlanski rx and u_prev arrays (§2, v2).
      if (allocated(this%rx_west)) then
         !$acc enter data copyin(this%rx_west)
      end if
      if (allocated(this%rx_east)) then
         !$acc enter data copyin(this%rx_east)
      end if
      if (allocated(this%rx_south)) then
         !$acc enter data copyin(this%rx_south)
      end if
      if (allocated(this%rx_north)) then
         !$acc enter data copyin(this%rx_north)
      end if
      if (allocated(this%u_prev_west)) then
         !$acc enter data copyin(this%u_prev_west)
      end if
      if (allocated(this%u_prev_east)) then
         !$acc enter data copyin(this%u_prev_east)
      end if
      if (allocated(this%u_prev_south)) then
         !$acc enter data copyin(this%u_prev_south)
      end if
      if (allocated(this%u_prev_north)) then
         !$acc enter data copyin(this%u_prev_north)
      end if
   end subroutine ocean_bc_state_enter_data