-
Notifications
You must be signed in to change notification settings - Fork 52
Installation of VTK
- make
- build-essential
- cmake
- mesa-common-dev
- mesa-utils
- freeglut3-dev
sudo apt install make build-essential cmake mesa-common-dev mesa-utils freeglut3-dev
The following installation guide is based on the documentation of VTk.
To install VTK on a linux machine, first clone the repository from gitlab.
git clone https://gitlab.kitware.com/vtk/vtk.git
We recommend using version 9.1 in combination with t8code, so checkout into the respective branch. An older version of VTK may cause errors.
cd vtk
git checkout v9.1.0
cd ..
After choosing your desired version of VTK create a build directory
mkdir vtk_build
cd ~/vtk_build
The next step is to choose your configuration and create the Makefiles. There are several settings available for the VTK build, we are mainly interested in two. The first is to enable VTK_USE_MPI
, since we want to run VTK in parallel. An MPI implementation is required for that. The second one is to set up the install directory by setting up CMAKE_INSTALL_PREFIX
.
You can either call the cmake interface ccmake
and set the options up. Afterward, you just call cmake
. This way you get an overview of all to configure options.
ccmake ../vtk
cmake ../vtk
You also can pass the related flags to cmake and do it in one step:
cmake -D CMAKE_INSTALL_PREFIX=$HOME/opt/vtk_install -D VTK_USE_MPI=ON ../vtk
Note, use a different folder for your source, build and install. Otherwise, errors might occur.
After configuring and creating the Makefile you can build and install
make -j
make install
To use VTK you also need to adapt your PATH and LD_LIBRARY_PATH environment variable
echo "export PATH=$PATH:$HOME/opt/vtk_install/bin" >> $HOME/.bashrc
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/opt/vtk_install/lib" >> $HOME/.bashrc
To use the VTK library within t8code you need to set up some additional options in the configure script of t8code. The following lines need to be passed to the configure script:
--with-vtk
--with-vtk_version_number=9.1
LDFLAGS=-L$HOME/opt/vtk_install/lib
CPPFLAGS=-I$HOME/opt/vtk_install/include/vtk-9.1
For a quick release mode, a configuration we recommend would be:
configure --enable-mpi --with-vtk --with-vtk_version_number=9.1 CFLAGS="-O3" CXXFLAGS="-O3" CC=mpicc CXX=mpicxx LDFLAGS=-L$HOME/opt/vtk_install/lib CPPFLAGS=-I$HOME/opt/vtk_install/include/vtk-9.1
For more information about configuring and installing t8code see Installation Guide and Configure Options.
Installation Guide
Configure Options
Setup t8code on JUWELS and other Slurm based systems
Setup t8code for VTK
General
Step 0 Hello World
Step 1 Creating a coarse mesh
Step 2 Creating a uniform forest
Step 3 Adapting a forest
Step 4 Partition,-Balance,-Ghost
Step 5 Store element data
Step 6 Computing stencils
Step 7 Interpolation
Features
Documentation
Tree Indexing
Element Indexing
Running on JUWELS using Slurm
Overview of the most used API functions
Known issues
Workflow - FreeCAD to t8code
Reproducing Scaling Resluts
Coding Guidelines
Tips
Debugging with gdb
Debugging with valgrind
Test driven development
Testing with GoogleTest
Writing C interface code