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

Commit affbc25

Browse files
committed
Disable CUDA complation of partial piv and nrnran123.
1 parent f2d122f commit affbc25

File tree

5 files changed

+18
-16
lines changed

5 files changed

+18
-16
lines changed

CMake/MakefileBuildOptions.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" _BUILD_TYPE)
8080
set(CORENRN_CXX_FLAGS
8181
"${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${_BUILD_TYPE}} ${CXX14_STD_FLAGS} ${NVHPC_ACC_COMP_FLAGS} ${NVHPC_CXX_INLINE_FLAGS}"
8282
)
83+
set(CORENRN_LD_FLAGS "${NVHPC_ACC_LINK_FLAGS}")
8384

8485
# =============================================================================
8586
# nmodl/mod2c related options : TODO

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

CMakeLists.txt

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

194194
# =============================================================================

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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ 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)
76-
CXX_LINK_EXE_CMD = $(CXX) $(CXXFLAGS) @CMAKE_EXE_LINKER_FLAGS@
77-
CXX_SHARED_LIB_CMD = $(CXX) $(CXXFLAGS) @CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS@ @CMAKE_SHARED_LIBRARY_CXX_FLAGS@ @CMAKE_SHARED_LINKER_FLAGS@
76+
CXX_LINK_EXE_CMD = $(CXX) $(CXXFLAGS) @CORENRN_LD_FLAGS@ @CMAKE_EXE_LINKER_FLAGS@
77+
CXX_SHARED_LIB_CMD = $(CXX) $(CXXFLAGS) @CORENRN_LD_FLAGS@ @CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS@ @CMAKE_SHARED_LIBRARY_CXX_FLAGS@ @CMAKE_SHARED_LINKER_FLAGS@
7878

7979
# ISPC compilation and link commands
8080
ISPC = @CMAKE_ISPC_COMPILER@

0 commit comments

Comments
 (0)