From 7a65f4c5c3baa173fb105a76cf4a2f5bc5e1e653 Mon Sep 17 00:00:00 2001 From: Wautelet Philippe <waup@aeropc45.aero.obs-mip.fr> Date: Wed, 27 Oct 2021 15:58:44 +0200 Subject: [PATCH] Philippe 27/10/2021: remove unnecessary old PGI bug workarounds --- src/MNH/advection_metsv.f90 | 3 -- src/MNH/advecuvw_rk.f90 | 4 --- src/MNH/ice4_fast_rg.f90 | 4 --- src/MNH/ice4_sedimentation_split.f90 | 2 -- src/MNH/ice4_tendencies.f90 | 2 -- src/MNH/ppm.f90 | 41 ---------------------------- src/MNH/rain_ice_red.f90 | 18 ------------ 7 files changed, 74 deletions(-) diff --git a/src/MNH/advection_metsv.f90 b/src/MNH/advection_metsv.f90 index fdc19d538..0c6247740 100644 --- a/src/MNH/advection_metsv.f90 +++ b/src/MNH/advection_metsv.f90 @@ -943,9 +943,6 @@ DO JSPL=1,KSPLIT !$acc end kernels END IF ! acc end kernels - -!PW: bug PGI 18.10: not necessary for PRRS,PRSVS but error with decriptor not present -!$acc update self(PRRS,PRSVS) ! ! Top and bottom Boundaries and LBC for the guesses ! diff --git a/src/MNH/advecuvw_rk.f90 b/src/MNH/advecuvw_rk.f90 index bcb889933..6ef138732 100644 --- a/src/MNH/advecuvw_rk.f90 +++ b/src/MNH/advecuvw_rk.f90 @@ -455,10 +455,6 @@ ZRVS(:, :, :, : ) = 0. ZRWS(:, :, :, : ) = 0. !$acc end kernels -!Necessary to work around a PGI bug (19.10) -!because following update ZRUS(:,:,:,JS) are done on the WHOLE array -!$acc update self(ZRUS,ZRVS,ZRWS) - !------------------------------------------------------------------------------- ! !* 3. BEGINNING of Runge-Kutta loop diff --git a/src/MNH/ice4_fast_rg.f90 b/src/MNH/ice4_fast_rg.f90 index c66c5f85c..68a0c829e 100644 --- a/src/MNH/ice4_fast_rg.f90 +++ b/src/MNH/ice4_fast_rg.f90 @@ -424,10 +424,6 @@ DO JJ = 1, SIZE(GDRY) END IF END DO !$acc end kernels -!PW: BUG: this is necessary to get correct results (PGI 18.10, 19.10) -! !$acc update self(GDRY,IGDRY) -! !$acc update self(IGDRY) -! IF(JJ==-999) print *,jj ! !$acc kernels IF(LDSOFT) THEN !$acc kernels diff --git a/src/MNH/ice4_sedimentation_split.f90 b/src/MNH/ice4_sedimentation_split.f90 index 184ad4a38..1c72edd94 100644 --- a/src/MNH/ice4_sedimentation_split.f90 +++ b/src/MNH/ice4_sedimentation_split.f90 @@ -678,8 +678,6 @@ DO WHILE (ANY(ZREMAINT>0.)) ENDDO ZREMAINT(:,:) = ZREMAINT(:,:) - ZMAX_TSTEP(:,:) !$acc end kernels -!PW:BUG PGI: do not set independent (wrong results with PGI 19.10) -!acc loop independent private(ZMRCHANGE) !$acc kernels DO JK = KKTB , KKTE !$acc loop independent collapse(2) diff --git a/src/MNH/ice4_tendencies.f90 b/src/MNH/ice4_tendencies.f90 index 5be0afd94..d2145de2b 100644 --- a/src/MNH/ice4_tendencies.f90 +++ b/src/MNH/ice4_tendencies.f90 @@ -773,8 +773,6 @@ IF(ISIZE>0) THEN ENDIF ! ! -!PW:BUG: the following line is necessary for correct computation (at least for PGI 18.10) -! if(KRR==-1) print *,'PW: ICE4_TENDENCIES: ODSOFT (cpu)=',ODSOFT CALL ICE4_SLOW(ODSOFT, PCOMPUTE, PRHODREF, ZT, & &PSSI, PLVFACT, PLSFACT, & &ZRVT, ZRCT, ZRIT, ZRST, ZRGT, & diff --git a/src/MNH/ppm.f90 b/src/MNH/ppm.f90 index 9d1f1e611..2db3a4daa 100644 --- a/src/MNH/ppm.f90 +++ b/src/MNH/ppm.f90 @@ -2177,47 +2177,6 @@ END WHERE ! ZDQ = ZQR - ZQL #else -!!! -!!! initialize final parabolae parameters -!!! -!!ZQL = ZQL0 -!!ZQR = ZQR0 -!!ZQ6 = ZQ60 -!!! -!!! eliminate over and undershoots and create qL and qR as in Lin96 -!!! -!!!PW: BUG: done like that because if using PGI (tested up to 16.10) -!!! will cause crashes at run (address not mapped) -!!! and problems at compilation -!!$WHERE ( ZDMQ == 0.0 ) -!!$ ZQL = PSRC -!!$ ZQR = PSRC -!!$ ZQ6 = 0.0 -!!$END WHERE -!!#ifndef MNH_BITREP -!!$WHERE ( ( ZDMQ /= 0.0 ) .AND. ( ZQ60*ZDQ < -ZDQ**2 ) ) -!!#else -!!$WHERE ( ( ZDMQ /= 0.0 ) .AND. ( ZQ60*ZDQ < -BR_P2(ZDQ) ) ) -!!#endif -!!$WHERE ( ( ZDMQ /= 0.0 ) .AND. ( ZQ60*ZDQ < -BR_P2(ZDQ) ) ) -!!$ ZQ6 = 3.0*(ZQL0 - PSRC) -!!$ ZQR = ZQL0 - ZQ6 -!!$ ZQL = ZQL0 -!!$END WHERE -!!#ifndef MNH_BITREP -!!$WHERE ( ( ZDMQ /= 0.0 ) .AND. ( ZQ60*ZDQ > ZDQ**2 ) ) -!!#else -!!$WHERE ( ( ZDMQ /= 0.0 ) .AND. ( ZQ60*ZDQ > BR_P2(ZDQ) ) ) -!!#endif -!!$WHERE ( ( ZDMQ /= 0.0 ) .AND. ( ZQ60*ZDQ > BR_P2(ZDQ) ) ) -!!$ ZQ6 = 3.0*(ZQR0 - PSRC) -!!$ ZQL = ZQR0 - ZQ6 -!!$ ZQR = ZQR0 -!!$END WHERE -!!! -!!! recalculate coefficients of the parabolae -!!! -!!ZDQ = ZQR - ZQL !$acc loop independent collapse(3) DO K=1,IKU DO J=1,IJU diff --git a/src/MNH/rain_ice_red.f90 b/src/MNH/rain_ice_red.f90 index 281ca569b..39cf807e9 100644 --- a/src/MNH/rain_ice_red.f90 +++ b/src/MNH/rain_ice_red.f90 @@ -1710,24 +1710,6 @@ ELSE END DO !$acc end kernels ! -!PW: bug: the following dummy IF is necessary for this subroutine to work... (PGI 18.10) -IF (IP==0) THEN -!$acc update self(ODMICRO,ZW_RVS,ZRVT) - idx=0 - DO JK=1,SIZE(ODMICRO,3) - DO JJ=1,SIZE(ODMICRO,2) - DO JI=1,SIZE(ODMICRO,1) - if(odmicro(ji,jj,jk)) then - idx=idx+1 - write(*,"( 'PW:',I4,I4,I4,I6,3E16.8 )") JI,JJ,JK,IDX,ZW_RVS(JI,JJ,JK),ZRVT(IDX),PRVT(JI,JJ,JK) - else - if( abs( ZW_RVS(JI,JJ,JK)-PRVT(JI,JJ,JK) ) > 1e-14 ) print *,'PW: aie: ',JI,JJ,JK,ZW_RVS(JI,JJ,JK) - end if - end do - end do - end do -END IF -! !$acc kernels ZW_RVS(:,:,:) = ( ZW_RVS(:,:,:) - PRVT(:,:,:) ) * ZINV_TSTEP ZW_RCS(:,:,:) = ( ZW_RCS(:,:,:) - PRCT(:,:,:) ) * ZINV_TSTEP -- GitLab