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

Commit 7fbdcad

Browse files
committed
Add unit tests for the Hines solver.
See also #826, as some of these tests do not seem to pass at -O0 using NVHPC 22.5.
1 parent d6ba964 commit 7fbdcad

File tree

3 files changed

+429
-0
lines changed

3 files changed

+429
-0
lines changed

tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ if(Boost_FOUND)
3131
add_subdirectory(unit/interleave_info)
3232
add_subdirectory(unit/alignment)
3333
add_subdirectory(unit/queueing)
34+
add_subdirectory(unit/solver)
3435
# lfp test uses nrnmpi_* wrappers but does not load the dynamic MPI library TODO: re-enable
3536
# after NEURON and CoreNEURON dynamic MPI are merged
3637
if(NOT CORENRN_ENABLE_MPI_DYNAMIC)

tests/unit/solver/CMakeLists.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# =============================================================================
2+
# Copyright (C) 2022 Blue Brain Project
3+
#
4+
# See top-level LICENSE file for details.
5+
# =============================================================================
6+
7+
include_directories(${CMAKE_SOURCE_DIR}/coreneuron ${Boost_INCLUDE_DIRS})
8+
add_executable(test-solver test_solver.cpp)
9+
target_link_libraries(test-solver ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} coreneuron
10+
${corenrn_mech_library})
11+
target_include_directories(test-solver SYSTEM
12+
PRIVATE ${CORENEURON_PROJECT_SOURCE_DIR}/external/CLI11/include)
13+
14+
# Tell CMake *not* to run an explicit device code linker step (which will produce errors); let the
15+
# NVHPC C++ compiler handle this implicitly.
16+
set_target_properties(test-solver PROPERTIES CUDA_RESOLVE_DEVICE_SYMBOLS OFF)
17+
target_compile_options(test-solver PRIVATE ${CORENEURON_BOOST_UNIT_TEST_COMPILE_FLAGS})
18+
add_dependencies(test-solver nrniv-core)
19+
add_test(NAME test-solver COMMAND $<TARGET_FILE:test-solver>)
20+
cpp_cc_configure_sanitizers(TARGET test-solver TEST test-solver)

0 commit comments

Comments
 (0)