From f340df3436a55aa05d6997a0dd964efc068c30c7 Mon Sep 17 00:00:00 2001 From: Robert Pincus Date: Tue, 21 May 2024 13:18:52 -0400 Subject: [PATCH] Fix CCE OpenMP workaround (type bound functions not implemented in OMP kernels) --- examples/all-sky/rrtmgp_allsky.F90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/all-sky/rrtmgp_allsky.F90 b/examples/all-sky/rrtmgp_allsky.F90 index 33432f097..f891a194e 100644 --- a/examples/all-sky/rrtmgp_allsky.F90 +++ b/examples/all-sky/rrtmgp_allsky.F90 @@ -93,6 +93,7 @@ program rte_rrtmgp_allsky integer :: nbnd, ngpt integer :: icol, ilay, ibnd, iloop, igas + logical :: top_is_at_1 ! CCE OMP workaround character(len=8) :: char_input integer :: nUserArgs, nloops, ncol, nlay @@ -248,9 +249,10 @@ program rte_rrtmgp_allsky !$acc enter data create (t_sfc, emis_sfc) !$omp target enter data map(alloc:t_sfc, emis_sfc) ! Surface temperature + top_is_at_1 = atmos%top_is_at_1() ! CCE OMP workaround !$acc kernels !$omp target - t_sfc = t_lev(1, merge(nlay+1, 1, atmos%top_is_at_1())) + t_sfc = t_lev(1, merge(nlay+1, 1, top_is_at_1)) emis_sfc = 0.98_wp !$acc end kernels !$omp end target