Paraview Server Startup and Connection Guide

Using ParaView by Connecting to a Server running on the HPC platform at Mines

ParaView is a visualization open-source software that runs in a server/client relationship scalable and useable across multiple platforms. This is a quick start access guide to starting a server running on Mines HPC platforms and connecting from your MacOS/Linux or Windows machine. Visit ParaView.org for software downloads to get a matching version to the HPC platform, and visit the ParaView Wiki for further resources. This guide details configuration settings for Mines HPC using the following resources as a guide: https://www.paraview.org/Wiki/Setting_up_a_ParaView_Server and https://hpc.llnl.gov/software/visualization-software/paraview/running-paraview-client-server-mode

Step 1: Creating a Job Submit Script and Submit

The following “paraview_server_job.submit” fille is a sample Slurm submit script. Customize the job submit script with the correct modules for either Wendian or Mio, and add your partition or account number as required.
#!/bin/bash
# SLURM submit file for Paraview server filename: paraview_server_job.submit
#SBATCH -ntasks 1
#SBATCH -t 00:30:00
# Set a port for running the paraview server connection
export PV_ACCESSPORT=11111
# Load module for Wendian
module load compilers/devtoolset/7
module load mpi/openmpi/3.1.3-gnu-7.3.1
module load apps/paraview/5.8.1-gnu
# Load module for Mio
#module load PrgEnv/devtoolset-6
#module load PrgEnv/mpi/openmpi/gcc/3.0.0
#module load Apps/paraview/5.8.0-gnu

# For single CPU server job
pvserver  --server-port=$PV_ACCESSPORT 

# For parallel server
# mpirun -np $SLURM_NTASKS pvserver --server-port=$PV_ACCESSPORT
Submit your job to the Slurm scheduler using sbatch.
[joeuser@wendian001 ~]$ sbatch paraview_server_job.submit

Step 2: What node is ParaView running on and setting up your tunnel

Once your job has started the file slurm-JOBID.out will contain the following lines:
Waiting for client...
Connection URL: cs://node135:11111
Accepting connection(s): node135:11111
Or check your queue for the with ‘squeue -u USERNAME’, and look under the heading “NODELIST (REASON)”.
Step 2a: MacOS or Linux using the Terminal
On MacOS start the SSH tunnel in the terminal using a port number on your local machine, such as 5555, to the “Accepting connections(s):” line from your slurm-JOBID.out containing the node and port number (node135:11111 in red above), and using your username and the HPC platform.
ssh -L 5555:node135:11111 janeuser@wendian.mines.edu
Step 2a-c: Windows SSH Tunnel Setup using MobaXterm

Step 2a: Windows SSH Tunnel Setup using MobaXterm

In MobaXterm open Tunneling  under “Tools” -> Network “MobaSSHTunnel (port forwarding)” and start a “New SSH tunnel” or alter a previous one under Settings using the Gears Icon.

Adding a SSH Tunnel

MobaSSHTunnel window

Step 2b: Windows Setup using MobaSSHTunnel

In the upper left select the radial button “Local port forwarding” then starting from the “Local clients” to “My computer with MobaXterm” input box on the left.  Add the port number you wish to use, 5555 for example.  Next, from “My computer with MobaXterm” through the SSH tunnel Firewall to “SSH server”  on the lower right input box. Enter the HPC platform wendian.mines.edu (or mio.mines.edu), your Username, and port “22” used for ssh connections at Mines. Finally, in the upper right from “SSH server” to “Remote server”.  Enter the node host name, in this case it was “node009”, and the port number, from the script variable PV_ACCESSPORT, 11111. Click “Save” and start the Tunnel.

SSH Tunnel Configuration Settings

MobaXterm SSH Tunnel Configuration

Step 2c: Start the SSH Tunnel

Clicking the “Play” button will start the SSH Tunnel connection and you will be prompted to enter your password to initiate the port forwarding. The “Play” button will then be grayed-out as shown here.

Active SSH Tunnel connection

MobaSSHTunnel Windows with an Active Tunnel

ParaView Connection Server Button top row, third from the left

Step 3: Start ParaView and Server Connection Configuration

Open the ParaView Application on your local machine with the same version number as the Server running on the HPC Platform. To configure the connection click the “Connect” button in the top ribbon or go to menu item “File” -> “Connect…”
Select “Add Server” from the “Choose Server Configuration” window.
Add Server button lower third and on the left
Setting to connect to the running Paraview server

Step 4: Adding the Server Configuration

In the “Edit Server Configuration” window give the connection a “Name” such as Wendian_node. Select the “Server Type” as “Client / Server”. The connection “Host” will be to the “localhost” SSH tunnel setup previously, and the “Port” number 5555.  Continue the configuration by clicking “Configure”.
In the next window “Edit Server Launch Configuration” accept the default setting in “Startup Type” as “Manual” and click “Save” to return to the “Choose Server Configuration” window.
Accept default startup as Manual and Save
Highlight the server and click connect in the lower right second from the right

Step 5: Connect to the Selected Server

In the “Choose Server Configuration” window highlight the server you wish to connect to and click “Connect”.

Successful connection from ParaView client to a Remote Server on the HPC

The connected server will now be displayed in the “Pipeline Brower” with the “Name” of the configuration, “Host” and “Port”. Open a data set, such as the tutorial file “can.ex2” and select the Variable to load and click “Apply” in the “Properties” to display the model.
Successful connection showing a tutorial in the display

Closing Paraview

One the connection has been initiated to the Server running using the job submit script the running server will exit and the job will be complete. If you need to continue working, but need another dataset use the “Reset Session” button in the top ribbon or menu item “Edit” -> “Reset Session” to begin again.

Paraview top ribbon on MacOS

Reset Session button