Skip to content
Snippets Groups Projects
Commit a8a41fd5 authored by Juan Escobar's avatar Juan Escobar
Browse files

Juan 23/02/2022:Cray Optimisation, add "!dir$ concurrent" on some ARRAY SYNTAX

parent c5e7c98c
Branches
Tags
1 merge request!4Jean Wurtz 30/04/2025 : Bugfixes mainly for TEB and for simple precision
......@@ -487,7 +487,7 @@ IF(LBLOWSNOW) THEN ! Put 2D Canopy blowing snow variables into a 3D array for
#endif
ZSNWC_INIT(:,:,:,:) = 0.
ZRSNWCS(:,:,:,:) = 0.
!dir$ concurrent
DO JSV=1,(NBLOWSNOW_2D)
ZSNWC_INIT(:,:,IKB,JSV) = XSNWCANO(:,:,JSV)
ZRSNWCS(:,:,IKB,JSV) = XRSNWCANOS(:,:,JSV)
......@@ -750,17 +750,22 @@ ZRWCPPM(:,:,:) = ZRWCPPM(:,:,:)*ZTSTEP_PPM
! Clouds related processes from previous time-step are taken into account in PRTHS_CLD
! Advection related processes from previous time-step will be taken into account in ZRTHS_PPM
!
!dir$ concurrent
ZRTHS_OTHER(:,:,:) = PRTHS(:,:,:) - PTHT(:,:,:) * PRHODJ(:,:,:) / PTSTEP
!dir$ concurrent
IF (GTKE) ZRTKES_OTHER(:,:,:) = PRTKES(:,:,:) - PTKET(:,:,:) * PRHODJ(:,:,:) / PTSTEP
DO JR = 1, KRR
!dir$ concurrent
ZRRS_OTHER(:,:,:,JR) = PRRS(:,:,:,JR) - PRT(:,:,:,JR) * PRHODJ(:,:,:) / PTSTEP
END DO
DO JSV = 1, KSV
!dir$ concurrent
ZRSVS_OTHER(:,:,:,JSV) = PRSVS(:,:,:,JSV) - PSVT(:,:,:,JSV) * PRHODJ / PTSTEP
END DO
!$acc end kernels
IF(LBLOWSNOW) THEN
DO JSV = 1, (NBLOWSNOW_2D)
!dir$ concurrent
ZRSNWCS_OTHER(:,:,:,JSV) = ZRSNWCS(:,:,:,JSV) - ZSNWC_INIT(:,:,:,JSV) * PRHODJ / PTSTEP
END DO
ENDIF
......@@ -842,8 +847,11 @@ CALL PPM_RHODJ(HLBCX,HLBCY, ZRUCPPM, ZRVCPPM, ZRWCPPM, &
!
!* values of the fields at the beginning of the time splitting loop
!$acc kernels
!dir$ concurrent
ZTH(:,:,:) = PTHT(:,:,:)
!dir$ concurrent
IF (KRR /=0 ) ZR(:,:,:,:) = PRT(:,:,:,:)
!dir$ concurrent
IF (KSV /=0 ) ZSV(:,:,:,:) = PSVT(:,:,:,:)
!
IF (GTKE) THEN
......@@ -892,9 +900,13 @@ DO JSPL=1,KSPLIT
!
! acc kernels
!$acc kernels
!dir$ concurrent
PRTHS(:,:,:) = PRTHS (:,:,:) + ZRTHS_PPM (:,:,:) / KSPLIT
!dir$ concurrent
IF (GTKE) PRTKES_ADV(:,:,:) = PRTKES_ADV(:,:,:) + ZRTKES_PPM(:,:,:) / KSPLIT
!dir$ concurrent
IF (KRR /=0) PRRS (:,:,:,:) = PRRS (:,:,:,:) + ZRRS_PPM (:,:,:,:) / KSPLIT
!dir$ concurrent
IF (KSV /=0 ) PRSVS (:,:,:,:) = PRSVS (:,:,:,:) + ZRSVS_PPM (:,:,:,:) / KSPLIT
!$acc end kernels
!
......
......@@ -215,6 +215,7 @@ ELSE
CALL GET_HALO_D(PRT(:,:,:,JWATER))
#endif
!$acc kernels
!dir$ concurrent
ZWORK1(:,:,:) = ZWORK1(:,:,:) + PRT(:,:,:,JWATER)
!$acc end kernels
END DO
......@@ -228,6 +229,7 @@ ELSE
#endif
!
!$acc kernels
!dir$ concurrent
ZWORK2(:,:,:) = PTHT(:,:,:) * (1. + PRT(:,:,:,1)*ZRV_OV_RD) / ZWORK1(:,:,:)
!$acc end kernels
ELSE
......@@ -245,6 +247,7 @@ ELSE
PRWS(:,:,:) = XG * MZM( ( (ZWORK2/PTHVREF) - 1. ) * PRHODJ )
#else
!$acc kernels
!dir$ concurrent
ZWORK1(:,:,:) = ( ( ZWORK2(:,:,:) / PTHVREF(:,:,:) ) - 1. ) * PRHODJ(:,:,:)
!$acc end kernels
CALL MZM_DEVICE(ZWORK1,ZWORK2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment