Server-Client Rendering¶
Some visualisation applications support a server-client architecture in which the rendering workload runs entirely on the HPC system while only the resulting images are transmitted to a lightweight client on your local machine. This approach scales well to large datasets and makes full use of the available GPU resources, without requiring a full remote desktop session. ParaView is described here as one example of such an application; other tools with similar server-client capabilities can be used in a similar way.
ParaView¶
ParaView is an open-source, multi-platform data analysis and visualisation application that natively supports server-client operation through its pvserver component. The server runs on the cluster, reads and renders the data, and streams only the resulting images to the local ParaView client. No simulation data is transferred over the network.
Matching versions
The ParaView version on your local machine must match the version of pvserver running on the cluster. Load the appropriate module before starting the server:
Two variants are available depending on whether GPU resources are required.
Variant 1: Login Node (no GPU)¶
This variant is suitable for small datasets and quick inspection. The server runs on a login node, which has limited resources and no GPU.
graph LR
A["ParaView Client<br/>User PC"] -- "SSH tunnel<br/>localhost:11111" --> B["ParaView Server<br/>Login Node"]
-
Log in and start
pvserveron the login node: -
Open a second terminal and create an SSH tunnel to the login node:
-
Open the ParaView GUI on your local machine, go to File → Connect, add a server pointing to
localhost:11111, and click Connect.
Login node limitations
Login nodes have limited CPU resources and no GPU. Do not use this variant for large datasets or computationally intensive rendering. See the login node usage policy for details.
Variant 2: Compute Node (with or without GPU)¶
For large datasets and hardware-accelerated rendering, run pvserver on an allocated compute node.
graph LR
A["ParaView Client<br/>User PC"] -- "SSH tunnel<br/>localhost:11111" --> B["Login Node<br/>(proxy)"]
B -- "port forward<br/>node:11111" --> C["ParaView Server<br/>Compute Node"]
-
Log in, allocate a compute node, and start
pvserver:ssh user@hk2-x86.scc.kit.edu salloc --partition=<partition> --nodes=1 --gres=gpu:1 --time=<walltime> module load ParaView pvserver --server-port=11111Note the hostname of the allocated compute node (e.g.
hk2n001). -
Open a second terminal and create an SSH tunnel through the login node to the compute node:
-
Open the ParaView GUI on your local machine, go to File → Connect, add a server pointing to
localhost:11111, and click Connect.
Batch rendering¶
ParaView can also be used without a graphical interface to generate image sequences or animations as part of a batch job. This is useful for long-running rendering tasks that do not require an interactive session.
First, create and save a visualisation pipeline in the ParaView GUI: File → Save State… (e.g. state.pvsm).
Then write a Python script (e.g. render.py) that loads the state and saves the animation:
#!/usr/bin/env python
from paraview.simple import *
LoadState("state.pvsm")
myview = GetActiveView()
SaveAnimation("frame.png", myview,
SuffixFormat=".%04d",
CompressionLevel=0,
FrameRate=1)
Submit the rendering as a batch job:
#!/bin/bash
#SBATCH --partition=<partition>
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=<walltime>
module purge
module load ParaView
xvfb-run -a -s "-screen 0 3840x2160x24" pvbatch render.py
xvfb-run provides a virtual framebuffer so that ParaView can render without a physical display or GPU.