diff --git a/src/ZSOLVER/zsolver.f90 b/src/ZSOLVER/zsolver.f90 index 15130e126c3b527659897b3fae7947862222e011..cf946159583715dd78395c60066aeeb9081a22b1 100644 --- a/src/ZSOLVER/zsolver.f90 +++ b/src/ZSOLVER/zsolver.f90 @@ -152,6 +152,7 @@ USE MODI_DOTPROD USE MODE_MNH_ZWORK, ONLY: MNH_MEM_GET, MNH_MEM_POSITION_PIN, MNH_MEM_RELEASE #endif ! +USE MODE_MPPDB ! IMPLICIT NONE ! @@ -227,6 +228,23 @@ INTEGER :: JI,JJ,JK !* 1. INITIALIZATIONS ! --------------- ! +if ( mppdb_initialized ) then + !Check all in arrays + call Mppdb_check( PY, "Zsolver beg:PY" ) + call Mppdb_check( PPHI, "Zsolver beg:PPHI" ) + call Mppdb_check( PAF_ZS, "Zsolver beg:PAF_ZS" ) + call Mppdb_check( PBF_ZS, "Zsolver beg:PBF_ZS" ) + call Mppdb_check( PCF_ZS, "Zsolver beg:PCF_ZS" ) + call Mppdb_check( PDXATH_ZS,"Zsolver beg:PDXATH_ZS" ) + call Mppdb_check( PDYATH_ZS,"Zsolver beg:PDYATH_ZS" ) + call Mppdb_check( PRHO_ZS, "Zsolver beg:PRHO_ZS" ) + call Mppdb_check( PBFB, "Zsolver beg:PBFB" ) + call Mppdb_check( A_K, "Zsolver beg:A_K" ) + call Mppdb_check( B_K, "Zsolver beg:B_K" ) + call Mppdb_check( C_K, "Zsolver beg:C_K" ) + call Mppdb_check( D_K, "Zsolver beg:D_K" ) +end if +! JIU = size(PPHI, 1 ) JJU = size(PPHI, 2 ) JKU = size(PPHI, 3 ) @@ -245,11 +263,14 @@ CALL MNH_MEM_GET( ZRESIDUE , JIU, JJU, JKU ) #endif !* 1.1 compute the vector: r^(0) = Q(PHI) - Y ! +! #ifndef MNH_OPENACC ZRESIDUE = QLAP(HLBCX,HLBCY,PDXX,PDYY,PDZX,PDZY,PDZZ,PRHODJ,PTHETAV,PPHI) - PY #else CALL QLAP_DEVICE(ZRESIDUE,HLBCX,HLBCY,PDXX,PDYY,PDZX,PDZY,PDZZ,PRHODJ,PTHETAV,PPHI) +!$acc kernels present(PY,ZRESIDUE) ZRESIDUE = ZRESIDUE - PY +!$acc end kernels #endif ! !* 1.2 compute the vector: p^(0) = F^(-1)*( Q(PHI) - Y )