- Notifications
You must be signed in to change notification settings - Fork 61
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.gitWe 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_buildThe 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 ../vtkYou 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 installTo 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/.bashrcTo 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.1For 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
Prerequisites & Compilation
t8_time_forest_partition
t8_time_fractal
t8_time_new_refine
t8_time_partition
t8_time_prism
t8_time_set_join_by_vertices