Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete rewrite of ParaView visualization adaptor #107

Merged
merged 117 commits into from
Oct 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
b57f04e
Fix bug in paraview include_directories
LukasBreitwieser Jun 29, 2020
0af5670
WIP Fix bugs to get data description in python script
LukasBreitwieser Feb 28, 2020
0a7aac1
WIP Create screenshot of cells
LukasBreitwieser Feb 28, 2020
15cd5d6
Add more parameters; add time and timestep information
LukasBreitwieser Feb 28, 2020
83f67a4
Fix problem that insitu generated images were all the same; insitu an…
LukasBreitwieser Mar 2, 2020
2521b80
Seperate python script in default and user-defined
LukasBreitwieser Mar 5, 2020
8ffa2b0
Rename simple_pipeline.py to default_insitu_pipeline.py
LukasBreitwieser Mar 5, 2020
3e0056d
Disable debugging output
LukasBreitwieser Mar 5, 2020
f116a71
Add comment
LukasBreitwieser Mar 5, 2020
5419123
Format
LukasBreitwieser Mar 5, 2020
9f1e9b8
Fix check-cpplint errors
LukasBreitwieser Mar 5, 2020
e02024b
Fix compilation error
LukasBreitwieser Mar 6, 2020
e74ada3
Add python insitu support for cylinders, and diffusion grids
LukasBreitwieser Mar 6, 2020
d341ff4
Transmit metadata from cpp to python script
LukasBreitwieser Mar 8, 2020
25fa188
Fix failing test
LukasBreitwieser Mar 8, 2020
5ecf20b
Clean default_insitu_pipeline.py
LukasBreitwieser Mar 9, 2020
09c870e
Remove unused file prop_attribute_filter.py
LukasBreitwieser Mar 11, 2020
8f248dd
Fix initialization bug in cpp insitu pipeline; comment loading of BDM…
LukasBreitwieser Mar 12, 2020
903bb4c
Fix nullptr dereferencing
LukasBreitwieser Mar 13, 2020
5712c51
Fix loading of paraview plugin in cpp insitu pipeline
LukasBreitwieser Mar 13, 2020
6353544
WIP
LukasBreitwieser Mar 9, 2020
8809f7d
Running with hardcoded values
LukasBreitwieser Mar 9, 2020
706a2a2
Add helper functions to simplify generated code
LukasBreitwieser Mar 9, 2020
bffec5e
First version with JIT compilation working
LukasBreitwieser Mar 10, 2020
c3be5ab
Generate functor code
LukasBreitwieser Mar 10, 2020
d41a442
First fully JIT generated visualization working
LukasBreitwieser Mar 10, 2020
15b23e5
Format
LukasBreitwieser Mar 10, 2020
0a98596
Create unique names for jitted functors
LukasBreitwieser Mar 10, 2020
c34408f
WIP type index
LukasBreitwieser Mar 10, 2020
f9f135b
WIP start development for paralellel writing of vtk files
LukasBreitwieser Mar 13, 2020
4d4ed07
First prototype that writes vtu files in parallel
LukasBreitwieser Mar 18, 2020
6d2dc39
Minimixe serial part of writing (p)vtu files
LukasBreitwieser Mar 23, 2020
dd37b99
First running version of zero-copy visualization
LukasBreitwieser Mar 26, 2020
9167969
Optimize; add different modes zero-copy, cache, and copy
LukasBreitwieser Mar 27, 2020
f44a2d0
WIP remove virtual function call from hotspot
LukasBreitwieser Mar 27, 2020
ba632d4
Remove another virtual call from GetValue to GetValueReference
LukasBreitwieser Mar 28, 2020
7106852
Fix insitu visualizations (was disabled during prototyping parallel w…
LukasBreitwieser Mar 28, 2020
6a5605c
Parallelize exporting diffusion grids in paraview format
LukasBreitwieser Mar 30, 2020
592c9f1
Fix failing unit tests
LukasBreitwieser Apr 3, 2020
c44dced
Refactor VtkSoGrid and fix bug in FixPvtu
LukasBreitwieser Apr 3, 2020
6cd7757
Make data members in VtkSimObjects and VtkDiffusionGrid private
LukasBreitwieser Apr 3, 2020
ad5e53c
Remove bdm::Functor from selection file
LukasBreitwieser Apr 3, 2020
1113f38
Put dictionary into a seperate shared lib
LukasBreitwieser Apr 3, 2020
298f924
Reenable JIT compilation
LukasBreitwieser Apr 3, 2020
ee7fe10
Fix compilation bug in mapped_data_array.h
LukasBreitwieser Apr 4, 2020
c7e84c5
Add support for SoUid and SoPointer; misc improvements
LukasBreitwieser Apr 6, 2020
3bcc56f
Add Param::mapped_data_array_mode_
LukasBreitwieser Apr 6, 2020
3f56544
Add sim objects to paraview export tests; fix bug in MappedDataArray …
LukasBreitwieser Apr 6, 2020
8e34085
WIP ROOT performance patch
LukasBreitwieser Apr 6, 2020
4da6dd3
Set vti and vtu format to binary
LukasBreitwieser Apr 7, 2020
3b92eb0
Improve ParaView build
LukasBreitwieser May 13, 2020
1cf5ca5
Update TypeIndex after sort and rebalancing operation
LukasBreitwieser Jun 12, 2020
bfc196a
Add optimization calls for experimental PV version
LukasBreitwieser Jun 12, 2020
a58461a
Fix bug in MappedDataArray::GetTuple
LukasBreitwieser Jun 12, 2020
57afae9
Fix compiler warnings
LukasBreitwieser Jun 12, 2020
b5a4aef
Restore also type index when simulation is restored
LukasBreitwieser Jun 12, 2020
4a49d17
Resolve misc FIXME comments
LukasBreitwieser Jun 12, 2020
5d8a0e2
Fix race condition in bdm::GetDataMemberForVis functor
LukasBreitwieser Jun 15, 2020
eedd134
Fix compiler warnings in mapped_data_array_test.cc
LukasBreitwieser Jun 15, 2020
386ce25
Fix ParaView diffusion grid test crash with one thread
LukasBreitwieser Jun 16, 2020
e789695
Fix memory leak and add valgrind suppression rule for ParaView
LukasBreitwieser Jun 16, 2020
277770f
WIP
LukasBreitwieser Jun 18, 2020
140c97c
Add paraview insitu tests
LukasBreitwieser Jun 19, 2020
d8747b5
Add lightweight alternative to PVSM file to load paraview files
LukasBreitwieser Jun 19, 2020
d2e2a64
Remove c++ paraview insitu pipeline.
LukasBreitwieser Jun 22, 2020
67c4551
Rename paraview tests
LukasBreitwieser Jun 22, 2020
ca02174
Add parameter to control compression of paraview files
LukasBreitwieser Jun 29, 2020
aca9fb2
Fix bug in paraview diffusion grid partitioning
LukasBreitwieser Jun 30, 2020
7003f95
Fix clang compiler warning
LukasBreitwieser Jun 30, 2020
d692441
Fix linking errors on Mac OS
LukasBreitwieser Jul 1, 2020
a473809
Use kitware repository for all paraview flavors
LukasBreitwieser Jul 1, 2020
1591e71
Improve naming of ParaView insitu parameters
LukasBreitwieser Jul 2, 2020
550d37c
Rename Param::visualization_export_interval to Param::visualization_i…
LukasBreitwieser Jul 2, 2020
9a6b1d8
Remove debugging output
LukasBreitwieser Jul 2, 2020
0fdb0f8
Add integration test for default_insitu_pipeline.py
LukasBreitwieser Jul 2, 2020
312189a
Don't try to load a dictionary for the ROOT interpreter.
LukasBreitwieser Jul 2, 2020
3051a0c
Update documentation
LukasBreitwieser Jul 6, 2020
59e1908
Use absolute path for paraview build working dir
LukasBreitwieser Jul 13, 2020
812b11b
Fix Dockerfiles and scripts to build ROOT and libroadrunner
LukasBreitwieser Jul 14, 2020
1f3253c
Update ROOT version to v6-20-06 with cling performance patch on linux
LukasBreitwieser Jul 14, 2020
f6491ad
Fix ROOT filename and wrong sha checksums
LukasBreitwieser Jul 14, 2020
5c574ec
Fix ParaView include directories bug
LukasBreitwieser Jul 14, 2020
5ed8151
Format
LukasBreitwieser Jul 15, 2020
1711f4d
Clang-tidy
LukasBreitwieser Jul 15, 2020
50fe037
Update selection.xml to ignore bdm::Environment::SimDimensionAndLarge…
LukasBreitwieser Jul 21, 2020
c615ae6
Update simulation build
LukasBreitwieser Jul 21, 2020
a6ee263
Fix gtest linking issue and selection.xml
LukasBreitwieser Jul 21, 2020
b71a40a
Another attempt to fix the build issue
LukasBreitwieser Jul 22, 2020
5d90f59
Use loader_path on MacOS
LukasBreitwieser Jul 22, 2020
9f82c6b
Fix liblib prefix of libraries
LukasBreitwieser Jul 22, 2020
6aa566e
Debug hanging xvfb start
LukasBreitwieser Jul 22, 2020
cd86b9b
Debug
LukasBreitwieser Jul 22, 2020
3519bb8
Fix installation issue
LukasBreitwieser Jul 29, 2020
e53776c
Disable valgrind tests on github actions centos 7 workflow
LukasBreitwieser Jul 29, 2020
ce029b8
Debug hanging github actions
LukasBreitwieser Jul 30, 2020
d3d7976
Fix bug in ParallelVtiWriter
LukasBreitwieser Aug 3, 2020
afc491b
Merge branch 'master' into new-vis
LukasBreitwieser Sep 29, 2020
41a345f
Fix cling compilation error in
LukasBreitwieser Oct 1, 2020
c30f769
Fix Paraview diffusion grid integration tests
LukasBreitwieser Oct 2, 2020
00b8e8c
Use TInterpreter::Declare instead of ProcessLine
LukasBreitwieser Oct 5, 2020
1fc6244
Use ROOT version from master branch
LukasBreitwieser Oct 5, 2020
098052e
Remove old SimObject::ForEachNeighborIn solution based on preprocessor
LukasBreitwieser Oct 5, 2020
a7e44c9
Fix cmake error for ninja
LukasBreitwieser Oct 5, 2020
90e0d30
Merge branch 'master' into new-vis
LukasBreitwieser Oct 5, 2020
377368e
Change experimental::neuroscience to neuroscience
LukasBreitwieser Oct 5, 2020
4e58e6e
Remove cling performance patch from build-root.sh
LukasBreitwieser Oct 6, 2020
964d449
Update paraview build scripts
LukasBreitwieser Oct 6, 2020
4bf302f
Fix MacOS System CI build failure
LukasBreitwieser Oct 6, 2020
ec46f36
Remove debugging statements
LukasBreitwieser Oct 6, 2020
cc6cb75
Resolve todos
LukasBreitwieser Oct 6, 2020
79acc0a
Fix warnings in paraview integration tests
LukasBreitwieser Oct 6, 2020
c28f61c
Format code
LukasBreitwieser Oct 6, 2020
e316418
Update valgrind.sh
LukasBreitwieser Oct 7, 2020
9678208
Merge branch 'master' into new-vis
LukasBreitwieser Oct 7, 2020
fcfa0fd
Fix name of visualization interval parameter
LukasBreitwieser Oct 7, 2020
8d20228
Format code
LukasBreitwieser Oct 7, 2020
614a339
Fix build error after merge
LukasBreitwieser Oct 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Debug github actions.

Add the following step before the failing step.
ssh into the tmate session immediately.
Otherwise the session times out and doesn't accept any input.

```
- name: Setup tmate session
uses: mxschmitt/action-tmate@v2
```

15 changes: 1 addition & 14 deletions .github/workflows/centos-system-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,23 +131,10 @@ jobs:
export DISPLAY=:99.0
../util/xvfb-initd.sh start
sleep 3
make run-demos
../util/xvfb-initd.sh stop

- name: Test out-of-source simulation
shell: bash
working-directory: build
run: |
. scl_source enable devtoolset-7 || true
. scl_source enable llvm-toolset-6.0 || true
. /etc/profile.d/modules.sh || true
module load mpi
. $INSTALL_DIR/bin/thisbdm.sh
biodynamo new test-sim
. ../test/util.inc
export DISPLAY=:99.0
../util/xvfb-initd.sh start
run_cmake_simulation test-sim
make run-demos
../util/xvfb-initd.sh stop

- name: Notify Slack
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/macos-system-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ jobs:
-B build
cmake --build build --parallel --config Release --target notebooks

# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v2

- name: System tests BioDynaMo
shell: zsh {0}
working-directory: build
Expand Down
32 changes: 9 additions & 23 deletions .github/workflows/ubuntu-system-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,42 +108,28 @@ jobs:
-B build
cmake --build build --parallel --config Release

- name: Valgrind tests BioDynaMo
shell: bash
working-directory: build
run: |
. $INSTALL_DIR/bin/thisbdm.sh
export DISPLAY=:99.0
../util/xvfb-initd.sh start
sleep 3
make run-valgrind
../util/xvfb-initd.sh stop

- name: System tests BioDynaMo
- name: Run valgrind and system tests
shell: bash
working-directory: build
run: |
ps -ef
. $INSTALL_DIR/bin/thisbdm.sh
sudo git config --system user.name "Test User"
sudo git config --system user.email user@test.com
export DISPLAY=:99.0
../util/xvfb-initd.sh start
sleep 3
make run-demos
../util/xvfb-initd.sh stop

- name: Test out-of-source simulation
shell: bash
working-directory: build
run: |
. $INSTALL_DIR/bin/thisbdm.sh
export DISPLAY=:99.0
../util/xvfb-initd.sh start
sleep 3
ps -ef
biodynamo new test-sim
. ../test/util.inc
run_cmake_simulation test-sim
ps -ef
make run-valgrind
ps -ef
make run-demos
ps -ef
../util/xvfb-initd.sh stop
ps -ef

- name: Notify Slack
uses: 8398a7/action-slack@v3
Expand Down
18 changes: 15 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,16 @@ if(paraview)
# compatible binaries
if(APPLE)
find_package(ParaView 5.5 CONFIG COMPONENTS vtkPVPythonCatalyst vtkPVVTKExtensionsDefault
vtkPVServerManagerRendering PATHS ${CMAKE_THIRD_PARTY_DIR}/paraview)
vtkPVServerManagerRendering PATHS ${CMAKE_THIRD_PARTY_DIR}/paraview ENV{ParaView_DIR})
if(${ParaView_FOUND})
include_directories(${ParaView_PREFIX_PATH}/include/paraview-5.5)
endif()
else()
find_package(ParaView 5.8 CONFIG COMPONENTS Catalyst PythonCatalyst VTKExtensionsIOCore
PATHS ${CMAKE_THIRD_PARTY_DIR}/paraview)
PATHS ${CMAKE_THIRD_PARTY_DIR}/paraview ENV{ParaView_DIR})
if(${ParaView_FOUND})
include_directories(${ParaView_PREFIX_PATH}/include/paraview-5.8)
endif()
endif()

# Check if ParaView was found in the system. If that's not the case then we will proceed
Expand All @@ -322,13 +328,14 @@ if(paraview)
if(APPLE)
find_package(ParaView 5.5 CONFIG COMPONENTS vtkPVPythonCatalyst vtkPVVTKExtensionsDefault
vtkPVServerManagerRendering PATHS ${CMAKE_THIRD_PARTY_DIR}/paraview)
include_directories(${ParaView_PREFIX_PATH}/include/paraview-5.5)
else()
find_package(ParaView 5.8 CONFIG COMPONENTS Catalyst PythonCatalyst VTKExtensionsIOCore
PATHS ${CMAKE_THIRD_PARTY_DIR}/paraview)
include_directories(${ParaView_PREFIX_PATH}/include/paraview-5.8)
endif()
endif()

include_directories(${ParaView_PREFIX_PATH}/include/paraview-5.8)
add_definitions("-DUSE_PARAVIEW")
endif()

Expand Down Expand Up @@ -467,6 +474,7 @@ if (LINUX)
set(FS_LIB stdc++fs)
endif()
build_shared_library(biodynamo
SELECTION selection-libbiodynamo.xml
SOURCES ${LIB_SOURCES}
HEADERS ${HEADERS}
LIBRARIES ${BDM_REQUIRED_LIBRARIES} ${ROOT_LIBRARIES} ${FS_LIB})
Expand All @@ -481,6 +489,7 @@ if(paraview)
# resolve missing python symbols when creating binaries
set(REQUIRED_PARAVIEW_LIBRARIES "${ParaView_LIBRARIES};${Python_LIBRARIES}")
build_shared_library(VisualizationAdaptor
SELECTION selection-libVisualizationAdaptor.xml
SOURCES ${PV_SOURCES}
HEADERS ${PV_HEADERS}
LIBRARIES ${REQUIRED_PARAVIEW_LIBRARIES} biodynamo
Expand Down Expand Up @@ -558,6 +567,7 @@ if (test)
${CMAKE_SOURCE_DIR}/test/unit/core/sim_object/*.cc
${CMAKE_SOURCE_DIR}/test/unit/core/util/*.cc
${CMAKE_SOURCE_DIR}/test/unit/core/visualization/*.cc
${CMAKE_SOURCE_DIR}/test/unit/core/visualization/paraview/*.cc
${CMAKE_SOURCE_DIR}/test/unit/neuroscience/*.cc)
file(GLOB TEST_HEADERS ${CMAKE_SOURCE_DIR}/test/unit/*.h
${CMAKE_SOURCE_DIR}/test/unit/test_util/*.h
Expand All @@ -572,7 +582,9 @@ if (test)
${CMAKE_SOURCE_DIR}/test/unit/core/sim_object/*.h
${CMAKE_SOURCE_DIR}/test/unit/core/util/*.h
${CMAKE_SOURCE_DIR}/test/unit/core/visualization/*.h
${CMAKE_SOURCE_DIR}/test/unit/core/visualization/paraview/*.h
${CMAKE_SOURCE_DIR}/test/unit/neuroscience/*.h)
# NB: Remove stdc++fs after switching to c++17
bdm_add_test_executable(biodynamo-unit-tests
SOURCES ${TEST_SOURCES}
HEADERS ${TEST_HEADERS}
Expand Down
59 changes: 30 additions & 29 deletions cmake/BioDynaMo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,68 +58,69 @@ endfunction(get_implicit_dependencies)
# and external simulation projects.
# \param TARGET target name for the executable
# \param SOURCES list of source files
# \param LIBRARIES list of libraries that should be linked to the executable.
# can also be a target name of a library
# \param LIBRARIES list of *shared* libraries that should be linked to the executable.
# can also be a target name of a library.
# STATIC libraries not compiled with -fPIC must be linked in a separate command using
# target_link_libraries(${TARGET} static-lib-wo-fpic)
function(bdm_add_executable TARGET)
cmake_parse_arguments(ARG "" "" "SOURCES;HEADERS;LIBRARIES" ${ARGN} )

if(dict)
# generate dictionary using genreflex
set(DICT_FILE "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_dict")

# Since the location of the CMake files differ in the build and installation
# directory, we check if BDM_CMAKE_DIR is already set (in build directory
# case). Otherwise, set it to the installation directory
if(NOT DEFINED BDM_CMAKE_DIR)
set(BDM_CMAKE_DIR $ENV{BDMSYS}/share/cmake)
endif()
REFLEX_GENERATE_DICTIONARY(${DICT_FILE} ${ARG_HEADERS} SELECTION ${BDM_CMAKE_DIR}/selection.xml)

# generate executable
add_executable(${TARGET} ${ARG_SOURCES} ${DICT_FILE}.cc)
if (OPENCL_FOUND)
# Do this here; we don't want libbiodynamo.so to contain any OpenCL symbols
set(ARG_LIBRARIES ${ARG_LIBRARIES} ${OPENCL_LIBRARIES})
target_compile_definitions(${TARGET} PUBLIC -DUSE_OPENCL)
endif()
target_link_libraries(${TARGET} ${ARG_LIBRARIES})
if (DEFINED CMAKE_INSTALL_LIBDIR)
add_custom_command(TARGET ${TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${DICT_FILE}_rdict.pcm ${CMAKE_INSTALL_BINDIR})
build_shared_library(${TARGET}
SELECTION selection.xml
HEADERS ${ARG_HEADERS}
SOURCES ${ARG_SOURCES}
LIBRARIES ${ARG_LIBRARIES})
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${TARGET}-main.cc "int main(int argc, const char** argv);")
add_executable(${TARGET}-bin ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${TARGET}-main.cc)
target_link_libraries(${TARGET}-bin ${TARGET})
if (LINUX)
set_target_properties(${TARGET}-bin PROPERTIES LINK_FLAGS "-Wl,-rpath,$ORIGIN")
else()
set_target_properties(${TARGET}-bin PROPERTIES LINK_FLAGS "-Wl,-rpath,@loader_path")
endif()
set_target_properties(${TARGET}-bin PROPERTIES OUTPUT_NAME ${TARGET})
else()
add_executable(${TARGET} ${ARG_SOURCES})
target_link_libraries(${TARGET} ${ARG_LIBRARIES})
endif()
endfunction(bdm_add_executable)

# function build_shared_library( TARGET
# SELECTION selection.xml
# SOURCES source1 source2 ...
# HEADERS header1 header2 ...
# LIBRARIES lib1 lib2 ...
# PLUGIN <"TRUE">)
# build shared library with ROOT dictionaries. If ARG_PLUGIN is set, we will
# always generate dictionaries (as required by ROOT's plugin manager)
function(build_shared_library TARGET)
cmake_parse_arguments(ARG "" "" "SOURCES;HEADERS;LIBRARIES;PLUGIN" ${ARGN} )
cmake_parse_arguments(ARG "" "" "SELECTION;SOURCES;HEADERS;LIBRARIES;PLUGIN" ${ARGN} )

# We always need dictionaries for the plugins (plugin manager requires class
# information)
if(dict OR DEFINED ARG_PLUGIN)
# generate dictionary using genreflex
set(DICT_FILE "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET}_dict")
set(BDM_DICT_FILE "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET}_bdm_dict.cc")

# Since the location of the CMake files differ in the build and installation
# directory, we check if BDM_CMAKE_DIR is already set (in build directory
# case). Otherwise, set it to the installation directory
if(NOT DEFINED BDM_CMAKE_DIR)
set(BDM_CMAKE_DIR $ENV{BDMSYS}/share/cmake)
endif()
REFLEX_GENERATE_DICTIONARY(${DICT_FILE} ${ARG_HEADERS} SELECTION ${BDM_CMAKE_DIR}/selection-lib${TARGET}.xml)

REFLEX_GENERATE_DICTIONARY(${DICT_FILE} ${ARG_HEADERS} SELECTION ${BDM_CMAKE_DIR}/${ARG_SELECTION})
if (BDM_OUT_OF_SOURCE)
set(BDM_DICT_BIN_PATH "$ENV{BDMSYS}/bin")
else()
set(BDM_DICT_BIN_PATH "${PROJECT_SOURCE_DIR}/cmake")
endif()
add_custom_command(OUTPUT "${BDM_DICT_FILE}"
COMMAND ${BDM_DICT_BIN_PATH}/bdm-dictionary ${BDM_DICT_FILE} ${ARG_HEADERS}
DEPENDS ${ARG_HEADERS} ${BDM_DICT_BIN_PATH}/bdm-dictionary)
# generate shared library
add_library(${TARGET} SHARED ${ARG_SOURCES} ${DICT_FILE}.cc)
add_library(${TARGET} SHARED ${ARG_SOURCES} ${DICT_FILE}.cc ${BDM_DICT_FILE})
target_link_libraries(${TARGET} ${ARG_LIBRARIES})
if (DEFINED CMAKE_INSTALL_LIBDIR)
add_custom_command(TARGET ${TARGET}
Expand Down
3 changes: 3 additions & 0 deletions cmake/Installation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ install(TARGETS biodynamo

if(test)
install(TARGETS biodynamo-unit-tests
LIBRARY
DESTINATION ${DIRNAME}/lib)
install(TARGETS biodynamo-unit-tests-bin
RUNTIME
DESTINATION ${DIRNAME}/bin)
endif()
Expand Down
8 changes: 5 additions & 3 deletions cmake/Testing.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ ExternalProject_Add(
gtest
URL "${CMAKE_SOURCE_DIR}/third_party/gtest-1.7.0.zip"
PREFIX "${CMAKE_CURRENT_BINARY_DIR}/gtest"
CMAKE_ARGS
-DCMAKE_CXX_FLAGS="-fPIC"
CMAKE_CACHE_ARGS
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
Expand Down Expand Up @@ -80,11 +82,11 @@ function(bdm_add_test_executable TEST_TARGET)

# add valgrind test
if (valgrind AND VALGRIND_FOUND AND NOT coverage)
# filter out SchedulerTest.Backup because of timing issue
# filter out tests that would take too long if tested under valgrind
add_test(NAME "valgrind_${TEST_TARGET}"
COMMAND ${CMAKE_BINARY_DIR}/launcher.sh ${CMAKE_SOURCE_DIR}/util/valgrind.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TEST_TARGET} -- --gtest_filter=-*DeathTest.*:IOTest.InvalidRead:SchedulerTest.Backup:ResourceManagerTest.SortAndApplyOnAllElementsParallel*:InlineVector*:NeuriteElementBehaviour.*:MechanicalInteraction.*:DiffusionTest.*Convergence*:SimObjectVectorTest.Equality:SchedulerTest::LoadAndBalanceAfterEnvironment)
COMMAND ${CMAKE_BINARY_DIR}/launcher.sh ${CMAKE_SOURCE_DIR}/util/valgrind.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TEST_TARGET} -- --gtest_filter=-*DeathTest.*:IOTest.InvalidRead:SchedulerTest.Backup:ResourceManagerTest.SortAndApplyOnAllElementsParallel*:InlineVector*:NeuriteElementBehaviour.*:MechanicalInteraction.*:DiffusionTest.*Convergence*:ParaviewIntegrationTest*:SimObjectVectorTest.Equality:SchedulerTest::LoadAndBalanceAfterEnvironment)
add_custom_target(run-valgrind
COMMAND ${CMAKE_BINARY_DIR}/launcher.sh ${CMAKE_SOURCE_DIR}/util/valgrind.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TEST_TARGET} -- --gtest_filter=-*DeathTest.*:IOTest.InvalidRead:SchedulerTest.Backup:ResourceManagerTest.SortAndApplyOnAllElementsParallel*:InlineVector*:NeuriteElementBehaviour.*:MechanicalInteraction.*:DiffusionTest.*Convergence*:SimObjectVectorTest.Equality:SchedulerTest::LoadAndBalanceAfterEnvironment)
COMMAND ${CMAKE_BINARY_DIR}/launcher.sh ${CMAKE_SOURCE_DIR}/util/valgrind.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TEST_TARGET} -- --gtest_filter=-*DeathTest.*:IOTest.InvalidRead:SchedulerTest.Backup:ResourceManagerTest.SortAndApplyOnAllElementsParallel*:InlineVector*:NeuriteElementBehaviour.*:MechanicalInteraction.*:DiffusionTest.*Convergence*:ParaviewIntegrationTest*:SimObjectVectorTest.Equality:SchedulerTest::LoadAndBalanceAfterEnvironment)
add_dependencies(run-valgrind biodynamo-unit-tests)
endif()

Expand Down
21 changes: 1 addition & 20 deletions cmake/UseBioDynaMo.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ SET(cuda_default @cuda@)
SET(opencl_default @opencl@)
SET(dict_default @dict@)
SET(numa_default @numa@)
SET(paraview_default @paraview@)
SET(sbml_default @sbml@)
SET(vtune_default @vtune@)
SET(tcmalloc_default @tcmalloc@)
Expand All @@ -51,7 +50,6 @@ option(cuda "Enable CUDA code generation for GPU acceleration" @cuda@)
option(opencl "Enable OpenCL code generation for GPU acceleration" @opencl@)
option(dict "Build with ROOT dictionaries" @dict@)
option(numa "Enable Numa support" @numa@)
option(paraview "Enable ParaView" @paraview@)
option(sbml "Enable SBML support" @sbml@)
option(vtune "Enable VTune performance analysis" @vtune@)
option(tcmalloc "Use tcmalloc." @tcmalloc@)
Expand All @@ -73,10 +71,6 @@ if (numa AND NOT numa_default)
MESSAGE(FATAL_ERROR "One of the option which you provided (-Dnuma=${numa}) is not compatible with \
BioDynaMo. BioDynaMo was built by setting -Dnuma to ${numa_default}. Please change -Dnuma to -Dnuma=${numa_default}.")
endif()
if (paraview AND NOT paraview_default)
MESSAGE(FATAL_ERROR "One of the option which you provided (-Dparaview=${paraview}) is not compatible with \
BioDynaMo. BioDynaMo was built by setting -Dparaview to ${paraview_default}. Please change -Dparaview to -Dparaview=${paraview_default}.")
endif()
if (sbml AND NOT sbml_default)
MESSAGE(FATAL_ERROR "One of the option which you provided (-Dsbml=${sbml}) is not compatible with \
BioDynaMo. BioDynaMo was built by setting -Dsbml to ${sbml_default}. Please use -Dsbml=${sbml_default}.")
Expand Down Expand Up @@ -164,10 +158,6 @@ if(opencl)
find_package(OpenCL)
endif()

if (paraview)
find_package(GLUT)
endif()

if(numa)
find_package(Numa REQUIRED)
if (NUMA_FOUND)
Expand All @@ -178,16 +168,6 @@ if(numa)
endif()
endif()

if(paraview)
find_package(ParaView 5.3 QUIET OPTIONAL_COMPONENTS vtkPVPythonCatalyst)
if(${ParaView_FOUND})
message(STATUS "Found ParaView")
else()
message(WARNING "ParaView not found")
set(paraview OFF CACHE "Build with ParaView support." BOOL)
endif()
endif()

find_package(ROOT REQUIRED COMPONENTS Geom Gui Eve GenVector)
verify_root()
if (dict)
Expand Down Expand Up @@ -270,6 +250,7 @@ include(${ROOT_USE_FILE})
fix_rootcling_omp_issue()
fix_macos_opencl_header_issue()

list(REMOVE_ITEM ROOT_LIBRARIES "$ENV{BDMSYS}/third_party/root/lib/libEve.so")
set(BDM_REQUIRED_LIBRARIES ${BDM_REQUIRED_LIBRARIES} biodynamo ${ROOT_LIBRARIES})

include_directories("$ENV{BDMSYS}/include")
Expand Down
Loading