diff --git a/src/ZSOLVER/turb.f90 b/src/ZSOLVER/turb.f90 index 8fa13802e433176044e3fa1135a53f786c2986c7..5ca0c9bd9cfa2b713e22220b79860ec583bc5ee6 100644 --- a/src/ZSOLVER/turb.f90 +++ b/src/ZSOLVER/turb.f90 @@ -1802,14 +1802,15 @@ real, dimension(:,:,:), pointer , contiguous :: zdrvsatdt ! !------------------------------------------------------------------------------- !JE: bug: nvhpc 22.2 compiler segfault if PRT/PPABST not in present list ! -!$acc data present( PT, PEXN, PCP, PLOCPEXN, PAMOIST, PATHETA, PPABST, PRT ) - if ( mppdb_initialized ) then - !Check all in arrays - call Mppdb_check( pt, "Compute_function_thermo beg:pt" ) - call Mppdb_check( pexn, "Compute_function_thermo beg:pexn" ) - call Mppdb_check( pcp, "Compute_function_thermo beg:pcp" ) - end if +if ( mppdb_initialized ) then + !Check all in arrays + call Mppdb_check( pt, "Compute_function_thermo beg:pt" ) + call Mppdb_check( pexn, "Compute_function_thermo beg:pexn" ) + call Mppdb_check( pcp, "Compute_function_thermo beg:pcp" ) +end if + +!$acc data present( PT, PEXN, PCP, PLOCPEXN, PAMOIST, PATHETA, PPABST, PRT ) #ifndef MNH_OPENACC allocate( zrvsat ( size( pexn, 1 ), size( pexn, 2 ), size( pexn, 3 ) ) ) @@ -2298,6 +2299,8 @@ END IF !$acc kernels DO CONCURRENT(JI=1:JIU , JJ=1:JJU ) PLM(JI,JJ,KKA) = PLM(JI,JJ,KKB ) +END DO +DO CONCURRENT(JI=1:JIU , JJ=1:JJU ) PLM(JI,JJ,KKU ) = PLM(JI,JJ,KKE) END DO !$acc end kernels