Skip to content

Commit

Permalink
Parameter array on device, don't branch from structured data statement
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertPincus committed Jun 22, 2023
1 parent 33acad4 commit 6bf03ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions rrtmgp-frontend/mo_gas_optics_rrtmgp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ function gas_optics_int(this, &
!
! Gas optics
!
!$acc data copyin(play, plev, tlay)
!$acc enter data copyin(play, plev, tlay)
!$omp target enter data map(to:play, plev, tlay)
!$acc data create(jtemp, jpress, tropo, fmajor, jeta)
!$acc enter data create( jtemp, jpress, tropo, fmajor, jeta)
!$omp target enter data map(alloc:jtemp, jpress, tropo, fmajor, jeta)
error_msg = compute_gas_taus(this, &
ncol, nlay, ngpt, nband, &
Expand Down Expand Up @@ -329,9 +329,9 @@ function gas_optics_int(this, &
end if
!$acc exit data delete(tsfc)
!$omp target exit data map(release:tsfc)
!$acc end data
!$acc exit data delete(jtemp, jpress, tropo, fmajor, jeta)
!$omp target exit data map(release:jtemp, jpress, tropo, fmajor, jeta)
!$acc end data
!$acc exit data delete(play, plev, tlay)
!$omp target exit data map(release:play, plev, tlay)
end function gas_optics_int
!------------------------------------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion rte-frontend/mo_rte_lw.F90
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ function rte_lw(optical_props, top_at_1, &
0.2009319137_wp, 0.2292411064_wp, 0.0698269799_wp, 0._wp, &
0.1355069134_wp, 0.2034645680_wp, 0.1298475476_wp, 0.0311809710_wp], &
[max_gauss_pts, max_gauss_pts])
!$acc declare create(gauss_Ds, gauss_wts)
! ------------------------------------------------------------------------------------
ncol = optical_props%get_ncol()
nlay = optical_props%get_nlay()
Expand Down Expand Up @@ -309,7 +310,7 @@ function rte_lw(optical_props, top_at_1, &
!
! Compute the radiative transfer...
!
!$acc data create( sfc_emis_gpt, flux_up_loc, flux_dn_loc, gpt_flux_up, gpt_flux_dn) copyin(gauss_wts, gauss_Ds)
!$acc data create( sfc_emis_gpt, flux_up_loc, flux_dn_loc, gpt_flux_up, gpt_flux_dn)
!$omp target data map(alloc:sfc_emis_gpt, flux_up_loc, flux_dn_loc, gpt_flux_up, gpt_flux_dn) map(to:gauss_wts, gauss_Ds)
call expand_and_transpose(optical_props, sfc_emis, sfc_emis_gpt)
if(check_values) error_msg = optical_props%validate()
Expand Down

0 comments on commit 6bf03ae

Please sign in to comment.