Skip to content
Snippets Groups Projects
Commit 95b6f292 authored by WAUTELET Philippe's avatar WAUTELET Philippe
Browse files

Philippe 29/08/2023: OpenACC: work around for a problem with NVHPC 23.7 (not...

Philippe 29/08/2023: OpenACC: work around for a problem with NVHPC 23.7 (not present in older versions)

(cherry picked from commit ce39d7dc)
parent 07458945
No related branches found
No related tags found
No related merge requests found
......@@ -1102,13 +1102,18 @@ END IF
#else
IF ( KRRL >= 1 ) THEN
IF ( KRRI >= 1 ) THEN
!Remark: to work around a problem with NVHPC 23.7 (not present in previous NVHPC versions),
! the computation of ZTMP1_DEVICE and ZTMP2_DEVICE has been split in 2 different kernels
!$acc kernels
!dir$ concurrent
ZTMP1_DEVICE(:,:,:) = PRHODJ(:,:,:) * PATHETA(:,:,:) * 2. * PSRCM(:,:,:)
!$acc end kernels
#ifdef MNH_COMPILER_CCE
!$acc kernels present(ZTMP2_DEVICE)
#else
!$acc kernels
!$acc kernels
#endif
!dir$ concurrent
ZTMP1_DEVICE(:,:,:) = PRHODJ(:,:,:) * PATHETA(:,:,:) * 2. * PSRCM(:,:,:)
!dir$ concurrent
ZTMP2_DEVICE(:,:,:) = ZFLXZ(:,:,:) / PDZZ(:,:,:)
!$acc end kernels
CALL DZF_DEVICE( ZTMP2_DEVICE, ZTMP3_DEVICE )
......@@ -1117,13 +1122,18 @@ IF ( KRRL >= 1 ) THEN
PRRS(:,:,:,4) = PRRS(:,:,:,4) - ZTMP1_DEVICE(:,:,:) * ZTMP3_DEVICE * PFRAC_ICE(:,:,:)
!$acc end kernels
ELSE
!Remark: to work around a problem with NVHPC 23.7 (not present in previous NVHPC versions),
! the computation of ZTMP1_DEVICE and ZTMP2_DEVICE has been split in 2 different kernels
!$acc kernels
!dir$ concurrent
ZTMP1_DEVICE(:,:,:) = PRHODJ(:,:,:) * PATHETA(:,:,:) * 2. * PSRCM(:,:,:)
!$acc end kernels
#ifdef MNH_COMPILER_CCE
!$acc kernels present(ZTMP2_DEVICE)
#else
!$acc kernels
!$acc kernels
#endif
!dir$ concurrent
ZTMP1_DEVICE(:,:,:) = PRHODJ(:,:,:) * PATHETA(:,:,:) * 2. * PSRCM(:,:,:)
!dir$ concurrent
ZTMP2_DEVICE(:,:,:) = ZFLXZ(:,:,:) / PDZZ(:,:,:)
!$acc end kernels
CALL DZF_DEVICE( ZTMP2_DEVICE, ZTMP3_DEVICE )
......@@ -1596,28 +1606,38 @@ IF (KRR /= 0) THEN
#else
IF ( KRRL >= 1 ) THEN
IF ( KRRI >= 1 ) THEN
!Remark: to work around a problem with NVHPC 23.7 (not present in previous NVHPC versions),
! the computation of ZTMP1_DEVICE and ZTMP2_DEVICE has been split in 2 different kernels
!$acc kernels
!dir$ concurrent
ZTMP1_DEVICE(:,:,:) = PRHODJ(:,:,:)*PAMOIST(:,:,:)*2.*PSRCM(:,:,:)
!$acc end kernels
#ifdef MNH_COMPILER_CCE
!$acc kernels present(ZTMP2_DEVICE)
!$acc kernels present(ZTMP2_DEVICE)
#else
!$acc kernels
!$acc kernels
#endif
!dir$ concurrent
ZTMP1_DEVICE(:,:,:) = PRHODJ(:,:,:)*PAMOIST(:,:,:)*2.*PSRCM(:,:,:)
!dir$ concurrent
ZTMP2_DEVICE(:,:,:) = ZFLXZ(:,:,:)/PDZZ(:,:,:)
!$acc end kernels
!$acc end kernels
CALL DZF_DEVICE( ZTMP2_DEVICE, ZTMP3_DEVICE )
!$acc kernels
PRRS(:,:,:,2) = PRRS(:,:,:,2) - ZTMP1_DEVICE(:,:,:) * ZTMP3_DEVICE(:,:,:) * (1.0-PFRAC_ICE(:,:,:))
PRRS(:,:,:,4) = PRRS(:,:,:,4) - ZTMP1_DEVICE(:,:,:) * ZTMP3_DEVICE(:,:,:) * PFRAC_ICE(:,:,:)
!$acc end kernels
ELSE
!Remark: to work around a problem with NVHPC 23.7 (not present in previous NVHPC versions),
! the computation of ZTMP1_DEVICE and ZTMP2_DEVICE has been split in 2 different kernels
!$acc kernels
!dir$ concurrent
ZTMP1_DEVICE(:,:,:) = PRHODJ(:,:,:)*PAMOIST(:,:,:)*2.*PSRCM(:,:,:)
!$acc end kernels
#ifdef MNH_COMPILER_CCE
!$acc kernels present(ZTMP2_DEVICE)
!$acc kernels present(ZTMP2_DEVICE)
#else
!$acc kernels
!$acc kernels
#endif
!dir$ concurrent
ZTMP1_DEVICE(:,:,:) = PRHODJ(:,:,:)*PAMOIST(:,:,:)*2.*PSRCM(:,:,:)
!dir$ concurrent
ZTMP2_DEVICE(:,:,:) = ZFLXZ(:,:,:)/PDZZ(:,:,:)
!$acc end kernels
CALL DZF_DEVICE( ZTMP2_DEVICE, ZTMP3_DEVICE )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment