ParaView is a visualization software designed with the need of large data sets in mind. It is able to run on multiple computers using MPI to handle the largest data sets.
What follows is a tutorial to compile ParaView from sources on a Unix computer.
- CMake, version 2.0.6 or newer
- CVS client to get the sources
- C++ compiler such as g++
- MPICH (or other MPI implementation) if parallel ParaView is desired
Getting the sources
We are interested in the very new phasta Reader developped by Kitware, which is (at least for the time being) only available in the development version of ParaView, which means that we need to get the sources from CVS. Replace /space with any directory that has 1GB of available space.
$ cd /space $ cvs -d :pserver:email@example.com:/cvsroot/ParaView login Logging in to :pserver:firstname.lastname@example.org:2401/cvsroot/ParaView CVS password: <Press ENTER> $ cvs -d :pserver:email@example.com:/cvsroot/ParaView co -D "2006-02-13 16:15" ParaView output truncated
Compilation - Serial
The recommended way to build ParaView is out of source, meaning that cmake, make etc are not run in the ParaView directory, but in a separate, empty one. This makes it possible to build ParaView for several architectures without collision.
To make the paraview binary, do:
$ mkdir obj-serial $ cd obj-serial $ ccmake ../ParaView press c to configure press c again to configure press g to generate and quit output truncated $ make && make install output truncated
The compilation takes a while. On a 2GHz Pentium 4 running Red Hat Linux 4, it takes about 90 minutes. When it is complete, you have the program ready to use in obj-serial/bin/paraview.
You can preset the values of the variables defined by ccmake on the command line. Version 3.2.1 is built using the above method replacing the call to ccmake with the following:
ccmake -DQT_QMAKE_EXECUTABLE=/usr/local/Trolltech/Qt-4.2.3/bin/qmake \ -DCMAKE_INSTALL_PREFIX=/usr/local/paraview/3.2.1/serial -DVTK_USE_BOOST=ON \ -DBUILD_SHARED_LIBS=ON -DPARAVIEW_ENABLE_PYTHON=ON -DBUILD_DOCUMENTATION=ON\ -DBUILD_EXAMPLES=ON ../ParaView3.2.1/
On 64bit machines it seems to be necessary to disable boost support and build with:
ccmake -DQT_QMAKE_EXECUTABLE=/usr/local/Trolltech/Qt-4.2.3/bin/qmake \ -DCMAKE_INSTALL_PREFIX=/usr/local/paraview/3.2.1/serial -DVTK_USE_BOOST=OFF \ -DBUILD_SHARED_LIBS=ON -DPARAVIEW_ENABLE_PYTHON=ON -DBUILD_DOCUMENTATION=ON-DBUILD_EXAMPLES=ON \ ../ParaView3.2.1/
Compilation - Parallel
Compiling parallel ParaView is very similar to the serial case - except that you need to tell cmake where to find the MPI implementation. The following guide assumes a standard SCOREC installation with MPICH in /usr/local/mpich/latest
To make the paraview binary, do:
$ mkdir obj-parallel $ cd obj-parallel $ ccmake -DVTK_USE_MPI:BOOL=ON \ > -DMPI_INCLUDE_PATH:PATH=/usr/local/mpich/latest/ch_p4/include \ > -DMPI_LIBRARY:FILEPATH="-L/usr/local/mpich/latest/ch_p4/lib -lmpich" \ > -DVTK_MPIRUN_EXE:FILEPATH=/usr/local/mpich/latest/ch_p4/bin/mpirun \ > ../ParaView press c to configure press c again to configure press g to generate and quit output truncated $ make && make install output truncated
When the compilation is complete, the program is ready to use in obj-parallel/bin/paraview.
paraview 3.2.1 is being built with:
ccmake -DQT_QMAKE_EXECUTABLE=/usr/local/Trolltech/Qt-4.2.3/bin/qmake \ -DCMAKE_INSTALL_PREFIX=/usr/local/paraview/3.2.1/parallel -DVTK_USE_BOOST=ON \ -DBUILD_SHARED_LIBS=ON -DPARAVIEW_ENABLE_PYTHON=ON -DBUILD_DOCUMENTATION=ON \ -DBUILD_EXAMPLES=ON -DVTK_USE_MPI:BOOL=ON \ -DMPI_INCLUDE_PATH:PATH=/usr/local/mpich/latest/ch_p4/include \ -DMPI_LIBRARY:FILEPATH="-L/usr/local/mpich/latest/ch_p4/lib -lmpich" \ -DVTK_MPIRUN_EXE:FILEPATH=/usr/local/mpich/latest/ch_p4/bin/mpirun \ -DPARAVIEW_USE_MPI=ON ../ParaView3.2.1/
December 08 CVS Builds
First Do a CVS checkout as described on the paraview website.
Set any optimization options using environment variables
export CFLAGS="-O3" export CCFLAGS="-O3" export FFLAGS="-O3"
If building on an NFS share (your home directory for example) Make a file called "cp" containing:
#!/bin/bash /bin/cp $@ true
and put it in the beginning of your path. For example, if you put it in ~/bin
Use the new cmake:
Get the source:
mkdir paraview cvs -d :pserver:firstname.lastname@example.org:/cvsroot/ParaView3 login [enter] cvs -d :pserver:email@example.com:/cvsroot/ParaView3 co ParaView3
Then configure as described above with (all one line)
ccmake -D CMAKE_PREFIX_PATH="/usr/local/boost/latest;/usr/local/Trolltech/4.4.3;/usr/local/mpich/1.2.7p1-share;/" -DPARAVIEW_USE_MPI=ON -DBUILD_SHARED_LIBS=ON -DPARAVIEW_ENABLE_PYTHON=ON -DMPI_LIBRARY="/usr/local/mpich/1.2.7p1-share/lib/libpmpich.a" -DMPI_EXTRA_LIBRARY="/usr/local/mpich/1.2.7p1-share/lib/libtvmpich.so;/usr/local/mpich/1.2.7p1-share/lib/libTraceInput.so;/usr/local/mpich/1.2.7p1-share/lib/shared/libfmpich.so;/usr/local/mpich/1.2.7p1-share/lib/libpmpich++.a;/usr/local/mpich/1.2.7p1-share/lib/libmpe.a;/usr/local/mpich/1.2.7p1-share/lib/liblmpe.a;/usr/local/mpich/1.2.7p1-share/lib/libfmpich.a;/usr/local/mpich/1.2.7p1-share/lib/libmpich.a;/usr/local/mpich/1.2.7p1-share/lib/libmpichfarg.a;/usr/local/mpich/1.2.7p1-share/lib/libmpichfsup.a;/usr/local/mpich/1.2.7p1-share/lib/libtmpe.a" -DMPI_INCLUDE_PATH="/usr/local/mpich/1.2.7p1-share/include" ../ParaView3
You'll probably want to set the CMAKE_INSTALL_PREFIX, either in the cmake GUI or on the command line, by appending -DCMAKE_INSTALL_PREFIX="/where/I/want/to/keep/paraview" to the above command.
If you get a warning about QT being the wrong version, just press e to ignore it. Your build will still be fine.
If everything went well build with
If something goes wrong, try with
to get some error messages
Then you can
Before you can run paraview you'll need to
where $CMAKE_INSTALL_PREFIX is the value you gave when configuring paraview