Skip to content
Snippets Groups Projects
Commit c8ac5669 authored by ESCOBAR MUNOZ Juan's avatar ESCOBAR MUNOZ Juan
Browse files

Juan 21/09/2021:zsolver_inv.f90, use MNH_ALLOCATE + pointer contiguous for GPU opt

parent 9906bd7b
No related branches found
No related tags found
No related merge requests found
...@@ -150,6 +150,9 @@ SUBROUTINE ZSOLVER_INV(HLBCX,HLBCY,PDXHATM,PDYHATM,PRHOM,PAF,PBF,PCF, & ...@@ -150,6 +150,9 @@ SUBROUTINE ZSOLVER_INV(HLBCX,HLBCY,PDXHATM,PDYHATM,PRHOM,PAF,PBF,PCF, &
USE MODI_DOTPROD USE MODI_DOTPROD
! !
USE mode_mg_main_mnh USE mode_mg_main_mnh
#ifdef MNH_OPENACC
USE MODE_MNH_ZWORK , ONLY : MNH_ALLOCATE_ZT3D , MNH_REL_ZT3D
#endif
! !
IMPLICIT NONE IMPLICIT NONE
! !
...@@ -191,14 +194,10 @@ SUBROUTINE ZSOLVER_INV(HLBCX,HLBCY,PDXHATM,PDYHATM,PRHOM,PAF,PBF,PCF, & ...@@ -191,14 +194,10 @@ SUBROUTINE ZSOLVER_INV(HLBCX,HLBCY,PDXHATM,PDYHATM,PRHOM,PAF,PBF,PCF, &
! !
!* 0.2 declaration of local variables !* 0.2 declaration of local variables
! !
REAL, DIMENSION(SIZE(PY,1),SIZE(PY,2),SIZE(PY,3)) :: ZY ! work array to store REAL, DIMENSION(:,:,:), pointer , contiguous :: ZY ! work array to store
! the RHS of the equation ! the RHS of the equation
! INTEGER :: IZY
!REAL, DIMENSION(SIZE(PY,1),SIZE(PY,2),SIZE(PY,3)) :: ZWORK ! work array used by !
! the FFT. It has been enlarged in order to be sufficient for 2D and 3D cases
!
REAL, DIMENSION(SIZE(PBF,1),SIZE(PBF,2),SIZE(PBF,3)) :: ZAF ! work array to
! ! expand PAF
INTEGER :: IIB ! indice I for the first inner mass point along x INTEGER :: IIB ! indice I for the first inner mass point along x
INTEGER :: IIE ! indice I for the last inner mass point along x INTEGER :: IIE ! indice I for the last inner mass point along x
INTEGER :: IJB ! indice J for the first inner mass point along y INTEGER :: IJB ! indice J for the first inner mass point along y
...@@ -222,6 +221,11 @@ SUBROUTINE ZSOLVER_INV(HLBCX,HLBCY,PDXHATM,PDYHATM,PRHOM,PAF,PBF,PCF, & ...@@ -222,6 +221,11 @@ SUBROUTINE ZSOLVER_INV(HLBCX,HLBCY,PDXHATM,PDYHATM,PRHOM,PAF,PBF,PCF, &
IKB=1+JPVEXT IKB=1+JPVEXT
IKE=IKU - JPVEXT IKE=IKU - JPVEXT
! !
#ifndef MNH_OPENACC
ALLOCATE(ZY(IIU,IJU,IKU))
#else
IZY = MNH_ALLOCATE_ZT3D(ZY ,IIU,IJU,IKU )
#endif
! !
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! !
...@@ -312,6 +316,11 @@ SUBROUTINE ZSOLVER_INV(HLBCX,HLBCY,PDXHATM,PDYHATM,PRHOM,PAF,PBF,PCF, & ...@@ -312,6 +316,11 @@ SUBROUTINE ZSOLVER_INV(HLBCX,HLBCY,PDXHATM,PDYHATM,PRHOM,PAF,PBF,PCF, &
! !
CALL PF_1_Y_BOUND(PF_1_Y) CALL PF_1_Y_BOUND(PF_1_Y)
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
#ifndef MNH_OPENACC
DEALLOCATE(ZY)
#else
CALL MNH_REL_ZT3D(IZY)
#endif
! !
CONTAINS CONTAINS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment