diff --git a/src/LIB/SURCOUCHE/src/mode_mnh_world.f90 b/src/LIB/SURCOUCHE/src/mode_mnh_world.f90 index 5934d996b1acd7b39aaf962c32b74df5e8ac1d02..287f0a519aea9cdad900ae9799925c4afe1734b7 100644 --- a/src/LIB/SURCOUCHE/src/mode_mnh_world.f90 +++ b/src/LIB/SURCOUCHE/src/mode_mnh_world.f90 @@ -2,6 +2,15 @@ #undef MNH_OPENACC #endif +#ifdef MNH_COMPILER_NVHPC +#define MNH_ACC_SZ MNHINT32 +#elif MNH_COMPILER_CCE +#define MNH_ACC_SZ MNHINT64 +#else +#define MNH_ACC_SZ KIND(1) +#endif + + !MNH_LIC Copyright 1994-2022 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt @@ -31,6 +40,7 @@ CONTAINS #ifdef MNH_GA USE MODD_MPIF , ONLY : MPI_THREAD_MULTIPLE #endif + USE MODD_PRECISION, ONLY: MNHINT32, MNHINT64 USE MODD_VAR_ll, ONLY : IP, NPROC, NMNH_COMM_WORLD , LMNH_ISINIT !JUANZ #ifdef MNH_OPENACC @@ -139,9 +149,12 @@ CONTAINS case default PRINT *,"Using OpenACC (unknown version)" end select - CALL MNH_PRINT_DEVICE_PROPERTIES(ACC_DEVICE_NVIDIA, "NVIDIA GPU(s)") + CALL MNH_PRINT_DEVICE_PROPERTIES( ACC_DEVICE_NVIDIA, "NVIDIA GPU(s)" ) !CALL MNH_PRINT_DEVICE_PROPERTIES(ACC_DEVICE_RADEON, "Radeon GPU(s)") ACC_DEVICE_RADEON was removed from PGI 19.7 - CALL MNH_PRINT_DEVICE_PROPERTIES(ACC_DEVICE_HOST, "Host CPU(s)") +#ifdef MNH_COMPILER_CCE + CALL MNH_PRINT_DEVICE_PROPERTIES( ACC_DEVICE_AMD, "AMD GPU(s)" ) +#endif + CALL MNH_PRINT_DEVICE_PROPERTIES( ACC_DEVICE_HOST, "Host CPU(s)") !CALL MNH_PRINT_DEVICE_PROPERTIES(ACC_DEVICE_XEONPHI,"Xeon Phi(s)") ACC_DEVICE_XEONPHI was removed from PGI 19.7 #endif OPEN(newunit=ILU,form="formatted",file=conf_mnh_world,STATUS='OLD',iostat=IERR) @@ -208,15 +221,15 @@ CONTAINS CONTAINS SUBROUTINE MNH_PRINT_DEVICE_PROPERTIES(KDEVTYPE,HMSG) ! - INTEGER, INTENT(IN) :: KDEVTYPE - CHARACTER(LEN=*),INTENT(IN) :: HMSG + INTEGER(KIND=MNH_ACC_SZ), INTENT(IN) :: KDEVTYPE + CHARACTER(LEN=*), INTENT(IN) :: HMSG ! - INTEGER :: INUMDEV, IDXNAMEDEV, IDXVENDORDEV, IDXDRIVERDEV - INTEGER(KIND=8) :: IMEMDEV - INTEGER :: JI - CHARACTER(LEN=32) :: YNAMEDEV - CHARACTER(LEN=16) :: YVENDORDEV - CHARACTER(LEN=32) :: YDRIVERDEV + INTEGER :: INUMDEV, IDXNAMEDEV, IDXVENDORDEV, IDXDRIVERDEV + INTEGER(KIND=MNHINT64) :: IMEMDEV + INTEGER :: JI + CHARACTER(LEN=32) :: YNAMEDEV + CHARACTER(LEN=16) :: YVENDORDEV + CHARACTER(LEN=32) :: YDRIVERDEV ! INUMDEV = ACC_GET_NUM_DEVICES(KDEVTYPE) WRITE(*,*) " with ",INUMDEV," ",TRIM(HMSG)," (for rank 0)" diff --git a/src/Rules.LXcray.mk b/src/Rules.LXcray.mk index d0b01dac5a34615afa2e22106090bb64ce6809f2..659b598668ae63c5463eb61aec498afd2b5d3ce9 100644 --- a/src/Rules.LXcray.mk +++ b/src/Rules.LXcray.mk @@ -125,7 +125,7 @@ CPP = cpp -P -Wcomment # CPPFLAGS_C = -DLITTLE_endian CPPFLAGS_SURFEX = -traditional -CPPFLAGS_SURCOUCHE = -traditional -DDEV_NULL -DUSE_MPI +CPPFLAGS_SURCOUCHE = -traditional -DDEV_NULL -DUSE_MPI -DMNH_COMPILER_CCE CPPFLAGS_RAD = -traditional CPPFLAGS_NEWLFI = -traditional -DSWAPIO -DLINUX -DLFI_INT=${LFI_INT} CPPFLAGS_MNH = -traditional -DMNH -DSFX_MNH -DMNH_NO_MPI_LOGICAL48 -DUSE_MPI -DMNH_CRAY diff --git a/src/Rules.LXnvhpc.mk b/src/Rules.LXnvhpc.mk index 8566b8c8d0137b51b75d48ac2fa6450ee3ddf4d5..fe0a232157d3ea31f43f558aa185ebfaaa14ab35 100644 --- a/src/Rules.LXnvhpc.mk +++ b/src/Rules.LXnvhpc.mk @@ -197,7 +197,7 @@ CPP = cpp -P -traditional -Wcomment -D_OPENACC=201711 # CPPFLAGS_C = -DLITTLE_endian CPPFLAGS_SURFEX = -CPPFLAGS_SURCOUCHE += +CPPFLAGS_SURCOUCHE += -DMNH_COMPILER_NVHPC CPPFLAGS_RAD = CPPFLAGS_NEWLFI = -DSWAPIO -DLINUX -DLFI_INT=${LFI_INT} CPPFLAGS_MNH = -DMNH -DMNH_PGI -DSFX_MNH