How to use ParaView on HPC Server

A warm welcome to my blog!
I hope this post can be helpful to your research.

A brief introduction

In this post, I will show you the easiest way to visualise your simulation results in ParaView on your Linux-based High Performance Computing (HPC) server. Here, I use my case as an example to showcase the general method. Please note that you still need to modify a bit based on your server environment.

1. Downloading the pre-compiled packages

Pre-compiled packages of ParaView are availabe at this link.
ParaView is really famous for this type of portable package form, which is really handy for a world that has so many different operating systems.

However, if you are really new to ParaView, you will easily be overwhelmed by its various versions. There are even different boudles for the same version number.

There are two reasons why they have to keep it in this way.

Firstly, there are different machine types when running ParaView. You might just use it to do daily rendering and visualising on your laptop using the GUI, or you might not need to have a GUI when you are a pro in Python. So there are packages for the so-called headless machine and the packages for the full boundle. The difference is really just the former does not have the GUI while the latter has. So I really recommend you use the complete boundle with the GUI. You can always practice using the Python codes with a package with GUI.

Secondly, because there are two branches of Python, the Python 2, often called Python; and the Python 3, which does not gurantee a downward compatibility. Since the server I can access has really funny Python 3 environment. I suggest all of you check the version of the default Python on your server by typing this first:

1
$ Python --version

If it returns something like this a version 2.X.X, then choose a ParaView version that works with Python 2. If you are really sure your server has Python 3 as its default, you can choose the version that goes with Python 3. Also, if there are some pre-compiled Python 3 modules on your server, load the latest before using Paraview for Python 3.

Here, I am currenty using ParaView-5.8.1-MPI-Linux-Python2.7-64bit, so I typed:

1
$ wget "https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v5.8&type=binary&os=Linux&downloadFile=ParaView-5.8.1-MPI-Linux-Python2.7-64bit.tar.gz"

Then extract the compressed package by:

1
$ tar xvzf ParaView-5.8.1-MPI-Linux-Python2.7-64bit.tar.gz

I just like to add v when I do tar action, because it looks cool. You don’t need to add v in your command.

Again, if you are really interested in compiling the software yourself on a hpc server environment, you either need to have the super power of sudo, or you need some extreme patience on setting up all the environment and manually compiling all the dependencies. I would never even give it a try.
But I know, there are always the compiling nerds who need to have the source codes and here is the link of ParaView on github.

2. Setting up Xorgs Server

By far, you have completed all the settings on the server side. Now, we need to prepare the X windows system (X11). Let’s talk about the settings for the three mainstream operating systems.

1) Linux

All branches of Linux-based systems use X.Org Server, which is most likely pre-compiled within your system. However, for some reasons, you happened to have messed up your system and deleted the default Xorgs service. No problem, here is how you can get it back.

For Ubuntu:

1
$ sudo apt install x11-apps

For Red hat:

1
2
$ sudo yum install xorg-x11-xauth
$ sudo yum install xterm

For SUSE:

1
2
$ sudo zypper install xorg-x11-xauth
$ sudo zypper install xterm

Once you got the X.Org service installed, you can try connect with your server using ssh -X. Note that the it is a capital X. And if your connection to the server with X11 forwarding succeeds, you should see no error in the login message.

2) MacOS

MacOS uses XQuartz:

Make sure you have installed the Xcode’s command line tool. If you haven’t, check out this link.

Then you just copy and paste this in your Mac terminal:

1
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

And yes, now you have it.

Just remember to start the Xquartz app before doing ssh -X.

3) Windows

Windows uses XMing:

Firstly, install the XMing package using this link

Then, like in MacOS, you need to start your XMing before you connect to your server.

However, many of you, if using Windows, are probably using PuTTy or other SSH clients maybe because you need to use a bastion station to connect to the server, you just need to make sure you enabled the X11 forwarding in the settings of the app before any connections.
For instance, you need to check the “Enable X11 forwarding” and type in the default X11 screen location (normally localhost:0, if not try localhost:1, 2, 3, … until you find it) in PuTTy:

3. Excuting the binaries

Now, we establish a connection with X11 forwarding (Make sure your Xquartz or XMing has started before the connection if you are using MacOS or Windows):

1
$ ssh -X userName@domainName.com

Then, we cd into the ParaView-5.8.1-MPI-Linux-Python2.7-64bit/bin directory.

In the end, we simply excute the binary of ParaView:

1
$ ./paraview-mesa paraview

where you can think of paraview-mesa as a driver that forces the CPU to do the work of GPU.

4. How to run ParaView in parallel on a SLURM-based server

By far, we have figured out how to run ParaView on the server. However, what is the point of running ParaView on a server if it is running in serial? We need the parallel magic to work for us. However, there are too many versions of job submission systems. Currently, I have access to two SLURM-based systems (SONIC server in UCD, and KAY server of ICHEC). Anyway, let’s have a look.

1) With nodes that have no graphic support

Basically, we just need to

2) With nodes that have graphic support

I am still trying with this category. By far, I have not found a good way except for compiling ParaView manually with Qt5. Pre-compiled Qt5, even with correct paths added, will not work. I will update this if I find any easier solution.

How to use ParaView on HPC Server

http://example.com/2022/01/06/paraview-on-server/

Author

Yuxiang Zhang

Posted on

2022-01-06

Updated on

2022-01-30

Licensed under

Comments