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 | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ocean_bc_state_t), | intent(inout) | :: | this |
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