Building ParaView 5.8.1 and Shoreline Plug-ins on viz003

From PHASTA Wiki
Revision as of 17:47, 8 July 2021 by Jeffhadley (talk | contribs)
Jump to: navigation, search

You've probably noticed by now that the version of ParaView most used by the group is v5.4.1, which you obtain by "soft adding" into your viz003 environment. While being able to do most of all the post-processing tasks required, this version of ParaView is getting to be relatively old. A previous PhD student, Dr. Corey Wetterer-Nelson, created a novel ParaView plug-in package named Shoreline, which permits insitu modification of a finite element mesh in ParaView, while a PHASTA simulation is on-going. The only caveat is that these plug-ins require Paraview 5.8.1 or newer in order to be built and function properly. The vast majority of the instructions to build Paraview provided on Kitware's "building paraview" wiki page do not apply to our viz003 system due to required user permissions, compiler versions, storage location of several dependencies, etc... thus the need for this wiki page.

This page will walk you through the steps required to successfully build Paraview 5.8.1 and the Shoreline plug-ins, as well as all their dependencies on viz003:

Obtaining and Building Paraview

  • Obtaining and Building libIGL
  • Obtaining and Building Eigen
  • Obtaining and Building Shoreline Plug-ins
  • Using Shoreline Plug-ins


Obtaining and Building Paraview

First, let's obtain a fresh copy of Paraview's git repository:

git clone https://github.com/Kitware/ParaView.git

Place this repository in a location that makes sense to you. For example, I cloned it in the directory ~/GitHub-Builds/Paraview-Builds/test_v5.8.1

Next, while in the top level of your newly cloned Paraview directory, checkout the version 5.8.1 branch:

git checkout v5.8.1

Once v5.8.1 is checked out, we need to update all of it's submodules (while still in the top level directory):

git submodule update --init --recursive

Now that you have downloaded the repository for Paraview v5.8.1, you are ready to begin building it. First, make and enter a fresh (does not contain any files or sub directories) build directory in the same folder where you cloned the repository (you will need to cd .. out of the cloned repository):

mkdir build_paraview
cd build_paraview

Now, set your environment so that you can use the software needed to build ParaView:

soft add +cmake-3.16.0
soft add +gcc-8.2.0  
soft add +openmpi-gnu-1.10.6-gnu49-thread
Note: You can also use gcc 9.2.0 or 10.2.0 

The only tricky thing about building ParaView on the viz nodes is that it depends on a newer version of Qt, which cannot be directly soft added to your environment like the other software found when running the command softenv. However, a newer version of Qt (5.11.0) does exist on the viz nodes, you just need to manually point to it. To do so, run these two commands:

export PATH="/usr/local/qt/5.11.0/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/qt/5.11.0/lib:$LD_LIBRARY_PATH"

Now, you are ready for cmake to do the heavy lifting for you. While in your build directory, point the ccmake command to where the source files for paraview are located. In our case:

ccmake ../ParaView/

Once you have the GUI open, hit "c" to configure. It will take a few moments for cmake to configure the files. Eventually, you will get to an interface where you can toggle build options. If you are building a vanilla version of Paraview 5.8.1, none of these build options need to be changed right now.


Else, if you are building 5.8.1 to make use of the Shoreline Plug-ins, you need to ensure that these following compiler flags are turned on and/or set to before you generate:

CMAKE_BUILD_TYPE = Release
Paraview_Build_Edition = Canonical
Paraview_Build_Shared_Libs = ON
Paraview_Use_Python = ON
Paraview_Use_MPI = ON
Paraview_Use_VTKM = ON
Paraview_Use_Qt = ON

The remainder of the available flags will automatically be set by cmake and can be left as they are.


Continue the configuring process by hitting "c" until the generate option "g" appears (Make sure the compiler flags are set as above if you are building for the Shoreline Plug-ins). Hit "g" to generate. This will finish configuring the make files and exit the cmake GUI. You are now ready to build ParaView!

Building ParaView can take anywhere from 15 minutes to two hours, depending on how many other people are using the viz nodes. You can run top to see how many other processes are currently running. If others in the group are running large jobs, you may want to change to the other viz node, or just wait until later when the resources are more free. In any case, to build Paraview run:

make -jn

where n is the number of processors you want to use (n=8, for example). If you want to build as fast as possible, you can use all the processors by omitting the "n" altogether, but be sure that nobody else is running important jobs if you do.

To run ParaView, you need to enter vglrun and then the full path to the Paraview executable. For example, based on our previous directory structures, my command would look like:

vglrun /users/conrad54418/GitHub-Builds/Paraview-Builds/test_v5.8.1/build_paraview/bin/paraview

You should now be able to use ParaView 5.8.l!

Note: When you build ParaView from scratch on the viz nodes, you may get weird error about "QXcbShmImage"; as far as we can tell, these errors do not affect the performance, they are just an annoyance. We have reached out to the ParaView dev team and they told us to just put the error window in the bottom left corner and make it as small as possible.. it is what it is!

If you are building Paraview to use the Shoreline Plug-ins, you will need to follow the next steps below to get the Plug-in's up and running.