Difference between revisions of "Tutorial"

From VTKM
Jump to navigation Jump to search
 
(24 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
'''WARNING: Under development!'''
 
 
 
  
 
== About this page ==
 
== About this page ==
Line 8: Line 4:
 
This page contains materials for the VTK-m tutorial.
 
This page contains materials for the VTK-m tutorial.
  
This tutorial will be presented on Sunday October 20th at the VIS19 conference in Vancouver, Canada.
+
This tutorial will be presented on Sunday, October 20th at the VIS19 conference in Vancouver, Canada.
 +
Attendees can get the slides [[Media:VTKm_Tutorial_VIS19.pptx|HERE]] and the user guide is [[Media:VTKmUsersGuide-1-5.pdf|HERE]].
  
 
There are two options for running code:
 
There are two options for running code:
# Building VTK-m on your own machine
+
# Building VTK-m on your own machine.
# Running our VirtualBox image with VTK-m installed
+
# Running our VirtualBox image with VTK-m installed.
  
 
Sections below describe how to pursue each of these options.
 
Sections below describe how to pursue each of these options.
 
Additionally, attendees can get the slides [https://www.dropbox.com/s/vdi77o6d1fijh7y/VTKm_Tutorial_VIS19.pptx?dl=0 HERE].
 
For additional development material, attendees can get the user guide [http://m.vtk.org/images/c/c9/VTKmUsersGuide-1-5.pdf HERE]
 
  
 
== Download and build VTK-m ==
 
== Download and build VTK-m ==
  
Process:
+
The process to build VTK-m:
* Download V1.5.0 [http://m.vtk.org/index.php/VTK-m_Releases#VTK-m_Version_1.5.0 here].
+
* Download V1.5.0 [[VTK-m Releases#VTK-m_Version_1.5.0|here]].
 
** (note the build page assumes you will be accessing the master via a git clone, but we encourage you to use the released version for the tutorial)
 
** (note the build page assumes you will be accessing the master via a git clone, but we encourage you to use the released version for the tutorial)
 
* Do not enable the TBB, OpenMP or CUDA support, at least at first.
 
* Do not enable the TBB, OpenMP or CUDA support, at least at first.
Line 33: Line 27:
 
# mkdir build install # out of source build
 
# mkdir build install # out of source build
 
# cd build
 
# cd build
# cmake -DCMAKE_INSTALL_PREFIX=../install \
+
# cmake -DCMAKE_INSTALL_PREFIX=../install -DVTKm_ENABLE_TESTING:BOOL=OFF ../vtk-m-v1.5.0
#      -DVTKm_ENABLE_TESTING:BOOL=OFF \
+
# make -j4
#      ../vtk-m-v1.5.0
+
# make install
# cmake --build . -j 4
 
 
</pre>
 
</pre>
 
 
The main instructions to download and build are [https://gitlab.kitware.com/vtk/vtk-m/blob/master/README.md#building here].  That said, we recommend following the instructions above.
 
The main instructions to download and build are [https://gitlab.kitware.com/vtk/vtk-m/blob/master/README.md#building here].  That said, we recommend following the instructions above.
  
== Download tutorial materials ==
 
 
# [[http://ix.cs.uoregon.edu/~hank/VTKm_tutorial_Jul19.pptx slides]] (60+MB)
 
# [[http://ix.cs.uoregon.edu/~hank/VTKm_tutorial_examples.tar examples]] (0.03MB)
 
# [[http://ix.cs.uoregon.edu/~hank/kitchen.vtk kitchen.vtk data file]]  (2MB) (on Mac: right-click and "Save Link As")
 
 
== Build example code ==
 
  
 +
The process to build code examples:
 +
* For V1.5.0 (which was used for the tutorial), download the examples for the tutorial [[Media:VTKm_tutorial_examples.tar.gz|here]]
 +
* For V1.6.0 (the release after the tutorial), download the examples for the tutorial [[Media:VTKm_tutorial_examples_1.6.0.tar.gz|here]] or from [https://github.com/uo-cdux/vtk-m-tutorial github]
  
 
Your process on Unix/Mac should be something like:
 
Your process on Unix/Mac should be something like:
 
 
<pre>
 
<pre>
 
# (downloads from above)
 
# (downloads from above)
# export P=/path/where/you/want/to/place/tutorial/examples
 
 
# export D=/path/to/where/your/browser/downloads/files
 
# export D=/path/to/where/your/browser/downloads/files
# cp $D/VTKm_tutorial_examples.tar $P
+
# mkdir VTKm_tutorial_examples    # should be peer to build/install
# cd $P
+
# cd VTKm_tutorial_examples
# tar xvf VTKm_tutorial_examples.tar # places tutorial files in $PWD
+
# cp $D/VTKm_tutorial_examples.tar .
 +
# tar xvf VTKm_tutorial_examples.tar.gz # places tutorial files in $PWD
 
# cmake . -DCMAKE_PREFIX_PATH="<path_to_vtkm-installation>/"
 
# cmake . -DCMAKE_PREFIX_PATH="<path_to_vtkm-installation>/"
# cmake --build .  
+
--> if you did a "make install" and this directory is peer to the install directory, then it would be
 +
--> # cmake . -DCMAKE_PREFIX_PATH=../install
 +
# make
 
# ./tut_io # run 1st example
 
# ./tut_io # run 1st example
 
# ls out_io.vtk # confirms 1st example successfully completed
 
# ls out_io.vtk # confirms 1st example successfully completed
 
</pre>
 
</pre>
 +
 +
== Download Virtual Box image with VTK-m ==
 +
 +
The Virtual Box image with VTK-m installed can be found [https://www.dropbox.com/s/36hn0no3jhn9wra/VTKm_tutorial.ova?dl=0 here].
 +
 +
To be able to use this image you'll need to have the Virtual Box software installed. Please follow the instructions provided [https://www.virtualbox.org/wiki/Downloads here].
 +
 +
The internet connection at the tutorial venue may discourage the requested downloads, in that case please ask the presenters for a flash drive with the required material.
 +
 +
The username/password to access the material on the VM are vtkm/vtkm.
 +
 +
*VTK-m source code and build can be accessed in the "/home/vtkm/Software/VTK-m/"
 +
** The source code is available in the "vtk-m-v1.5.0" directory
 +
** The build files are available in the "build" directory
 +
** VTK-m has already been installed for use by the example code

Latest revision as of 13:44, 24 June 2020

About this page

This page contains materials for the VTK-m tutorial.

This tutorial will be presented on Sunday, October 20th at the VIS19 conference in Vancouver, Canada. Attendees can get the slides HERE and the user guide is HERE.

There are two options for running code:

  1. Building VTK-m on your own machine.
  2. Running our VirtualBox image with VTK-m installed.

Sections below describe how to pursue each of these options.

Download and build VTK-m

The process to build VTK-m:

  • Download V1.5.0 here.
    • (note the build page assumes you will be accessing the master via a git clone, but we encourage you to use the released version for the tutorial)
  • Do not enable the TBB, OpenMP or CUDA support, at least at first.
    • (we stand behind our support for these backends, but it is good to start simple)

In all, your process on Unix/Mac should be something like:

# (download VTK-m 1.5.0)
# tar xvfz vtk-m-v1.5.0.tar.gz
# mkdir build install # out of source build
# cd build
# cmake -DCMAKE_INSTALL_PREFIX=../install -DVTKm_ENABLE_TESTING:BOOL=OFF ../vtk-m-v1.5.0
# make -j4
# make install

The main instructions to download and build are here. That said, we recommend following the instructions above.


The process to build code examples:

  • For V1.5.0 (which was used for the tutorial), download the examples for the tutorial here
  • For V1.6.0 (the release after the tutorial), download the examples for the tutorial here or from github

Your process on Unix/Mac should be something like:

# (downloads from above)
# export D=/path/to/where/your/browser/downloads/files
# mkdir VTKm_tutorial_examples    # should be peer to build/install
# cd VTKm_tutorial_examples
# cp $D/VTKm_tutorial_examples.tar .
# tar xvf VTKm_tutorial_examples.tar.gz # places tutorial files in $PWD
# cmake . -DCMAKE_PREFIX_PATH="<path_to_vtkm-installation>/"
--> if you did a "make install" and this directory is peer to the install directory, then it would be
--> # cmake . -DCMAKE_PREFIX_PATH=../install
# make
# ./tut_io # run 1st example
# ls out_io.vtk # confirms 1st example successfully completed

Download Virtual Box image with VTK-m

The Virtual Box image with VTK-m installed can be found here.

To be able to use this image you'll need to have the Virtual Box software installed. Please follow the instructions provided here.

The internet connection at the tutorial venue may discourage the requested downloads, in that case please ask the presenters for a flash drive with the required material.

The username/password to access the material on the VM are vtkm/vtkm.

  • VTK-m source code and build can be accessed in the "/home/vtkm/Software/VTK-m/"
    • The source code is available in the "vtk-m-v1.5.0" directory
    • The build files are available in the "build" directory
    • VTK-m has already been installed for use by the example code