Skip to content

Installing VTK

mlesueur edited this page Feb 6, 2017 · 17 revisions

VTK (Visualisation ToolKit) is a C++ class library that MOOSE needs to use modules of Image Processing. In Redback, we are using some of these functions to [create meshes from CT scan images](Creating meshes from CT-scan images).

VTK will be linked to MOOSE when compiling Libmesh with the right options.

Installation

VTK is installed automatically when running the MOOSE Environment package in the third step of MOOSE compilation.

If you need to install it on a cluster, you should run the file that has been created following the instructions here. You will need to edit the file to fit the cluster's and the user's specifications.

Compilation Commands

For the automatic official compilation of VTK, follow MOOSE page: http://mooseframework.org/wiki/PhysicsModules/PhaseField/ImageReader/

Manual Compilation

Instead of using variables that are not always pointing to the right folders that we need, you need to find the absolute path of the include and the lib folder of VTK. The paths should look like this:

  • Include: --with-vtk-include=/opt/moose/vtk-6.3/clang-opt/include/vtk-6.3
  • Lib: --with-vtk-lib=/opt/moose/vtk-6.3/clang-opt/lib

The paths are changing depending on your OS or your version of MOOSE. To find them, try to open these folders and look where .h (for include) or .dylib (for lib) are located. Note that you might also need to use the VTK directories in /opt/moose/vtk-6.3/gcc-opt/ rather than /opt/moose/vtk-6.3/clang-opt/.

Then you run the same scripts with the absolute paths instead of the variables. It should look like this:

cd ~/projects/moose/scripts
./update_and_rebuild_libmesh.sh --with-vtk-include=/opt/moose/vtk-6.3/clang-opt/include/vtk-6.3 --with-vtk-lib=/opt/moose/vtk-6.3/clang-opt/lib

Verification of successful compilation

Pick up to the steps after Libmesh compilation in MOOSE Getting Started.

When you run the tests, you will be able to see that some tests have been skipped. You will easily notice on some either VTK!=false or VTK!=true.

The one that proves that VTK has been successfully installed is VTK!=false.

Known errors

  • For unknown reasons, VTK is not running with more than 21 processors on LEONARDI CLUSTER.
Clone this wiki locally