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

Philippe 10/07/2019: OpenACC: add identification of version 2.7 of OpenACC +...

Philippe 10/07/2019: OpenACC: add identification of version 2.7 of OpenACC + print properties of ACC_DEVICE_HOST
parent e96a469f
No related branches found
No related tags found
No related merge requests found
......@@ -7,13 +7,12 @@
!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC for details. version 1.
!-----------------------------------------------------------------
!! MODIFICATIONS
!! -------------
!!
!! J.Escobar 3/12/2014 : typo form -> from
!! Philippe 03/10/2017: set IP and NPROC in INIT_NMNH_COMM_WORLD
!! Philippe Wautelet: 10/01/2019: use NEWUNIT argument of OPEN
!!
! Modifications:
! J. Escobar 03/12/2014: typo form -> from
! P. Wautelet 03/10/2017: set IP and NPROC in INIT_NMNH_COMM_WORLD
! P. Wautelet 10/01/2019: use NEWUNIT argument of OPEN
! P. Wautelet 10/07/2019: add identification of version 2.7 of OpenACC + print properties of ACC_DEVICE_HOST
!-----------------------------------------------------------------
MODULE MODE_MNH_WORLD
IMPLICIT NONE
CHARACTER(len=*), parameter :: conf_mnh_world="conf_mnh_world.nam"
......@@ -91,19 +90,23 @@ CONTAINS
IF ( irank .EQ. 0 ) THEN
PRINT*,"Hello world from rank=",irank," nproc=",IPROC
#ifdef _OPENACC
IF ( OPENACC_VERSION == 201111 ) THEN
PRINT *,"Using OpenACC 1.0"
ELSE IF ( OPENACC_VERSION == 201306 ) THEN
PRINT *,"Using OpenACC 2.0"
ELSE IF ( OPENACC_VERSION == 201510 ) THEN
PRINT *,"Using OpenACC 2.5"
ELSE IF ( OPENACC_VERSION == 201711 ) THEN
PRINT *,"Using OpenACC 2.6"
ELSE
PRINT *,"Using OpenACC (unknown version)"
ENDIF
select case ( OPENACC_VERSION )
case ( 201111 )
PRINT *,"Using OpenACC 1.0"
case ( 201306 )
PRINT *,"Using OpenACC 2.0"
case ( 201510 )
PRINT *,"Using OpenACC 2.5"
case ( 201711 )
PRINT *,"Using OpenACC 2.6"
case ( 201811 )
PRINT *,"Using OpenACC 2.7"
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_RADEON, "Radeon GPU(s)")
CALL MNH_PRINT_DEVICE_PROPERTIES(ACC_DEVICE_HOST, "Host CPU(s)")
CALL MNH_PRINT_DEVICE_PROPERTIES(ACC_DEVICE_XEONPHI,"Xeon Phi(s)")
#endif
OPEN(newunit=ILU,form="formatted",file=conf_mnh_world,STATUS='OLD',iostat=IERR)
......
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