suppress nvcc unknown pragma warnings

This commit is contained in:
Axel Kohlmeyer 2022-04-21 15:01:46 -04:00
parent 247c61c93f
commit 09187801c1
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
2 changed files with 7 additions and 2 deletions

View File

@ -115,6 +115,11 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_CXX_COMPILER_ID STREQUAL "
set(CMAKE_TUNE_DEFAULT "-Minform=severe")
endif()
# silence nvcc warnings
if((PKG_KOKKOS) AND (Kokkos_ENABLE_CUDA))
set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT} -Xcudafe --diag_suppress=unrecognized_pragma")
endif()
# we require C++11 without extensions. Kokkos requires at least C++14 (currently)
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11)

View File

@ -10,7 +10,7 @@ KOKKOS_ABSOLUTE_PATH = $(shell cd $(KOKKOS_PATH); pwd)
export MPICH_CXX = $(KOKKOS_ABSOLUTE_PATH)/bin/nvcc_wrapper
export OMPI_CXX = $(KOKKOS_ABSOLUTE_PATH)/bin/nvcc_wrapper
CC = mpicxx
CCFLAGS = -g -O3 -DNDEBUG
CCFLAGS = -g -O3 -DNDEBUG -Xcudafe --diag_suppress=unrecognized_pragma
SHFLAGS = -fPIC
DEPFLAGS = -M
@ -55,7 +55,7 @@ MPI_LIB =
# PATH = path for FFT library
# LIB = name of FFT library
FFT_INC = -DFFT_CUFFT
FFT_INC = -DFFT_CUFFT
FFT_PATH =
FFT_LIB = -lcufft