ParaView Client-Server
Contents
Introduction
According to wikipedia: "ParaView is an open-source multiple-platform application for interactive, scientific visualization. It has a client–server architecture to facilitate remote visualization of datasets, and generates level of detail (LOD) models to maintain interactive frame rates for large datasets. It is an application built on top of the Visualization Toolkit (VTK) libraries. ParaView is an application designed for data parallelism on shared-memory or distributed-memory multicomputers and clusters. It can also be run as a single-computer application."
In order to simplify its usage, ParaView can be run in a "client-server" mode where the user runs the client on his/her own machine (GUI) and connects to the server in order to access the data. Sending back all the data is too expensive, so the server does not only provide the data back to the user but also perform some off-screen rendering. In this documentation, we are explaining how to achieve such a setup.
Setup
This setup requires to have paraview installed on a personal computer with a version matching the one available on the Euler:
module spider paraview
At the time of writing, you can download version 5.8.0 or 5.9.1 here.
You will need to download the Euler configuration script available here (right click -> save as -> remove the extension .html or curl https://scicomp.ethz.ch/public/paraview/euler.pvsc -o euler.pvsc
) and load it in ParaView: Connect (see picture) -> Load Servers. If everything works correctly, you will have "Euler" and "Euler for Windows" in the list of servers.
The script requires xterm. On Ubuntu, you can install it with:
sudo apt install xterm
Connecting
Click on the connect button (see Setup for more details), pick the correct server configuration ("Euler" or "Euler for Windows") and confirm with the "Connect button" at the bottom of the windows. You should get the following window:
You will need to set your user name, a port number, update the required number of cores (maximum one node so currently 128) and how much time you want to have the server. For the port number, it is important to have a unique value otherwise the script might fail when creating the port forwarding as someone else is already using it. In order to pick a port, we recommend using the following command on the server:
python3 -c 'import socket; s=socket.socket(); s.bind(("",0)); print(s.getsockname()[1]); s.close()'
For MacOS, you will need to set the path to xterm (e.g. /usr/X11/bin/xterm)
Once the configuration is done, the script will submit a job to the slurm queue and you will need to wait a bit until the job and the server start (about 20s for the server). While waiting for the job to start, you can use the new window to probe the status of the job. Please do not close the terminal as it would kill the ssh tunnel.
Technical Details
The configuration script consists simply in a ssh tunnel and execution of a script on a login node. This script will ensure that the paraview version matches between the client and the server and create and submit a slurm job. This job will first create a ssh tunnel between the compute node and the login node used before in order to match the tunnels.
Troubleshooting
First step
In any case, it is important to check if you have a recent configuration of the server. In order to update it, you will need to redownload the configuration file given in Setup and load it as before.
Error while setting up the server
The most common error is an issue with a port already in used. By looking into the terminal logs (the one opened during the connection not the one used to start paraview), you should be able to verify it. If it is the case, you just need to use another port.