Skip to content

Commit

Permalink
Revert one change, extend another to third array
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertPincus committed Feb 29, 2024
1 parent b69bb6e commit 70ebb31
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion rte-frontend/mo_optical_props.F90
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,11 @@ function init_base(this, band_lims_wvn, band_lims_gpt, name) result(err_message)
! Make a map between g-points and bands
! Efficient only when g-point indexes start at 1 and are contiguous.
!
if(allocated(this%gpt2band)) deallocate(this%gpt2band)
if(allocated(this%gpt2band)) then
!$acc exit data delete( this%gpt2band)
!$omp target exit data map(release:this%gpt2band)
deallocate(this%gpt2band)
end if
allocate(this%gpt2band(maxval(band_lims_gpt_lcl)))
do iband=1,size(band_lims_gpt_lcl,dim=2)
this%gpt2band(band_lims_gpt_lcl(1,iband):band_lims_gpt_lcl(2,iband)) = iband
Expand Down
4 changes: 2 additions & 2 deletions rte-frontend/mo_rte_lw.F90
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,8 @@ subroutine expand_and_transpose(ops,arr_in,arr_out)
nband = ops%get_nband()
ngpt = ops%get_ngpt()
limits = ops%get_band_lims_gpoint()
!$acc parallel loop collapse(2)
!$omp target teams distribute parallel do simd collapse(2)
!$acc parallel loop collapse(2) copyin(arr_in, limits)
!$omp target teams distribute parallel do simd collapse(2) map(to:arr_in, limits)
do iband = 1, nband
do icol = 1, ncol
do igpt = limits(1, iband), limits(2, iband)
Expand Down

0 comments on commit 70ebb31

Please sign in to comment.