From 40bee52c579016cd98bc552096b25e7cf45befca Mon Sep 17 00:00:00 2001
From: Juan Escobar <juan.escobar@aero.obs-mip.fr>
Date: Tue, 21 Sep 2021 12:00:11 +0200
Subject: [PATCH] Juan 21/09/2021:ZSOLVER/turb_hor_thermo_flux.f90 , remove
 some empty acc kernels/end kernels ,generating empty serial kernels

---
 src/ZSOLVER/turb_hor_thermo_flux.f90 | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/ZSOLVER/turb_hor_thermo_flux.f90 b/src/ZSOLVER/turb_hor_thermo_flux.f90
index 14cba9ab4..76a1d60c2 100644
--- a/src/ZSOLVER/turb_hor_thermo_flux.f90
+++ b/src/ZSOLVER/turb_hor_thermo_flux.f90
@@ -374,7 +374,7 @@ ZFLX(:,:,IKB) = -XCSHF * ZTMP1_DEVICE(:,:,1) *          &
   ( ZTMP2_DEVICE(:,:,1) * PINV_PDXX(:,:,IKB) - ZTMP4_DEVICE(:,:,1)      &
         *0.5* ( PDZX(:,:,IKB+1)+PDZX(:,:,IKB))       &
         * PINV_PDXX(:,:,IKB) )
-!$acc end kernels
+! acc end kernels
 #endif
 ! extrapolates the flux under the ground so that the vertical average with 
 ! the IKB flux gives the ground value  ( warning the tangential surface
@@ -383,8 +383,7 @@ ZFLX(:,:,IKB) = -XCSHF * ZTMP1_DEVICE(:,:,1) *          &
 ZFLX(:,:,IKB-1:IKB-1) = 2. * MXM(  SPREAD( PSFTHM(:,:)* PDIRCOSXW(:,:), 3,1) )  &
                        - ZFLX(:,:,IKB:IKB)
 #else
-!$acc kernels
-!$acc loop independent collapse(2)
+! acc kernels
 DO CONCURRENT ( JI=1:JIU,JJ=1:JJU )
    ZTMP1_DEVICE(JI,JJ,1) = PSFTHM(JI,JJ)* PDIRCOSXW(JI,JJ)
 END DO
@@ -884,10 +883,7 @@ END DO
       CALL MZF_DEVICE(1,IKU,1, ZTMP6_DEVICE, ZTMP7_DEVICE )
       !$acc kernels
       ZFLXC(:,:,:) = ZFLXC(:,:,:) + 2.*( ZTMP3_DEVICE(:,:,:) + ZTMP7_DEVICE(:,:,:) )
-      !$acc end kernels
       !
-      !
-      !$acc kernels
       ZTMP6_DEVICE(:,:,:) = ZTMP4_DEVICE(:,:,:)*ZTMP5_DEVICE(:,:,:)*PINV_PDZZ(:,:,:)
       !$acc end kernels
       CALL DZF_DEVICE(1,IKU,1, ZTMP6_DEVICE, ZTMP3_DEVICE )
-- 
GitLab