Building ParaView 5.8.1 and Shoreline Plug-ins on viz003

From PHASTA Wiki
Revision as of 14:07, 8 July 2021 by Conrad54418 (talk | contribs) (Building Paraview)
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 Paraview and Shoreline
  • Building Paraview
  • Obtaining and Building libIGL
  • Obtaining and Building Eigen
  • Building Shoreline Plug-ins
  • Using Shoreline Plug-ins


Obtaining Paraview and Shoreline

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 this source directory where I create all of my software builds ~/Builds/src/

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

Building Paraview

Now that you have downloaded the repository for Paraview v5.8.1, you are ready to begin building it. First, make and enter a build directory in the same folder where you cloned the 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

The 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. However, a version of qt 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:

ccmake ../ParaView/

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. None of these need to be changed right now, but you can explore to get an idea of all the options ParaView has to offer. Continue the configuring process by hitting "c" and then the generate option "g" when it appears. This will finish configuring the 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.