Difference between revisions of "Building VTK-m"

From VTKM
Jump to: navigation, search
(Dependencies)
(Dependencies)
(3 intermediate revisions by the same user not shown)
Line 14: Line 14:
  
 
== Dependencies ==
 
== Dependencies ==
 +
VTK-m is supported on Windows, Mac OSX, and Linux and should work on other varieties of Unix. I
  
* CMake: VTK-m uses CMake to configure the build. You will need a relatively new version of CMake. CMake 2.8.11 or newer is required.
+
* C++11 compiler: VTK-m uses numerous C++11 features we recommend:
 +
** GCC 4.8+
 +
** Clang 3.3+
 +
** XCode 5.0+
 +
** MSVC 2015+
  
== Supported Operating Systems and Compilers ==
+
* CMake: VTK-m uses CMake to configure the build. You will need CMake 3.3 or newer.
 
 
VTK-m is supported on Windows, Mac OSX, and Linux and should work on other varieties of Unix. It is possible to compile VTK-m with many different compiler versions including GNU, CLANG, MSVC, Intel, and PGI.
 
  
 
== Building VTK-m with CMake ==
 
== Building VTK-m with CMake ==
 
Although VTK-m is header only, the code needs to be configured for the local system. VTK-m also has a large testing framework that will ensure it is working correctly on your system.
 
  
 
Always configure VTK-m so that the build tree is not the same as the source directory. The project will not run in if the source and build directories are the same.
 
Always configure VTK-m so that the build tree is not the same as the source directory. The project will not run in if the source and build directories are the same.
Line 69: Line 70:
 
Examples:
 
Examples:
  
Boost only:
+
standalone:
  
  cmake -DBoost_INCLUDE_DIR=/boost/1.57.0/include ../vtk-m
+
  cmake ../vtk-m
  
 
Or with cuda:
 
Or with cuda:
  
  cmake -DBoost_INCLUDE_DIR=/boost/1.57.0/include -DVTKm_ENABLE_CUDA=ON -DCUDA_TOOLKIT_ROOT_DIR=/path/cuda70 ../vtk-m
+
  cmake -DVTKm_ENABLE_CUDA=ON -DCUDA_TOOLKIT_ROOT_DIR=/path/cuda70 ../vtk-m

Revision as of 17:05, 22 February 2018

VTK-m is an open source C++ header toolkit that provides the ability to do fine-grained concurrency on scientific visualization data structures. VTK-m has few required dependencies but supports several optional components.

Getting VTK-m

You can download the latest source from our VTK-m Releases page.

For access to the most recent work, VTK-m is available from a kitware gitlab instance, which has public anonymous read access. The git repository can be found on the project web page(https://gitlab.kitware.com/vtk/vtk-m).

If you haven't used git before, consider following github's excellent setup guide. To get a copy of the repository, issue a git clone command.

git clone https://gitlab.kitware.com/vtk/vtk-m.git

The repository supports read access with the https, and ssh protocols.If you want to contribute to VTK-m please read the Contributing to VTK-m page.

Dependencies

VTK-m is supported on Windows, Mac OSX, and Linux and should work on other varieties of Unix. I

  • C++11 compiler: VTK-m uses numerous C++11 features we recommend:
    • GCC 4.8+
    • Clang 3.3+
    • XCode 5.0+
    • MSVC 2015+
  • CMake: VTK-m uses CMake to configure the build. You will need CMake 3.3 or newer.

Building VTK-m with CMake

Always configure VTK-m so that the build tree is not the same as the source directory. The project will not run in if the source and build directories are the same.

The basic steps to setting up VTK-m are as follows:

git clone  https://gitlab.kitware.com/vtk/vtk-m.git
mkdir vtkm-build
cd vtkm-build
cmake-gui ../vtk-m
make
make test

(Note that parallel makes are supported, so you can run something like make -j4 to take advantage of multiple cores during the build.)

VTK-m CMake Settings

The VTK-m CMake configuration supports several options. Here are some options specific to VTK-m

Variable Description
VTKm_ENABLE_BENCHMARKS Turn on additional timing tests.
VTKm_ENABLE_CUDA Enable CUDA backend. Requires CUDA Toolkit and Thrust.
VTKm_ENABLE_TBB Enable Intel Threading Building Blocks backend. Requires the TBB library.
VTKm_ENABLE_TESTING Turn on header, unit, and benchmark tests.
VTKm_USE_64BIT_IDS Enable 64 bit index support. This is the size of integers used to index arrays, points, cells, etc.
VTKm_USE_DOUBLE_PRECISION Precision to use in floating point numbers when no other precision can be inferred. Use 64 bit precision when on, 32 bit precision when off.

Documentation

Documentation is currently a work in progress. You can get download latest version of the VTK-m Users' Guide (Work in progress).

Manual CMake Settings

Examples:

standalone:

cmake ../vtk-m

Or with cuda:

cmake -DVTKm_ENABLE_CUDA=ON -DCUDA_TOOLKIT_ROOT_DIR=/path/cuda70 ../vtk-m