Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 241f2bb

Browse files
committed
Disable CUDA complation of partial piv and nrnran123.
1 parent 8383dd4 commit 241f2bb

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

CMake/OpenAccHelper.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ if(CORENRN_ENABLE_GPU)
3939
# ${CMAKE_CUDA_COMPILER_VERSION}
4040
find_package(CUDAToolkit 9.0 REQUIRED)
4141
# Be a bit paranoid
42-
if(NOT ${CMAKE_CUDA_COMPILER_VERSION} STREQUAL ${CUDAToolkit_VERSION})
43-
message(
44-
FATAL_ERROR
45-
"CUDA compiler (${CMAKE_CUDA_COMPILER_VERSION}) and toolkit (${CUDAToolkit_VERSION}) versions are not the same!"
46-
)
47-
endif()
42+
# if(NOT ${CMAKE_CUDA_COMPILER_VERSION} STREQUAL ${CUDAToolkit_VERSION})
43+
# message(
44+
# FATAL_ERROR
45+
# "CUDA compiler (${CMAKE_CUDA_COMPILER_VERSION}) and toolkit (${CUDAToolkit_VERSION}) versions are not the same!"
46+
# )
47+
# endif()
4848
set(CORENRN_CUDA_VERSION_SHORT "${CUDAToolkit_VERSION_MAJOR}.${CUDAToolkit_VERSION_MINOR}")
4949
endif()
5050
if(CORENRN_HAVE_NVHPC_COMPILER)

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ if(CORENRN_ENABLE_GPU)
187187
# 3057 : Warning on ignoring __host__ annotation in some functions
188188
# 3085 : Warning on redeclaring a __host__ function as __host__ __device__
189189
# ~~~
190-
set(CMAKE_CUDA_FLAGS
191-
"${CMAKE_CUDA_FLAGS} --expt-relaxed-constexpr -Xcudafe --diag_suppress=3057,--diag_suppress=3085"
192-
)
190+
# set(CMAKE_CUDA_FLAGS
191+
# "${CMAKE_CUDA_FLAGS} --expt-relaxed-constexpr -Xcudafe --diag_suppress=3057,--diag_suppress=3085"
192+
# )
193193

194194
if(CORENRN_ENABLE_NMODL)
195195
# NMODL supports both OpenACC and OpenMP target offload

coreneuron/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ file(
3232
"utils/*/*.c"
3333
"utils/*/*.cpp")
3434
file(GLOB_RECURSE CORENEURON_CUDA_FILES "*.cu")
35+
list(REMOVE_ITEM CORENEURON_CUDA_FILES "${CMAKE_CURRENT_SOURCE_DIR}/utils/randoms/nrnran123.cu")
3536
set(SCOPMATH_CODE_FILES
3637
"sim/scopmath/abort.cpp" "sim/scopmath/crout_thread.cpp" "sim/scopmath/newton_thread.cpp"
3738
"sim/scopmath/sparse_thread.cpp" "sim/scopmath/ssimplic_thread.cpp")
@@ -129,16 +130,16 @@ if(CORENRN_ENABLE_GPU)
129130
# CMake <v3.20 does not pass explicit -x <lang> options based on the LANGUAGE property
130131
# (https://cmake.org/cmake/help/latest/policy/CMP0119.html), so using a single .cu file and
131132
# setting LANGUAGE=CXX in non-GPU builds does not work.
132-
list(REMOVE_ITEM CORENEURON_CODE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/utils/randoms/nrnran123.cpp")
133+
#list(REMOVE_ITEM CORENEURON_CODE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/utils/randoms/nrnran123.cpp")
133134
list(APPEND CORENEURON_CODE_FILES ${CORENEURON_CUDA_FILES})
134135

135136
# Eigen-3.5+ provides better GPU support. However, some functions cannot be called directly from
136137
# within an OpenACC region. Therefore, we need to wrap them in a special API (decorate them with
137138
# __device__ & acc routine tokens), which allows us to eventually call them from OpenACC. Calling
138139
# these functions from CUDA kernels presents no issue ...
139-
if(CORENRN_ENABLE_NMODL AND EXISTS ${CORENRN_MOD2CPP_INCLUDE}/partial_piv_lu/partial_piv_lu.cu)
140-
list(APPEND CORENEURON_CODE_FILES ${CORENRN_MOD2CPP_INCLUDE}/partial_piv_lu/partial_piv_lu.cu)
141-
endif()
140+
# if(CORENRN_ENABLE_NMODL AND EXISTS ${CORENRN_MOD2CPP_INCLUDE}/partial_piv_lu/partial_piv_lu.cu)
141+
# list(APPEND CORENEURON_CODE_FILES ${CORENRN_MOD2CPP_INCLUDE}/partial_piv_lu/partial_piv_lu.cu)
142+
# endif()
142143
endif()
143144

144145
# =============================================================================

extra/nrnivmodl_core_makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ ifeq ($(wildcard $(CORENRN_PERLEXE)),)
7171
CORENRN_PERLEXE=perl
7272
endif
7373

74-
CXXFLAGS = @CORENRN_CXX_FLAGS@ -lcaliper -qcuda
74+
CXXFLAGS = @CORENRN_CXX_FLAGS@
7575
CXX_COMPILE_CMD = $(CXX) $(CXXFLAGS) @CMAKE_CXX_COMPILE_OPTIONS_PIC@ @CORENRN_COMMON_COMPILE_DEFS@ $(INCLUDES)
7676
CXX_LINK_EXE_CMD = $(CXX) $(CXXFLAGS) @CORENRN_LD_FLAGS@ @CMAKE_EXE_LINKER_FLAGS@
7777
CXX_SHARED_LIB_CMD = $(CXX) $(CXXFLAGS) @CORENRN_LD_FLAGS@ @CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS@ @CMAKE_SHARED_LIBRARY_CXX_FLAGS@ @CMAKE_SHARED_LINKER_FLAGS@

0 commit comments

Comments
 (0)