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

Philippe 16/09/2019: OpenACC: remove unnecessary intermediate subroutine

parent 71e0d56f
No related branches found
No related tags found
No related merge requests found
......@@ -31,29 +31,18 @@ TYPE (DATE_TIME), INTENT(IN) :: TPDTCUR ! current date and time
REAL, DIMENSION(:,:,:), INTENT(IN) :: PCRU ! Courant
REAL, DIMENSION(:,:,:), INTENT(IN) :: PCRV ! numbers
REAL, DIMENSION(:,:,:), INTENT(IN) :: PCRW !
!$acc declare present(PCRU,PCRV,PCRW)
REAL, DIMENSION(:,:,:), INTENT(IN) :: PRHODJ ! density
!$acc declare present(PRHODJ)
! Temporary advected rhodj
REAL, DIMENSION(:,:,:), INTENT(IN) :: PRHOX1,PRHOX2
REAL, DIMENSION(:,:,:), INTENT(IN) :: PRHOY1,PRHOY2
REAL, DIMENSION(:,:,:), INTENT(IN) :: PRHOZ1,PRHOZ2
!$acc declare present(PRHOX1,PRHOX2,PRHOY1,PRHOY2,PRHOZ1,PRHOZ2)
!
REAL, INTENT(IN) :: PTSTEP ! Time step model
REAL, INTENT(IN) :: PTSTEP_PPM ! Time Step PPM
!
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PSVT ! Vars at t
!PW: bug workaround with PGI (tested up to 16.10)
!PSVT is present but if zero-size => not detected as present
!!$acc declare present(PSVT)
!$acc declare pcopyin(PSVT)
!
REAL, DIMENSION(:,:,:,:), INTENT(OUT) :: PRSVS ! Source terms
!PW: bug workaround with PGI (tested up to 16.10)
!PRSVS is present but if zero-size => not detected as present
!!$acc declare present(PRSVS)
!$acc declare pcopyout(PRSVS)
!
!
END SUBROUTINE PPM_SCALAR
......@@ -63,72 +52,11 @@ END INTERFACE
END MODULE MODI_PPM_SCALAR
!
! ######################################################################
#ifdef _OPENACC
SUBROUTINE PPM_SCALAR (HLBCX,HLBCY, KSV, TPDTCUR, &
PCRU, PCRV, PCRW, PTSTEP, PTSTEP_PPM, &
PRHODJ, PRHOX1, PRHOX2, PRHOY1, PRHOY2,&
PRHOZ1, PRHOZ2, &
PSVT, PRSVS, HSV_ADV_SCHEME )
USE MODD_TYPE_DATE, ONLY : DATE_TIME
USE MODE_MNH_ZWORK, ONLY : ZT3D, MNH_GET_ZT3D , MNH_REL_ZT3D
IMPLICIT NONE
!
!* 0.1 Declarations of dummy arguments :
!
CHARACTER (LEN=4), DIMENSION(2), INTENT(IN) :: HLBCX ! X direction LBC type
CHARACTER (LEN=4), DIMENSION(2), INTENT(IN) :: HLBCY ! Y direction LBC type
CHARACTER (LEN=6), INTENT(IN) :: HSV_ADV_SCHEME
!
INTEGER, INTENT(IN) :: KSV ! Number of Scalar Variables
TYPE (DATE_TIME), INTENT(IN) :: TPDTCUR ! current date and time
!
REAL, DIMENSION(:,:,:), INTENT(IN) :: PCRU ! contravariant
REAL, DIMENSION(:,:,:), INTENT(IN) :: PCRV ! components
REAL, DIMENSION(:,:,:), INTENT(IN) :: PCRW ! of momentum
!$acc declare present(PCRU,PCRV,PCRW)
REAL, DIMENSION(:,:,:), INTENT(IN) :: PRHODJ ! density
!$acc declare present(PRHODJ)
! Temporary advected rhodj
REAL, DIMENSION(:,:,:), INTENT(IN) :: PRHOX1,PRHOX2
REAL, DIMENSION(:,:,:), INTENT(IN) :: PRHOY1,PRHOY2
REAL, DIMENSION(:,:,:), INTENT(IN) :: PRHOZ1,PRHOZ2
!$acc declare present(PRHOX1,PRHOX2,PRHOY1,PRHOY2,PRHOZ1,PRHOZ2)
!
REAL, INTENT(IN) :: PTSTEP ! Time step
REAL, INTENT(IN) :: PTSTEP_PPM ! Time Step PPM
!
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PSVT
!PW: bug workaround with PGI (tested up to 16.10)
!PSVT is present but if zero-size => not detected as present
!!$acc declare present(PSVT)
!$acc declare pcopyin(PSVT)
!
REAL, DIMENSION(:,:,:,:), INTENT(OUT) :: PRSVS ! Source terms
!PW: bug workaround with PGI (tested up to 16.10)
!PRSVS is present but if zero-size => not detected as present
!!$acc declare present(PRSVS)
!$acc declare pcopyout(PRSVS)
CALL PPM_SCALAR_D (HLBCX,HLBCY, KSV, TPDTCUR, &
PCRU, PCRV, PCRW, PTSTEP, PTSTEP_PPM, &
PRHODJ, PRHOX1, PRHOX2, PRHOY1, PRHOY2,&
PRHOZ1, PRHOZ2, &
PSVT, PRSVS, HSV_ADV_SCHEME)
CONTAINS
SUBROUTINE PPM_SCALAR_D (HLBCX,HLBCY, KSV, TPDTCUR, &
PCRU, PCRV, PCRW, PTSTEP, PTSTEP_PPM, &
PRHODJ, PRHOX1, PRHOX2, PRHOY1, PRHOY2,&
PRHOZ1, PRHOZ2, &
PSVT, PRSVS, HSV_ADV_SCHEME)
#else
SUBROUTINE PPM_SCALAR (HLBCX,HLBCY, KSV, TPDTCUR, &
PCRU, PCRV, PCRW, PTSTEP, PTSTEP_PPM, &
PRHODJ, PRHOX1, PRHOX2, PRHOY1, PRHOY2,&
PRHOZ1, PRHOZ2, &
PSVT, PRSVS, HSV_ADV_SCHEME )
#endif
! ######################################################################
!
!!**** *PPM_SCALAR *
......@@ -258,8 +186,4 @@ IF (MPPDB_INITIALIZED) THEN
CALL MPPDB_CHECK(PRSVS,"PPM_SCALAR end:PRSVS")
END IF
!
#ifdef _OPENACC
END SUBROUTINE PPM_SCALAR_D
#endif
!
END SUBROUTINE PPM_SCALAR
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