tRevert "src/CMakeLists.txt: remove arch and code specification" - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
(HTM) git clone git://src.adamsgaard.dk/sphere
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 27916d04222ad787d6bebfec20de401d408c64ff
(DIR) parent 0b1e0667a5afb71f96e13e9bcbc5ef84de0fcc08
(HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Mon, 11 Jan 2021 11:25:57 +0100
Revert "src/CMakeLists.txt: remove arch and code specification"
This reverts commit 75a51fc9ac35e999426be7aee9e30d474c358eb0.
Diffstat:
M src/CMakeLists.txt | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
---
(DIR) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
t@@ -17,12 +17,20 @@ INCLUDE(FindCUDA)
# Additional NVCC command line arguments
# NOTE: Multiple arguments must be semi-colon selimited
-SET(CUDA_NVCC_FLAGS
- "--use_fast_math;-O3;--fmad=false -ccbin gcc")
- #"--use_fast_math;-O3;--fmad=false -ccbin gcc-8.3")
- #"--use_fast_math;-O3;--fmad=false -ccbin gcc-4.6")
- #"--use_fast_math;-O3;--fmad=false -ccbin gcc;-Xcompiler -fPIC")
- #"--use_fast_math;-O3;--fmad=false;-ccbin clang-3.8")
+IF (GPU_GENERATION EQUAL 1) # Kepler
+ SET(CUDA_NVCC_FLAGS
+ "--use_fast_math;-O3;-gencode=arch=compute_35,code=\"sm_35,compute_35\";--fmad=false -ccbin gcc")
+ #"--use_fast_math;-O3;-gencode=arch=compute_35,code=\"sm_35,compute_35\";--fmad=false -ccbin gcc-8.3")
+ #"--use_fast_math;-O3;-gencode=arch=compute_35,code=\"sm_35,compute_35\";--fmad=false -ccbin gcc-4.6")
+ #"--use_fast_math;-O3;-gencode=arch=compute_35,code=\"sm_35,compute_35\";--fmad=false -ccbin gcc;-Xcompiler -fPIC")
+ #"--use_fast_math;-O3;-gencode=arch=compute_35,code=\"sm_35,compute_35\";--fmad=false;-ccbin clang-3.8")
+ELSE() # Fermi
+ SET(CUDA_NVCC_FLAGS
+ "--use_fast_math;-O3;-gencode=arch=compute_20,code=\"sm_20,compute_20\";--fmad=false -ccbin gcc")
+ #"--use_fast_math;-O3;-gencode=arch=compute_20,code=\"sm_20,compute_20\";--fmad=false -ccbin gcc-8.3")
+ #"--use_fast_math;-O3;-gencode=arch=compute_20,code=\"sm_20,compute_20\";--fmad=false -ccbin gcc;-Xcompiler -fPIC")
+ #"--use_fast_math;-O3;-gencode=arch=compute_20,code=\"sm_20,compute_20\";--fmad=false;-ccbin clang-3.8")
+ENDIF (GPU_GENERATION EQUAL 1)
SET(CMAKE_CXX_FLAGS "-fPIC ${CMAKE_CXX_FLAGS}")