https://public.kitware.com/Wiki/api.php?action=feedcontributions&user=Bnwylie&feedformat=atomKitwarePublic - User contributions [en]2024-03-28T09:25:44ZUser contributionsMediaWiki 1.38.6https://public.kitware.com/Wiki/index.php?title=VTK/Multicore_and_Streaming&diff=15572VTK/Multicore and Streaming2009-06-10T16:15:22Z<p>Bnwylie: /* Meeting - 9 June 2009 */</p>
<hr />
<div>=Multicore and Streaming=<br />
<br />
==Background==<br />
<br />
This page is to act as a facilitator for current efforts in adding advanced multicore and streaming functionality into the VTK framework. We will be building on some past work by others, and this page is meant to facilitate discussion and collaboration of those contributing via a number of synergistic research efforts.<br />
<br />
==Discussions==<br />
<br />
===Meeting - 9 June 2009===<br />
* Brian would like to have the pipelines on the wiki along with the discussion, design, use cases, etc.<br />
* Berk would like to modify Huy's current changes (in git) to leverage the existing streaming classes in vtk. Huy indicated that the current streamers require extents calculation, which might not always be available. Berk suggested that we look at using pieces instead of extents.<br />
* Need to subclass the composite data pipeline with support for temporal data.<br />
* Huy is still working on Push model. It's implemented but not complete and accessible.<br />
* Berk would like more of the functionality available in the executive. VTK should be changed rather than putting a band-aid on the current implementation.<br />
* Tim will send Huy a simple text pipeline that he would like to have streamed (this includes tables.)<br />
* Need to start moving text analysis filters into VTK proper.<br />
* Huy will remain in the git branch to continue experimentation with the streaming, and we're going to start implementing a text streaming set of examples for testing the new functionality.<br />
* Berk suggested that we need to develop a 'vision' statement (with use cases) for how we want the new multicore/streaming algorithms to work together.<br />
<br />
====Action items====<br />
* Huy will update the wiki to include the papers and a graphvis version of the pipeline on the website that can be used to facilitate discussion<br />
* Tim/Jason will start moving TextAnalysis kit into VTK proper<br />
* Tim/Huy will start developing examples demonstrating text streaming as a means of vetting the streaming/multicore functionality that Huy has already developed.<br />
* Jason/Berk/Huy need to develop a vision statement and place it on the wiki.<br />
* Jason/Berk/Huy need to develop a list of goals and use cases for uniting this work to current efforts and desired efforts in VTK.<br />
<br />
== GraphViz Test ==<br />
<graphviz><br />
digraph proto2_pipeline<br />
{<br />
overlap="False";<br />
node[shape=box, style=filled, fontname=Helvetica, fontsize="10" colorscheme=set33 fillcolor=1]<br />
edge[fontname=Helvetica fontsize="10"]<br />
<br />
<br />
// Streaming pipeling ...<br />
vtkStreamer [fillcolor="#55ff55"]<br />
vtkFoo [fillcolor="#55ff55"]<br />
vtkBar [fillcolor="#55ff55"]<br />
view1 [label="View 1 (Clustered Documents)", fillcolor=2]<br />
<br />
vtkStreamer -> vtkFoo [label="Pieces"]<br />
vtkFoo -> vtkBar [label="Data"]<br />
vtkBar->view1 [label="Table"]<br />
}<br />
</graphviz></div>Bnwyliehttps://public.kitware.com/Wiki/index.php?title=VTK/Multicore_and_Streaming&diff=15565VTK/Multicore and Streaming2009-06-10T15:39:09Z<p>Bnwylie: /* Meeting 9 June 2009 */</p>
<hr />
<div>=Multicore and Streaming=<br />
<br />
==Background==<br />
<br />
This page is to act as a facilitator for current efforts in adding advanced multicore and streaming functionality into the VTK framework. We will be building on some past work by others, and this page is meant to facilitate discussion and collaboration of those contributing via a number of synergistic research efforts.<br />
<br />
==Discussions==<br />
<br />
===Meeting 9 June 2009===<br />
* Brian would like to have the pipelines on the wiki along with the papers now that the reviews are complete.<br />
* Brian does not care about the papers! :)<br />
* Berk would like to modify Huy's current changes (in git) to leverage the existing streaming classes in vtk. Huy indicated that the current streamers require extents calculation, which might not always be available. Berk suggested that we look at using pieces instead of extents.<br />
* Need to subclass the composite data pipeline with support for temporal data.<br />
*<br />
<br />
== GraphViz Test ==<br />
<graphviz><br />
digraph proto2_pipeline<br />
{<br />
overlap="False";<br />
node[shape=box, style=filled, fontname=Helvetica, fontsize="10" colorscheme=set33 fillcolor=1]<br />
edge[fontname=Helvetica fontsize="10"]<br />
<br />
<br />
// Streaming pipeling ...<br />
vtkStreamer [fillcolor="#55ff55"]<br />
vtkFoo [fillcolor="#55ff55"]<br />
vtkBar [fillcolor="#55ff55"]<br />
view1 [label="View 1 (Clustered Documents)", fillcolor=2]<br />
<br />
vtkStreamer -> vtkFoo [label="Pieces"]<br />
vtkFoo -> vtkBar [label="Data"]<br />
vtkBar->view1 [label="Table"]<br />
}<br />
</graphviz></div>Bnwyliehttps://public.kitware.com/Wiki/index.php?title=VTK/Multicore_and_Streaming&diff=15561VTK/Multicore and Streaming2009-06-10T15:32:26Z<p>Bnwylie: /* Meeting 9 June 2009 */</p>
<hr />
<div>=Multicore and Streaming=<br />
<br />
==Background==<br />
<br />
This page is to act as a facilitator for current efforts in adding advanced multicore and streaming functionality into the VTK framework. We will be building on some past work by others, and this page is meant to facilitate discussion and collaboration of those contributing via a number of synergistic research efforts.<br />
<br />
==Discussion==<br />
<br />
===Meeting 9 June 2009===<br />
* Brian would like to have the pipelines on the wiki along with the papers now that the reviews are complete.<br />
* Brian does not care about the papers! :)</div>Bnwyliehttps://public.kitware.com/Wiki/index.php?title=VTK/Cray_XT3_Compilation&diff=14155VTK/Cray XT3 Compilation2008-12-16T20:08:29Z<p>Bnwylie: </p>
<hr />
<div>This document shows the steps to compile VTK for the service and compute nodes of the Cray XT3 (Red Storm) at Sandia National Laboratories. Check the main Red Storm web site <http://rsweb.sandia.gov> for a more complete discussion about how to compile for the Cray XT3.<br />
<br />
== Building VTK for Red Storm Service Nodes ==<br />
<br />
=== Load appropriate modules ===<br />
<br />
Cray uses modules [http://rsweb.sandia.gov] to set appropriate environment variables, paths, and compilers required for cross compiling for the compute or service nodes. I used the following script to load modules for service-node compilation.<br />
<br />
<pre><br />
# Compiling for service nodes:<br />
. /opt/modules/default/init/bash<br />
<br />
# Unload pgi and gnu catamount modules<br />
module unload PrgEnv-pgi<br />
module unload PrgEnv-gnu<br />
<br />
# Load papi (maybe not necessary)<br />
module load papi<br />
</pre><br />
<br />
You need to either execute each of these commands in your active shell, or ''source'' the script. I did this by putting the script in ~/.local/share/loadmods.snos and then creating an alias <pre>alias loadmods.snos='source /home/raoldfi/.local/share/loadmods.snos'</pre>.<br />
<br />
=== Build/install CMAKE ===<br />
<br />
Since VTK requires cmake, you need to download cmake from http://www.cmake.org and follow their instructions to install (make sure you have the snos modules loaded). I did the following without any problems. <br />
<br />
<pre><br />
[cmake-2.6.2] % ./build --prefix=${HOME}/.local<br />
[cmake-2.6.2] % make install<br />
</pre><br />
<br />
=== Build/install VTK ===<br />
<br />
Since the service nodes use Suse Linux, building and installing is trivial. From the VTK directory, this is what I did...<br />
<br />
<pre><br />
[VTK] % mkdir build/snos<br />
[VTK] % cd build/snos<br />
[snos] % ccmake ../..<br />
[snos] % make install<br />
</pre><br />
<br />
During the ccmake step, I set prefix to ${HOME}/.local. <br />
<br />
<br />
== Building VTK for Red Storm Compute Nodes ==<br />
<br />
Now for the hard part. Red Storm compute nodes use a the catamount operating system that has no support for <br />
* fork(), exec(), system(), or dynamic process management,<br />
* TCP/IP protocol stacks (MPI is used instead)<br />
* I/O or network events other than MPI<br />
* Dynamic linking and dynamically loaded libraries<br />
* Unix-style interprocess communication (pipes, fifos, etc.)<br />
<br />
Since VTK was designed primarily for Clusters with full OS support, we have to be a little careful. <br />
<br />
=== Load appropriate modules ===<br />
<br />
The standard ''supported'' modules for catamount are the PGI compilers. Gnu compilers are available and work, but they are not really supported. I ''source'' the following script to load the right modules cross compiling for catamount. <br />
<br />
<pre><br />
# Cross-compile modules for catamount<br />
<br />
# Load the appropriate bash environment<br />
. /opt/modules/default/init/bash<br />
<br />
# Unload GNU modules for catamount<br />
module unload PrgEnv-gnu<br />
<br />
# load PGI modules for catamount<br />
module load PrgEnv-pgi<br />
<br />
# Load papi for accurate timings<br />
module load papi<br />
</pre><br />
<br />
Use the same approach described in the [[VTK-Red Storm#Load appropriate modules|previous section]] to load the modules into your shell environment.<br />
<br />
=== TIFF Support ===<br />
<br />
The Tiff image support can be tricky, here's an excerpt from Pat Marion:<br />
<br />
If you look in the vtk build directory for your service node build, the Suse build, you should see a file named VTKCompileToolsConfig.cmake. This file lists the paths of some executables. These executables can be imported and used when crosscompile build. This is where the vtkmkg3states executable comes from that addresses the tiff error:<br />
<br />
make[2]: *** No rule to make target<br />
`../../Utilities/vtktiff/vtkmkg3states', needed by `Utilities/vtktiff/tif_fax3sm.c'<br />
<br />
To import the compile tools, add this to your cmake command line:<br />
<br />
-DVTKCompileTools_DIR=$vtk_suse_build_dir<br />
<br />
=== Configure VTK ===<br />
<br />
To cross compile VTK for catamount, we have to specify some configuration options in a Toolchain file and remove some VTK features that are not supported in catamount.<br />
<br />
==== Create a Toolchain file ====<br />
<br />
The toolchain file tells cmake how to compile the code. I modified the Paraview toolchain file (thanks Alan) to create the following. <br />
<br />
<pre><br />
# -------- Toolchain-catamount.cmake ---------<br />
# Specify the target system (this allows cross-compiling)<br />
SET(CMAKE_SYSTEM_NAME Catamount)<br />
<br />
# specify the cross compiler<br />
SET(CMAKE_C_COMPILER cc --target=catamount)<br />
SET(CMAKE_CXX_COMPILER CC --target=catamount)<br />
<br />
# set the search path for the environment coming with the compiler<br />
# and a directory where you can install your own compiled software<br />
set(CMAKE_FIND_ROOT_PATH<br />
/opt/xt-pe/default<br />
/opt/xt-mpt/default/mpich2-64/GP2<br />
)<br />
<br />
# adjust the default behaviour of the FIND_XXX() commands:<br />
# search headers and libraries in the target environment, search<br />
# programs in the host environment<br />
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)<br />
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)<br />
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)<br />
<br />
# Parallel configuration<br />
SET(VTK_USE_PARALLEL ON)<br />
SET(VTK_USE_MPI ON)<br />
</pre><br />
<br />
==== Using ccmake ====<br />
<br />
The next step is to run ccmake from the build directory. This will generate all the necessary make files to build VTK. <br />
<br />
<pre><br />
[builddir] % ccmake -DCMAKE_TOOLCHAIN_FILE=Toolchain-catamount.cmake [PATH TO VTK SOURCE]<br />
</pre><br />
<br />
After calling ccmake, hit 'c' to configure and build the cache. Now, go get some coffee. This step took about 10 minutes. When it completes you will get a couple of errors about VTKCompileTools and LARGE_FILE_SUPPORT). I just ignored these... hit 'e'. <br />
<br />
Once in the ccmake gui, hit 'c' again to read the Toolchain file and reconfigure. I ignored the error about not finding the OPENGL_INCLUDE files. <br />
<br />
Now we need to manually remove features that are not supported by catamount, and set various other configuration. I did the following in ccmake's advanced mode:<br />
* VTK_USE_METAIO = OFF (metaio uses unsupported network features)<br />
* VTK_USE_RENDERING = OFF (fixes the OPENGL issue)<br />
* BUILD_EXAMPLES = ON<br />
* CMAKE_INSTALL_PREFIX = [my installation directory]<br />
<br />
After configuring one more time, hit 'c', hit 'g' to generate the files and exit.<br />
<br />
=== Build/Install VTK ===<br />
<br />
At this point, we just need to make and install the libraries.<br />
<pre><br />
[builddir] make;<br />
[builddir] make install;<br />
</pre><br />
<br />
Expect a number of warnings about typecasts, unreachable statements, and such; as well as warnings about unsupported features in catamount. These could turn out to be a problem if one of the vtk libraries uses these features.</div>Bnwyliehttps://public.kitware.com/Wiki/index.php?title=VTK/Cray_XT3_Compilation&diff=14150VTK/Cray XT3 Compilation2008-12-16T15:58:17Z<p>Bnwylie: Add tiff support info</p>
<hr />
<div>= Compiling VTK for the Cray XT3 =<br />
This document shows the steps to compile VTK for the service and compute nodes of the Cray XT3 (Red Storm) at Sandia National Laboratories. Check the main Red Storm web site <http://rsweb.sandia.gov> for a more complete discussion about how to compile for the Cray XT3.<br />
<br />
== Building VTK for Red Storm Service Nodes ==<br />
<br />
=== Load appropriate modules ===<br />
<br />
Cray uses modules [http://rsweb.sandia.gov] to set appropriate environment variables, paths, and compilers required for cross compiling for the compute or service nodes. I used the following script to load modules for service-node compilation.<br />
<br />
<pre><br />
# Compiling for service nodes:<br />
. /opt/modules/default/init/bash<br />
<br />
# Unload pgi and gnu catamount modules<br />
module unload PrgEnv-pgi<br />
module unload PrgEnv-gnu<br />
<br />
# Load papi (maybe not necessary)<br />
module load papi<br />
</pre><br />
<br />
You need to either execute each of these commands in your active shell, or ''source'' the script. I did this by putting the script in ~/.local/share/loadmods.snos and then creating an alias <pre>alias loadmods.snos='source /home/raoldfi/.local/share/loadmods.snos'</pre>.<br />
<br />
=== Build/install CMAKE ===<br />
<br />
Since VTK requires cmake, you need to download cmake from http://www.cmake.org and follow their instructions to install (make sure you have the snos modules loaded). I did the following without any problems. <br />
<br />
<pre><br />
[cmake-2.6.2] % ./build --prefix=${HOME}/.local<br />
[cmake-2.6.2] % make install<br />
</pre><br />
<br />
=== Build/install VTK ===<br />
<br />
Since the service nodes use Suse Linux, building and installing is trivial. From the VTK directory, this is what I did...<br />
<br />
<pre><br />
[VTK] % mkdir build/snos<br />
[VTK] % cd build/snos<br />
[snos] % ccmake ../..<br />
[snos] % make install<br />
</pre><br />
<br />
During the ccmake step, I set prefix to ${HOME}/.local. <br />
<br />
<br />
== Building VTK for Red Storm Compute Nodes ==<br />
<br />
Now for the hard part. Red Storm compute nodes use a the catamount operating system that has no support for <br />
* fork(), exec(), system(), or dynamic process management,<br />
* TCP/IP protocol stacks (MPI is used instead)<br />
* I/O or network events other than MPI<br />
* Dynamic linking and dynamically loaded libraries<br />
* Unix-style interprocess communication (pipes, fifos, etc.)<br />
<br />
Since VTK was designed primarily for Clusters with full OS support, we have to be a little careful. <br />
<br />
=== Load appropriate modules ===<br />
<br />
The standard ''supported'' modules for catamount are the PGI compilers. Gnu compilers are available and work, but they are not really supported. I ''source'' the following script to load the right modules cross compiling for catamount. <br />
<br />
<pre><br />
# Cross-compile modules for catamount<br />
<br />
# Load the appropriate bash environment<br />
. /opt/modules/default/init/bash<br />
<br />
# Unload GNU modules for catamount<br />
module unload PrgEnv-gnu<br />
<br />
# load PGI modules for catamount<br />
module load PrgEnv-pgi<br />
<br />
# Load papi for accurate timings<br />
module load papi<br />
</pre><br />
<br />
Use the same approach described in the [[VTK-Red Storm#Load appropriate modules|previous section]] to load the modules into your shell environment.<br />
<br />
=== TIFF Support ===<br />
<br />
The Tiff image support can be tricky, here's an excerpt from Pat Marion:<br />
<br />
If you look in the vtk build directory for your service node build, the Suse build, you should see a file named VTKCompileToolsConfig.cmake. This file lists the paths of some executables. These executables can be imported and used when crosscompile build. This is where the vtkmkg3states executable comes from that addresses the tiff error:<br />
<br />
make[2]: *** No rule to make target<br />
`../../Utilities/vtktiff/vtkmkg3states', needed by `Utilities/vtktiff/tif_fax3sm.c'<br />
<br />
To import the compile tools, add this to your cmake command line:<br />
<br />
-DVTKCompileTools_DIR=$vtk_suse_build_dir<br />
<br />
=== Configure VTK ===<br />
<br />
To cross compile VTK for catamount, we have to specify some configuration options in a Toolchain file and remove some VTK features that are not supported in catamount.<br />
<br />
==== Create a Toolchain file ====<br />
<br />
The toolchain file tells cmake how to compile the code. I modified the Paraview toolchain file (thanks Alan) to create the following. <br />
<br />
<pre><br />
# -------- Toolchain-catamount.cmake ---------<br />
# Specify the target system (this allows cross-compiling)<br />
SET(CMAKE_SYSTEM_NAME Catamount)<br />
<br />
# specify the cross compiler<br />
SET(CMAKE_C_COMPILER cc --target=catamount)<br />
SET(CMAKE_CXX_COMPILER CC --target=catamount)<br />
<br />
# set the search path for the environment coming with the compiler<br />
# and a directory where you can install your own compiled software<br />
set(CMAKE_FIND_ROOT_PATH<br />
/opt/xt-pe/default<br />
/opt/xt-mpt/default/mpich2-64/GP2<br />
)<br />
<br />
# adjust the default behaviour of the FIND_XXX() commands:<br />
# search headers and libraries in the target environment, search<br />
# programs in the host environment<br />
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)<br />
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)<br />
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)<br />
<br />
# Parallel configuration<br />
SET(VTK_USE_PARALLEL ON)<br />
SET(VTK_USE_MPI ON)<br />
</pre><br />
<br />
==== Using ccmake ====<br />
<br />
The next step is to run ccmake from the build directory. This will generate all the necessary make files to build VTK. <br />
<br />
<pre><br />
[builddir] % ccmake -DCMAKE_TOOLCHAIN_FILE=Toolchain-catamount.cmake [PATH TO VTK SOURCE]<br />
</pre><br />
<br />
After calling ccmake, hit 'c' to configure and build the cache. Now, go get some coffee. This step took about 10 minutes. When it completes you will get a couple of errors about VTKCompileTools and LARGE_FILE_SUPPORT). I just ignored these... hit 'e'. <br />
<br />
Once in the ccmake gui, hit 'c' again to read the Toolchain file and reconfigure. I ignored the error about not finding the OPENGL_INCLUDE files. <br />
<br />
Now we need to manually remove features that are not supported by catamount, and set various other configuration. I did the following in ccmake's advanced mode:<br />
* VTK_USE_METAIO = OFF (metaio uses unsupported network features)<br />
* VTK_USE_RENDERING = OFF (fixes the OPENGL issue)<br />
* BUILD_EXAMPLES = ON<br />
* CMAKE_INSTALL_PREFIX = [my installation directory]<br />
<br />
After configuring one more time, hit 'c', hit 'g' to generate the files and exit.<br />
<br />
=== Build/Install VTK ===<br />
<br />
At this point, we just need to make and install the libraries.<br />
<pre><br />
[builddir] make;<br />
[builddir] make install;<br />
</pre><br />
<br />
Expect a number of warnings about typecasts, unreachable statements, and such; as well as warnings about unsupported features in catamount. These could turn out to be a problem if one of the vtk libraries uses these features.</div>Bnwyliehttps://public.kitware.com/Wiki/index.php?title=VTK/Cray_XT3_Compilation&diff=14146VTK/Cray XT3 Compilation2008-12-15T16:38:46Z<p>Bnwylie: New page: = Compiling VTK for the Cray XT3 = This document shows the steps to compile VTK for the service and compute nodes of the Cray XT3 (Red Storm) at Sandia National Laboratories. Check the mai...</p>
<hr />
<div>= Compiling VTK for the Cray XT3 =<br />
This document shows the steps to compile VTK for the service and compute nodes of the Cray XT3 (Red Storm) at Sandia National Laboratories. Check the main Red Storm web site <http://rsweb.sandia.gov> for a more complete discussion about how to compile for the Cray XT3.<br />
<br />
== Building VTK for Red Storm Service Nodes ==<br />
<br />
=== Load appropriate modules ===<br />
<br />
Cray uses modules [http://rsweb.sandia.gov] to set appropriate environment variables, paths, and compilers required for cross compiling for the compute or service nodes. I used the following script to load modules for service-node compilation.<br />
<br />
<pre><br />
# Compiling for service nodes:<br />
. /opt/modules/default/init/bash<br />
<br />
# Unload pgi and gnu catamount modules<br />
module unload PrgEnv-pgi<br />
module unload PrgEnv-gnu<br />
<br />
# Load papi (maybe not necessary)<br />
module load papi<br />
</pre><br />
<br />
You need to either execute each of these commands in your active shell, or ''source'' the script. I did this by putting the script in ~/.local/share/loadmods.snos and then creating an alias <pre>alias loadmods.snos='source /home/raoldfi/.local/share/loadmods.snos'</pre>.<br />
<br />
=== Build/install CMAKE ===<br />
<br />
Since VTK requires cmake, you need to download cmake from http://www.cmake.org and follow their instructions to install (make sure you have the snos modules loaded). I did the following without any problems. <br />
<br />
<pre><br />
[cmake-2.6.2] % ./build --prefix=${HOME}/.local<br />
[cmake-2.6.2] % make install<br />
</pre><br />
<br />
=== Build/install VTK ===<br />
<br />
Since the service nodes use Suse Linux, building and installing is trivial. From the VTK directory, this is what I did...<br />
<br />
<pre><br />
[VTK] % mkdir build/snos<br />
[VTK] % cd build/snos<br />
[snos] % ccmake ../..<br />
[snos] % make install<br />
</pre><br />
<br />
During the ccmake step, I set prefix to ${HOME}/.local. <br />
<br />
<br />
== Building VTK for Red Storm Compute Nodes ==<br />
<br />
Now for the hard part. Red Storm compute nodes use a the catamount operating system that has no support for <br />
* fork(), exec(), system(), or dynamic process management,<br />
* TCP/IP protocol stacks (MPI is used instead)<br />
* I/O or network events other than MPI<br />
* Dynamic linking and dynamically loaded libraries<br />
* Unix-style interprocess communication (pipes, fifos, etc.)<br />
<br />
Since VTK was designed primarily for Clusters with full OS support, we have to be a little careful. <br />
<br />
=== Load appropriate modules ===<br />
<br />
The standard ''supported'' modules for catamount are the PGI compilers. Gnu compilers are available and work, but they are not really supported. I ''source'' the following script to load the right modules cross compiling for catamount. <br />
<br />
<pre><br />
# Cross-compile modules for catamount<br />
<br />
# Load the appropriate bash environment<br />
. /opt/modules/default/init/bash<br />
<br />
# Unload GNU modules for catamount<br />
module unload PrgEnv-gnu<br />
<br />
# load PGI modules for catamount<br />
module load PrgEnv-pgi<br />
<br />
# Load papi for accurate timings<br />
module load papi<br />
</pre><br />
<br />
Use the same approach described in the [[VTK-Red Storm#Load appropriate modules|previous section]] to load the modules into your shell environment.<br />
<br />
=== Changes to Source ===<br />
<br />
I had to manually remove support for the TIFF library to get VTK to compile. Here is the error that motivated these changes. <br />
<pre>make[2]: *** No rule to make target `../../Utilities/vtktiff/vtkmkg3states', needed by `Utilities/vtktiff/tif_fax3sm.c'</pre> <br />
Rather than fix the error, I just removed all references to the TIFF library in the CMakeList.txt files. If catamount apps need TIFF functionality, someone should fix this problem. Here is the workaround...<br />
<br />
* VTK/CMakeList.txt: <br />
** line 594: remove/comment out VTK_THIRD_PARTY_OPTION(TIFF tiff)<br />
<br />
* VTK/Utilities/CMakeList.txt:<br />
** line 9: remove/comment out VTK_THIRD_PARTY_SUBDIR(TIFF vtktiff)<br />
** line 58: comment out vtk_tiff.h<br />
<br />
* VTK/IO/CMakeList.txt:<br />
** line 360: comment out vtkTIFFReader.cxx<br />
** line 361: comment out vtkTIFFWriter.cxx<br />
<br />
=== Configure VTK ===<br />
<br />
To cross compile VTK for catamount, we have to specify some configuration options in a Toolchain file and remove some VTK features that are not supported in catamount.<br />
<br />
==== Create a Toolchain file ====<br />
<br />
The toolchain file tells cmake how to compile the code. I modified the Paraview toolchain file (thanks Alan) to create the following. <br />
<br />
<pre><br />
# -------- Toolchain-catamount.cmake ---------<br />
# Specify the target system (this allows cross-compiling)<br />
SET(CMAKE_SYSTEM_NAME Catamount)<br />
<br />
# specify the cross compiler<br />
SET(CMAKE_C_COMPILER cc --target=catamount)<br />
SET(CMAKE_CXX_COMPILER CC --target=catamount)<br />
<br />
# set the search path for the environment coming with the compiler<br />
# and a directory where you can install your own compiled software<br />
set(CMAKE_FIND_ROOT_PATH<br />
/opt/xt-pe/default<br />
/opt/xt-mpt/default/mpich2-64/GP2<br />
)<br />
<br />
# adjust the default behaviour of the FIND_XXX() commands:<br />
# search headers and libraries in the target environment, search<br />
# programs in the host environment<br />
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)<br />
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)<br />
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)<br />
<br />
# Parallel configuration<br />
SET(VTK_USE_PARALLEL ON)<br />
SET(VTK_USE_MPI ON)<br />
</pre><br />
<br />
==== Using ccmake ====<br />
<br />
The next step is to run ccmake from the build directory. This will generate all the necessary make files to build VTK. <br />
<br />
<pre><br />
[builddir] % ccmake -DCMAKE_TOOLCHAIN_FILE=Toolchain-catamount.cmake [PATH TO VTK SOURCE]<br />
</pre><br />
<br />
After calling ccmake, hit 'c' to configure and build the cache. Now, go get some coffee. This step took about 10 minutes. When it completes you will get a couple of errors about VTKCompileTools and LARGE_FILE_SUPPORT). I just ignored these... hit 'e'. <br />
<br />
Once in the ccmake gui, hit 'c' again to read the Toolchain file and reconfigure. I ignored the error about not finding the OPENGL_INCLUDE files. <br />
<br />
Now we need to manually remove features that are not supported by catamount, and set various other configuration. I did the following in ccmake's advanced mode:<br />
* VTK_USE_METAIO = OFF (metaio uses unsupported network features)<br />
* VTK_USE_RENDERING = OFF (fixes the OPENGL issue)<br />
* BUILD_EXAMPLES = ON<br />
* CMAKE_INSTALL_PREFIX = [my installation directory]<br />
<br />
After configuring one more time, hit 'c', hit 'g' to generate the files and exit.<br />
<br />
=== Build/Install VTK ===<br />
<br />
At this point, we just need to make and install the libraries.<br />
<pre><br />
[builddir] make;<br />
[builddir] make install;<br />
</pre><br />
<br />
Expect a number of warnings about typecasts, unreachable statements, and such; as well as warnings about unsupported features in catamount. These could turn out to be a problem if one of the vtk libraries uses these features.</div>Bnwyliehttps://public.kitware.com/Wiki/index.php?title=VTK&diff=14145VTK2008-12-15T16:35:49Z<p>Bnwylie: /* Current Projects */</p>
<hr />
<div>http://public.kitware.com/images/logos/vtk-logo2.jpg<br />
<br /><br />
The Visualization ToolKit (VTK) is an open source, freely available software system for 3D computer graphics, image processing, and visualization used by thousands of researchers and developers around the world. VTK consists of a C++ class library, and several interpreted interface layers including Tcl/Tk, Java, and Python. Professional support and products for VTK are provided by Kitware, Inc. ([http://www.kitware.com www.kitware.com]) VTK supports a wide variety of visualization algorithms including scalar, vector, tensor, texture, and volumetric methods; and advanced modeling techniques such as implicit modelling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay triangulation. In addition, dozens of imaging algorithms have been directly integrated to allow the user to mix 2D imaging / 3D graphics algorithms and data.<br />
<br />
==Administrative Topics==<br />
<br />
* Where can I find more [[VTK Additional Information|information about VTK]]?<br />
<br />
* [[VTK 5.2 Release Planning]]<br />
<br />
* Where can I [http://vtk.org/get-software.php download VTK]?<br />
<br />
* Where can I download a tarball of the [http://vtk.org/files/nightly/vtkNightlyDocHtml.tar.gz nightly HTML documentation]?<br />
<br />
* [[VTK Classes|Extending VTK]]<br />
<br />
* [[VTK Coding Standards]]<br />
<br />
* [[VTK cvs commit Guidelines]]<br />
<br />
* [[VTK Scripts|Extending VTK with Scripts]]<br />
<br />
* [[VTK Tools|VTK-Based Tools and Applications]]<br />
<br />
* What are some [[VTK Projects|projects using VTK]]?<br />
<br />
* [[Proposed Changes to VTK | Proposed Changes to VTK]]<br />
<br />
* [[VTK FAQ|Frequently asked questions (FAQ)]]<br />
<br />
* [[VTK OpenGL|Common OpenGL troubles]]<br />
<br />
* [[VTK Related Job Opportunities|VTK Related Job Opportunities]]<br />
<br />
* [[VTK/Writing_VTK_files_using_python | Writing VTK files using python]]<br />
<br />
* [[VTK_XML_Formats | VTK XML Format Details]]<br />
<br />
* [[VTK_Third_Party_Library_Patrol | VTK 3rd Party Library Patrol]]<br />
<br />
== Current Projects ==<br />
* [[VTK/Java Wrapping | VTK Java Wrapping]]<br />
* [[VTK/Composite Data Redesign | Composite Data Redesign]]<br />
* [[VTKWidgets | VTK Widget Redesign]]<br />
* [[VTKShaders | Shaders in VTK]]<br />
* [[VTK/VTKMatlab | VTK with Matlab]]<br />
* [[VTK/Time_Support | VTK Time support]]<br />
* [[VTK/Depth_Peeling | VTK Depth Peeling]]<br />
* [[VTK/Using_JRuby | Using VTK with JRuby]]<br />
* [[VTK/Painters | Painters]]<br />
* [[VTK/mesh quality | Geometric mesh quality]]<br />
* [[VTK/Cray XT3 Compilation| Cray XT3 Compilation]]<br />
<br />
== External Links ==<br />
*[http://www.imtek.uni-freiburg.de/simulation/mathematica/IMSweb/ IMTEK Mathematica Supplement (IMS)], the Open Source IMTEK Mathematica Supplement (IMS) interfaces VTK and generates ParaView batch scripts<br />
*[http://zorayasantos.tripod.com/vtk_csharp_examples], VTK examples in C# (Visual Studio 5.0 and .NET 2.0)<br />
{{VTK/Template/Footer}}</div>Bnwylie