|
31 | 31 | "utils/*.cpp" |
32 | 32 | "utils/*/*.c" |
33 | 33 | "utils/*/*.cpp") |
34 | | -file(GLOB_RECURSE CORENEURON_CUDA_FILES "*.cu") |
35 | 34 | set(SCOPMATH_CODE_FILES |
36 | 35 | "sim/scopmath/abort.cpp" "sim/scopmath/crout_thread.cpp" "sim/scopmath/newton_thread.cpp" |
37 | 36 | "sim/scopmath/sparse_thread.cpp" "sim/scopmath/ssimplic_thread.cpp") |
@@ -116,31 +115,15 @@ if(CORENRN_ENABLE_GPU) |
116 | 115 | ${CMAKE_CURRENT_BINARY_DIR}/netstim.cpp |
117 | 116 | ${CMAKE_CURRENT_BINARY_DIR}/netstim_inhpoisson.cpp |
118 | 117 | ${CMAKE_CURRENT_BINARY_DIR}/pattern.cpp |
119 | | - ${CMAKE_CURRENT_SOURCE_DIR}/utils/randoms/nrnran123.cpp |
120 | 118 | ${CMAKE_CURRENT_SOURCE_DIR}/io/nrn_setup.cpp |
121 | 119 | ${CMAKE_CURRENT_SOURCE_DIR}/io/setup_fornetcon.cpp |
122 | 120 | ${CMAKE_CURRENT_SOURCE_DIR}/io/corenrn_data_return.cpp |
123 | 121 | ${CMAKE_CURRENT_SOURCE_DIR}/io/global_vars.cpp) |
124 | 122 |
|
125 | 123 | set_source_files_properties(${OPENACC_EXCLUDED_FILES} PROPERTIES COMPILE_FLAGS |
126 | 124 | "-DDISABLE_OPENACC") |
127 | | - # nrnran123.cpp is a symlink to nrnran123.cu, in GPU builds we compile this as CUDA code (so we |
128 | | - # want to remove the .cpp here), while in non-GPU builds we compile it as plain C++. Unfortunately |
129 | | - # CMake <v3.20 does not pass explicit -x <lang> options based on the LANGUAGE property |
130 | | - # (https://cmake.org/cmake/help/latest/policy/CMP0119.html), so using a single .cu file and |
131 | | - # setting LANGUAGE=CXX in non-GPU builds does not work. |
132 | | - list(APPEND CORENEURON_CODE_FILES ${CORENEURON_CUDA_FILES}) |
133 | | - if(CORENRN_ACCELERATOR_OFFLOAD STREQUAL "OpenMP") |
134 | | - list(REMOVE_ITEM CORENEURON_CODE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/utils/randoms/nrnran123.cu") |
135 | | - elseif(CORENRN_ACCELERATOR_OFFLOAD STREQUAL "OpenACC") |
136 | | - list(REMOVE_ITEM CORENEURON_CODE_FILES |
137 | | - "${CMAKE_CURRENT_SOURCE_DIR}/utils/randoms/nrnran123.cpp") |
138 | | - else() |
139 | | - message( |
140 | | - FATAL_ERROR |
141 | | - "Don't know how to build Random123 compatibility layer for GPU with ${CORENRN_ACCELERATOR_OFFLOAD} offload." |
142 | | - ) |
143 | | - endif() |
| 125 | + # Only compile the explicit CUDA implementation of the Hines solver in GPU builds. |
| 126 | + list(APPEND CORENEURON_CODE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/permute/cellorder.cu) |
144 | 127 |
|
145 | 128 | # Eigen-3.5+ provides better GPU support. However, some functions cannot be called directly from |
146 | 129 | # within an OpenACC region. Therefore, we need to wrap them in a special API (decorate them with |
|
0 commit comments