VisIt Guide
VisIt is a free, open-source visualization software for visualizing data defined on two- and three-dimensional structured and unstructured meshes.
This page will guide you through how to install Visit and initialize it on a compute node.
Please note, installing VisIt can take several hours. We recommend you wait to install VisIt until you can ensure you have a secure, stable connection to the HPC for several hours. Alternatively, you can install VisIt in a screen session.
Install Spack
The first step is to install Spack. Spack is a package manager similar to homebrew or chocolatey but made specifically for HPC environments. We have a full page on how to install Spack which you can find here, but I have copied the relevant instructions to this page.
We’ll begin by logging into the HPC. Using the -Y specifies that we want to enable X-forwarding, which is necessary for us to open the VisIt GUI.
ssh -Y netID@hpc2.storrs.hpc.uconn.edu
Once logged in, we will be in our home directory on one of the login nodes. Next, we will clone the spack directory into our home folder.
cd ~
git clone -c feature.manyFiles=true https://github.com/spack/spack.git
To activate spack, we have to set up spack for use in the shell. Below is the command for setting up Spack for use with a bash shell (most common), but if you use csh or fish, the relevant commands can be found on the Spack website here.
. ~/spack/share/spack/setup-env.sh
Great! Spack is installed. Let’s move on to the next step, installing VisIt.
Install VisIt using Spack
Now, that we’ve set up Spack for the command line, we can install VisIt. The VisIt website has full instructions on installing VisIt using spack which you can find here. We have copied and adapted the relevant instructions for use on the HPC.
First, load some modules.
Then, install VisIt specifying that you want to use the GCC11.3 compiler.
And wait. It may take 2-3 hours for VisIt to fully install. Once that is complete, we can set up our ~/.bashrc file to streamline running VisIt.
If the install fails with unexpected token errors, that indicates the current hdf5 version that SPACK tried to install does not support the silo dependency and the version of hdf5 would need to be reverted to an older release. The following command will show how to install an older version of HDF5 through SPACK.
If the install crashes, there is a known problem with the dependencies for Visit if a specific version of a dependency gets updated and causes undefined symbols/references.
The following spack install command was tested and works with specific versions of the dependencies to install Visit through SPACK:
Creating an Alias for VisIt
Using a text editor like Vim or Nano, add the below alias to your ~/.bashrc.
Once properly installed, the above alias will load VisIt. Then you can use the visit
command to call VisIt.
Initializing VisIt on a Compute Node
Since VisIt is too computationally intensive to run on the login nodes, we will run it on a compute node. But first, a brief reminder:
Please DO NOT run VisIt on the login nodes. Instead, run VisIt on a compute node with X-forwarding.
If you are ever in doubt about whether you are on a login node, you can use the hostname
command. If you are on a login node, the output of the hostname
command will say “login4,” “login5,” or “login6.”Anyway, back to the main objective of this subheading, initializing VisIt on a compute node.
First, we will initiate an interactive session. The resources you request here will depend on what you aim to do in VisIt. But for this example, I will show you how to start a simple interactive session with X-forwarding enabled.
This command requests one core on a CPU-only node and has X-forwarding enabled for 6 hours. It also comes with 2 gigabytes of RAM by default. If you need different resources, you can view our guide on SLURM flags here. Once your job is allocated resources, we can load VisIt with our loadvis
alias.
The above alias command will load VisIt. And after that, all we have to do is use the visit
command to start up the VisIt GUI.
This command should open up a window that looks like this.
Tutorials on How to Use VisIt
The VisIt website has lots of tutorials on everything from the basics to making movies and visualizing MRIs. A link to the tutorials can be found here.