File tree Expand file tree Collapse file tree 5 files changed +72
-0
lines changed
Expand file tree Collapse file tree 5 files changed +72
-0
lines changed Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.14)
2+
3+
4+ project (SW4CK VERSION 1.0)
5+
6+ set (BLT_CXX_STD "c++11" CACHE STRING "" )
7+ include (blt/SetupBLT.cmake)
8+
9+ configure_file (SW4CKConfig.h.in SW4CKConfig.h)
10+
11+
12+ # specify the C++ standard
13+ set (CMAKE_CXX_STANDARD 11)
14+ set (CMAKE_CXX_STANDARD_REQUIRED True )
15+
16+ if (NOT BLT_CXX_STD)
17+ set (BLT_CXX_STD "c++11" CACHE STRING "" )
18+ endif ()
19+
20+ #add_executable(sw4ck curvitest.C)
21+ blt_add_executable(NAME sw4ck
22+ SOURCES curvitest.C curvilinear4sgc.C Events.C
23+ DEPENDS_ON cuda )
24+ target_include_directories (sw4ck PUBLIC
25+ "${PROJECT_BINARY_DIR} "
26+ )
27+ option (SW4_ENABLE_RAJA "ENABLE_RAJA" OFF )
28+ if (ENABLE_RAJA)
29+ add_compile_options (-DENABLE_RAJA=1)
30+ else ()
31+ blt_add_target_compile_flags(TO sw4ck FLAGS -DNO_RAJA=1)
32+ endif ()
33+
34+ if (SW4_ENABLE_CUDA)
35+ blt_add_target_compile_flags(TO sw4ck FLAGS -DENABLE_CUDA=1)
36+ endif ()
37+
Original file line number Diff line number Diff line change 1+ // the configured options and settings for SW4CK
2+ #define SW4CK_VERSION_MAJOR 1
3+ #define SW4CK_VERSION_MINOR 0
Original file line number Diff line number Diff line change 1+ // the configured options and settings for SW4CK
2+ #define SW4CK_VERSION_MAJOR @SW4CK_VERSION_MAJOR@
3+ #define SW4CK_VERSION_MINOR @SW4CK_VERSION_MINOR@
Original file line number Diff line number Diff line change 55#include <sstream>
66#include <vector>
77#define float_sw4 double
8+ #include "SW4CKConfig.h"
89#include "foralls.h"
910#ifdef ENABLE_CUDA
1011#include <cuda_profiler_api.h>
Original file line number Diff line number Diff line change 1+ # Use Clang compilers for C/C++
2+ set (GCC_VERSION "gcc-8.3.1" CACHE STRING "" )
3+ set (GCC_HOME "/usr/tce/packages/gcc/${GCC_VERSION} " )
4+
5+ set (CMAKE_C_COMPILER "${GCC_HOME} /bin/gcc" CACHE PATH "" )
6+ set (CMAKE_CXX_COMPILER "${GCC_HOME} /bin/g++" CACHE PATH "" )
7+ set (BLT_CXX_STD "c++11" CACHE STRING "" )
8+
9+ #------------------------------------------------------------------------------
10+ # CUDA support
11+ #------------------------------------------------------------------------------
12+
13+ set (ENABLE_CUDA ON CACHE BOOL "" )
14+
15+ set (CUDA_TOOLKIT_ROOT_DIR "/usr/tce/packages/cuda/cuda-10.1.243" CACHE PATH "" )
16+ set (CMAKE_CUDA_COMPILER "${CUDA_TOOLKIT_ROOT_DIR} /bin/nvcc" CACHE PATH "" )
17+ set (CMAKE_CUDA_HOST_COMPILER "${CMAKE_CXX_COMPILER} " CACHE PATH "" )
18+
19+ set (_cuda_arch "sm_70" )
20+ set (CMAKE_CUDA_FLAGS "-restrict -arch ${_cuda_arch} -std=c++11 --expt-extended-lambda -G" CACHE STRING "" )
21+
22+ set (CUDA_SEPARABLE_COMPILATION ON CACHE BOOL "" )
23+
24+ # nvcc does not like gtest's 'pthreads' flag
25+ set (gtest_disable_pthreads ON CACHE BOOL "" )
26+
27+ #set(SW4CK_ENABLE_RAJA ${ENABLE_RAJA})
28+
You can’t perform that action at this time.
0 commit comments