ParaView: Difference between revisions

From Alliance Doc
Jump to navigation Jump to search
No edit summary
(Note about disabling the VirtualGL faker LD_PRELOAD to run the newest paraview)
 
(66 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<languages />
<languages />
[[Category:Software]]
__FORCETOC__
<translate>
<translate>
= Client-server visualization = <!--T:1-->
= Client-server visualization = <!--T:1-->


<!--T:2-->
<!--T:2-->
'''NOTE 1:''' An important setting in ParaView's preferences is ''Render View -> Remote/Parallel Rendering Options -> Remote Render Threshold.'' If you set it to default (20MB) or similar, small rendering will be done on your laptop's GPU, the rotation with a mouse will be fast, but anything modestly intensive (under 20MB) will be shipped to your laptop and (depending on your connection) visualization might be slow. If you set it to 0MB, all rendering will be remote including rotation, so you will really be using the cluster resources for everything, which is good for large data processing but not so good for interactivity. Experiment with the threshold to find a suitable value.
'''NOTE 1:''' An important setting in ParaView's preferences is ''Render View -> Remote/Parallel Rendering Options -> Remote Render Threshold.'' If you set it to default (20MB) or similar, small rendering will be done on your computer's GPU, the rotation with a mouse will be fast, but anything modestly intensive (under 20MB) will be shipped to your computer and (depending on your connection) visualization might be slow. If you set it to 0MB, all rendering will be remote including rotation, so you will really be using the cluster resources for everything, which is good for large data processing but not so good for interactivity. Experiment with the threshold to find a suitable value.


<!--T:3-->
<!--T:3-->
'''NOTE 2:''' ParaView requires the same major version on the local client and the remote host; this prevents incompatibility that typically shows as a failed handshake when establishing the client-server connection.
'''NOTE 2:''' ParaView requires the same major version on the local client and the remote host; this prevents incompatibility that typically shows as a failed handshake when establishing the client-server connection. For example, to use ParaView server version 5.10.0 on the cluster, you need client version 5.10.x on your computer.


<!--T:4-->
<!--T:4-->
Line 15: Line 17:
<tabs>
<tabs>


<!--T:6-->
<tab name="Cedar,Graham,Béluga,Narval">
<tab name="Cedar and Graham">
== Client-server visualization on Cedar, Graham, Béluga and Narval == <!--T:6-->


 
<!--T:91-->
 
On [[Cedar]], [[Graham]], [[Béluga/en|Béluga]] and [[Narval/en|Narval]], you can do client-server rendering on both CPUs (in software) and GPUs (hardware acceleration). Due to additional complications with GPU rendering, we strongly recommend starting with CPU-only visualization, allocating as many cores as necessary to your rendering. The easiest way to estimate the number of necessary cores is to look at the amount of memory that you think you will need for your rendering and divide it by ~3.5 GB/core. For example, a 40GB dataset (that you load into memory at once, e.g. a single timestep) would require at least 12 cores just to hold the data. Since software rendering is CPU-intensive, we do not recommend allocating more than 4GB/core. In addition, it is important to allocate some memory for filters and data processing (e.g. a structured to unstructured dataset conversion will increase your memory footprint by ~3X); depending on your workflow, you may want to start this rendering with 32 cores or 64 cores. If your ParaView server gets killed when processing these data, you will need to increase the number of cores.
On Cedar and Graham, you can do client-server rendering on both CPUs (in software) and GPUs (hardware acceleration). Due to additional complications with GPU rendering, we strongly recommend starting with CPU-only visualization, allocating as many cores as necessary to your rendering. The easiest way to estimate the number of necessary cores is to look at the amount of memory that you think you will need for your rendering and divide it by ~3.5 GB/core. For example, a 40GB dataset (that you load into memory at once, e.g. a single timestep) would require at least 12 cores just to hold the data. Since software rendering is CPU-intensive, we do not recommend allocating more than 4GB/core. In addition, it is important to allocate some memory for filters and data processing (e.g. a structured to unstructured dataset conversion will increase your memory footprint by ~3X); depending on your workflow, you may want to start this rendering with 32 cores or 64 cores. If your ParaView server gets killed when processing these data, you will need to increase the number of cores.


=== CPU-based visualization === <!--T:10-->
=== CPU-based visualization === <!--T:10-->
Line 28: Line 29:


<!--T:12-->
<!--T:12-->
1. First, install on your laptop the same ParaView version as the one available on the cluster you will be using; log into Cedar or Graham and start a serial CPU interactive job.
1. First, install on your computer the same ParaView version as the one available on the cluster you will be using; log into Cedar or Graham and start a serial CPU interactive job.


<!--T:13-->
<!--T:13-->
{{Command|salloc --time{{=}}1:00:0 --ntasks{{=}}1 --account{{=}}def-someprof}}
{{Command|salloc --time{{=}}1:00:0 --ntasks{{=}}1 --mem-per-cpu{{=}}3600 --account{{=}}def-someprof}}


<!--T:14-->
<!--T:14-->
Line 40: Line 41:


<!--T:16-->
<!--T:16-->
{{Command|module load paraview-offscreen/5.5.2}}
{{Command|module load paraview/5.11.2  # in StdEnv/2023 (now default)}}
{{Command|pvserver --mesa-swr-avx2 --force-offscreen-rendering
or
{{Command|module load gcc/9.3.0 paraview-offscreen/5.11.0  # prior to StdEnv/2023}}
and then
{{Command|pvserver --force-offscreen-rendering
|result=
|result=
Waiting for client...
Waiting for client...
Line 49: Line 53:


<!--T:17-->
<!--T:17-->
:The <code>--mesa-swr-avx2</code> flag is important for much faster software rendering with the OpenSWR library. Wait for the server to be ready to accept client connection.
:Wait for the server to be ready to accept client connection.


<!--T:18-->
<!--T:18-->
3. Make a note of the node (in this case cdr774) and the port (usually 11111) and in another terminal on your laptop (on Mac/Linux; in Windows use a terminal emulator) link the port 11111 on your laptop and the same port on the compute node (make sure to use the correct compute node).
3. Make a note of the node (in this case cdr774) and the port (usually 11111) and in another terminal on your computer (on Mac/Linux; in Windows use a terminal emulator) link the port 11111 on your computer and the same port on the compute node (make sure to use the correct compute node).


<!--T:19-->
<!--T:19-->
{{Command|prompt=[name@laptop $]|ssh <username>@cedar.computecanada.ca -L 11111:cdr774:11111}}
{{Command|prompt=[name@computer $]|ssh <username>@cedar.computecanada.ca -L 11111:cdr774:11111}}


<!--T:20-->
<!--T:20-->
4. Start ParaView on your laptop, go to ''File -> Connect'' (or click on the green ''Connect'' button in the toolbar) and click on ''Add Server.'' You will need to point ParaView to your local port 11111, so you can do something like name = cedar, server type = Client/Server, host = localhost, port = 11111; click ''Configure'', select ''Manual'' and click ''Save.''
4. Start ParaView on your computer, go to ''File -> Connect'' (or click on the green ''Connect'' button in the toolbar) and click on ''Add Server.'' You will need to point ParaView to your local port 11111, so you can do something like name = cedar, server type = Client/Server, host = localhost, port = 11111; click ''Configure'', select ''Manual'' and click ''Save.''
:Once the remote is added to the configuration, simply select the server from the list and click on ''Connect.'' The first terminal window that read ''Accepting connection'' will now read ''Client connected.''
:Once the remote is added to the configuration, simply select the server from the list and click on ''Connect.'' The first terminal window that read ''Accepting connection'' will now read ''Client connected.''


Line 65: Line 69:


<!--T:22-->
<!--T:22-->
'''NOTE:''' An important setting in ParaView's preferences is ''Render View -> Remote/Parallel Rendering Options -> Remote Render Threshold.'' If you set it to default (20MB) or similar, small rendering will be done on your laptop's GPU, the rotation with a mouse will be fast, but anything modestly intensive (under 20MB) will be shipped to your laptop and (depending on your connection) visualization might be slow. If you set it to 0MB, all rendering will be remote including rotation, so you will really be using the cluster resources for everything, which is good for large data processing but not so good for interactivity. Experiment with the threshold to find a suitable value.
'''NOTE:''' An important setting in ParaView's preferences is ''Render View -> Remote/Parallel Rendering Options -> Remote Render Threshold.'' If you set it to default (20MB) or similar, small rendering will be done on your computer's GPU, the rotation with a mouse will be fast, but anything modestly intensive (under 20MB) will be shipped to your computer and (depending on your connection) visualization might be slow. If you set it to 0MB, all rendering will be remote including rotation, so you will really be using the cluster resources for everything, which is good for large data processing but not so good for interactivity. Experiment with the threshold to find a suitable value.
<br>
<br>
If you want to do parallel rendering on multiple CPUs, start a parallel job; don't forget to specify the correct maximum walltime limit.
If you want to do parallel rendering on multiple CPUs, start a parallel job; don't forget to specify the correct maximum walltime limit.


<!--T:24-->
<!--T:24-->
{{Command|salloc --time{{=}}0:30:0 --ntasks{{=}}8 --account{{=}}def-someprof}}
{{Command|salloc --time{{=}}0:30:0 --ntasks{{=}}8 --mem-per-cpu{{=}}3600 --account{{=}}def-someprof}}


<!--T:25-->
<!--T:25-->
Line 77: Line 81:
<!--T:26-->
<!--T:26-->
{{Commands
{{Commands
|module load paraview-offscreen/5.5.2
|module load gcc/9.3.0 paraview-offscreen/5.11.0
|srun pvserver --mesa --force-offscreen-rendering
|srun pvserver --force-offscreen-rendering
}}
}}
<!--T:27-->
The <code>--mesa-swr-avx2</code> flag does not seem to have any effect when in parallel so we replaced it with the more generic <code>--mesa</code> to (hopefully) enable automatic detection of the best software rendering option.


<!--T:28-->
<!--T:28-->
Line 88: Line 89:


=== GPU-based ParaView visualization === <!--T:29-->
=== GPU-based ParaView visualization === <!--T:29-->
<span style="color:red">There is an issue with GPU-based ParaView on Graham; please use CPU-based ParaView until further notice.</span>


<!--T:30-->
<!--T:30-->
Line 94: Line 94:


<!--T:31-->
<!--T:31-->
1. First, install on your laptop the same version as the one available on the cluster you will be using; log into Cedar or Graham and start a serial GPU interactive job.
1. First, install on your computer the same version as the one available on the cluster you will be using; log into Cedar or Graham and start a serial GPU interactive job.


<!--T:32-->
<!--T:32-->
{{Command|salloc --time{{=}}1:00:0 --ntasks{{=}}1 --gres{{=}}gpu:1 --account{{=}}def-someprof}}
{{Command|salloc --time{{=}}1:00:0 --ntasks{{=}}1 --mem-per-cpu{{=}}3600 --gres{{=}}gpu:1 --account{{=}}def-someprof}}


<!--T:33-->
<!--T:33-->
Line 105: Line 105:
<!--T:34-->
<!--T:34-->
{{Commands
{{Commands
|module load paraview-offscreen-gpu/5.4.0
|module load gcc/9.3.0 paraview-offscreen-gpu/5.11.0
|unset DISPLAY
|unset DISPLAY
}}
}}
Line 119: Line 119:


<!--T:36-->
<!--T:36-->
3. Make a note of the node (in this case ''cdr347'') and the port (usually 11111) and in another terminal on your laptop (on Mac/Linux; in Windows use a terminal emulator), link the port 11111 on your laptop and the same port on the compute node (make sure to use the correct compute node).
3. Make a note of the node (in this case ''cdr347'') and the port (usually 11111) and in another terminal on your computer (on Mac/Linux; in Windows use a terminal emulator), link the port 11111 on your computer and the same port on the compute node (make sure to use the correct compute node).


<!--T:37-->
<!--T:37-->
{{Command|prompt=[name@laptop $]|ssh <username>@cedar.computecanada.ca -L 11111:cdr347:11111}}
{{Command|prompt=[name@computer $]|ssh <username>@cedar.computecanada.ca -L 11111:cdr347:11111}}


<!--T:38-->
<!--T:38-->
4. Start ParaView on your laptop, go to ''File -> Connect'' (or click on the green ''Connect'' button on the toolbar) and click on ''Add Server.'' You will need to point ParaView to your local port 11111, so you can do something like name = cedar, server type = Client/Server, host = localhost, port = 11111; click on ''Configure'', select ''Manual'' and click on ''Save.''
4. Start ParaView on your computer, go to ''File -> Connect'' (or click on the green ''Connect'' button on the toolbar) and click on ''Add Server.'' You will need to point ParaView to your local port 11111, so you can do something like name = cedar, server type = Client/Server, host = localhost, port = 11111; click on ''Configure'', select ''Manual'' and click on ''Save.''
:Once the remote is added to the configuration, simply select the server from the list and click on ''Connect.'' The first terminal window that read ''Accepting connection'' will now read ''Client connected.''
:Once the remote is added to the configuration, simply select the server from the list and click on ''Connect.'' The first terminal window that read ''Accepting connection'' will now read ''Client connected.''


Line 131: Line 131:
5. Open a file in ParaView (it will point you to the remote filesystem) and visualize it as usual.
5. Open a file in ParaView (it will point you to the remote filesystem) and visualize it as usual.


<!--T:40-->
=== Rendering with NVIDIA's IndeX plugin === <!--T:100-->
 
<!--T:101-->
NVIDIA IndeX is a 3D volumetric interactive renderer on NVIDIA GPUs enabled as a ParaView server plugin. To use IndeX, connect via client-server to ParaView 5.10 (provided by paraview-offscreen-gpu/5.10.0) running inside an interactive GPU job as described above. Then in your client go to Tools | Manage Plugins and enable the <code>pvNVIDIAIndeX</code> plugin first locally and then remotely. Loading it locally might not be necessary on all platforms, but we saw a bug in several configurations where ParaView server would crash if the local plugin was not selected first. After enabling the plugin, load your dataset and in the Representation drop-down menu select NVIDIA Index.
 
<!--T:102-->
Our license lets you run NVIDIA IndeX in parallel on multiple GPUs, however parallel speedup is far from perfect. Before doing any production rendering with IndeX on multiple GPUs, please test your parallel scaling and verify that using more than one GPU leads to better performance for your dataset, otherwise use a single GPU.
 
</tab>
</tab>
<tab name="Niagara">
<tab name="Niagara">
== Client-server visualization on Niagara== <!--T:40-->


<!--T:42-->
<!--T:42-->
Line 161: Line 169:


<!--T:49-->
<!--T:49-->
{{Commands
{{Command
|module load paraview
|module load paraview
|pvserver --mesa-swr-ax2
|pvserver --mesa-swr-ax2
Line 172: Line 180:
<li> Now, you have to wait a few seconds for the server to be ready to accept client connections.</li>
<li> Now, you have to wait a few seconds for the server to be ready to accept client connections.</li>


  <!--T:52-->
<!--T:52-->
Waiting for client...
{{Command|prompt=|Waiting for client...
  Connection URL: cs://niaXYZW.scinet.local:11111
Connection URL: cs://niaXYZW.scinet.local:11111
  Accepting connection(s): niaXYZW.scinet.local:11111
Accepting connection(s): niaXYZW.scinet.local:11111
}}


<!--T:53-->
<!--T:53-->
Line 181: Line 190:


<!--T:54-->
<!--T:54-->
{{Command|prompt=[name@laptop $]|ssh YOURusername@niagara.scinet.utoronto.ca -L11111:niaXYZW:11111 -N}}
{{Command|prompt=[name@computer $]|ssh YOURusername@niagara.scinet.utoronto.ca -L11111:niaXYZW:11111 -N}}


<!--T:55-->
<!--T:55-->
Line 220: Line 229:
:where you need to replace <code>N</code> with the number of nodes and <code>N*40</code> with the single number (the product of multiplication).
:where you need to replace <code>N</code> with the number of nodes and <code>N*40</code> with the single number (the product of multiplication).


<!--T:64-->
</tab>
</tab>
<tab name="Cloud VM">
<tab name="Cloud VM">
== Client-server visualization on a cloud == <!--T:64-->


=== Prerequisites === <!--T:66-->
=== Prerequisites === <!--T:66-->
Line 238: Line 247:


<!--T:69-->
<!--T:69-->
If you have your own private-public SSH key pair (as opposed to the cloud key), you may want to copy the public key to the VM to simplify logins, by issuing the following command on your laptop
If you have your own private-public SSH key pair (as opposed to the cloud key), you may want to copy the public key to the VM to simplify logins, by issuing the following command on your computer


<!--T:70-->
<!--T:70-->
{{Command|prompt=[name@laptop $]|cat ~/.ssh/id_rsa.pub {{!}} ssh -i ~/.ssh/cloudwestkey.pem centos@vm.ip.address 'cat >>.ssh/authorized_keys'}}
{{Command|prompt=[name@computer $]|cat ~/.ssh/id_rsa.pub {{!}} ssh -i ~/.ssh/cloudwestkey.pem centos@vm.ip.address 'cat >>.ssh/authorized_keys'}}


=== Compiling with OSMesa === <!--T:71-->
=== Compiling with OSMesa === <!--T:71-->
Line 262: Line 271:
<!--T:75-->
<!--T:75-->
Next, compile <code>llvm</code>:
Next, compile <code>llvm</code>:
 
<source lang="console">
<!--T:76-->
cd
cd
  wget http://releases.llvm.org/3.9.1/llvm-3.9.1.src.tar.xz
  wget http://releases.llvm.org/3.9.1/llvm-3.9.1.src.tar.xz
Line 277: Line 285:
  make
  make
  sudo make install
  sudo make install
</source>


<!--T:77-->
<!--T:77-->
Next, compile Mesa with OSMesa:
Next, compile Mesa with OSMesa:
 
<source lang="console">
<!--T:78-->
cd
cd
  wget ftp://ftp.freedesktop.org/pub/mesa/mesa-17.0.0.tar.gz
  wget ftp://ftp.freedesktop.org/pub/mesa/mesa-17.0.0.tar.gz
Line 298: Line 306:
  make
  make
  sudo make install
  sudo make install
</source>


<!--T:79-->
<!--T:79-->
Next, compile the ParaView server:
Next, compile the ParaView server:
 
<source lang="console">
<!--T:80-->
cd
cd
  wget http://www.paraview.org/files/v5.2/ParaView-v5.2.0.tar.gz
  wget http://www.paraview.org/files/v5.2/ParaView-v5.2.0.tar.gz
Line 319: Line 327:
  make
  make
  make install
  make install
</source>


=== Client-server mode === <!--T:81-->
=== Client-server mode === <!--T:81-->  


<!--T:82-->
<!--T:82-->
You are now ready to start ParaView server on the VM with SWR rendering:
You are now ready to start ParaView server on the VM with SWR rendering:
 
<source lang="console">
<!--T:83-->
./paraview/bin/pvserver --mesa-swr-avx2
./paraview/bin/pvserver --mesa-swr-avx2
</source>


<!--T:84-->
<!--T:97-->
Back on your laptop, organize an SSH tunnel from the local port 11111 to the VM's port 11111:
Back on your computer, organize an SSH tunnel from the local port 11111 to the VM's port 11111:
 
<source lang="console">
<!--T:85-->
ssh centos@vm.ip.address -L 11111:localhost:11111
ssh centos@vm.ip.address -L 11111:localhost:11111
</source>


<!--T:86-->
<!--T:86-->
Finally, start the ParaView client on your laptop and connect to localhost:11111. If successful, you should be able to open files on the remote VM. During rendering in the console you should see the message ''SWR detected AVX2.''
Finally, start the ParaView client on your computer and connect to localhost:11111. If successful, you should be able to open files on the remote VM. During rendering in the console you should see the message ''SWR detected AVX2.''
 
<!--T:87-->
</tab>
</tab>
</tabs>
</tabs>
= Remote VNC desktop on Graham VDI nodes = <!--T:90-->
<!--T:92-->
For small interactive visualizations requiring up to 256GB memory and 16 cores, you can use the Graham VDI nodes. Unlike client-server visualizations you will be using VNC remote desktop. Here are the basic steps:
<!--T:93-->
1. Connect to gra-vdi as described [https://docs.computecanada.ca/wiki/VNC#VDI_Nodes TigerVNC] then open a terminal window and run:
module load CcEnv
<!--T:94-->
2. Show the available paraview module versions:
module spider paraview
<!--T:95-->
3. Show how to load a specific version such as:
module spider paraview/5.11.0
<!--T:96-->
4. Load the required modules and start paraview:
module load StdEnv/2020  gcc/9.3.0  openmpi/4.0.3
module load paraview/5.11.0
paraview
The most recent versions of ParaView require disabling the VirtualGL dynamic linker faker <code>LD_PRELOAD</code> when running the <code>paraview</code> command
LD_PRELOAD=${LD_PRELOAD/libdlfaker.so/} paraview


= Batch rendering = <!--T:88-->
= Batch rendering = <!--T:88-->

Latest revision as of 20:49, 28 October 2024

Other languages:

Client-server visualization[edit]

NOTE 1: An important setting in ParaView's preferences is Render View -> Remote/Parallel Rendering Options -> Remote Render Threshold. If you set it to default (20MB) or similar, small rendering will be done on your computer's GPU, the rotation with a mouse will be fast, but anything modestly intensive (under 20MB) will be shipped to your computer and (depending on your connection) visualization might be slow. If you set it to 0MB, all rendering will be remote including rotation, so you will really be using the cluster resources for everything, which is good for large data processing but not so good for interactivity. Experiment with the threshold to find a suitable value.

NOTE 2: ParaView requires the same major version on the local client and the remote host; this prevents incompatibility that typically shows as a failed handshake when establishing the client-server connection. For example, to use ParaView server version 5.10.0 on the cluster, you need client version 5.10.x on your computer.

Please use the tabs below to select the remote system.

Client-server visualization on Cedar, Graham, Béluga and Narval[edit]

On Cedar, Graham, Béluga and Narval, you can do client-server rendering on both CPUs (in software) and GPUs (hardware acceleration). Due to additional complications with GPU rendering, we strongly recommend starting with CPU-only visualization, allocating as many cores as necessary to your rendering. The easiest way to estimate the number of necessary cores is to look at the amount of memory that you think you will need for your rendering and divide it by ~3.5 GB/core. For example, a 40GB dataset (that you load into memory at once, e.g. a single timestep) would require at least 12 cores just to hold the data. Since software rendering is CPU-intensive, we do not recommend allocating more than 4GB/core. In addition, it is important to allocate some memory for filters and data processing (e.g. a structured to unstructured dataset conversion will increase your memory footprint by ~3X); depending on your workflow, you may want to start this rendering with 32 cores or 64 cores. If your ParaView server gets killed when processing these data, you will need to increase the number of cores.

CPU-based visualization[edit]

You can also do interactive client-server ParaView rendering on cluster CPUs. For some types of rendering, modern CPU-based libraries such as OSPRay and OpenSWR offer performance quite similar to GPU-based rendering. Also, since the ParaView server uses MPI for distributed-memory processing, for very large datasets one can do parallel rendering on a large number of CPU cores, either on a single node, or scattered across multiple nodes.

1. First, install on your computer the same ParaView version as the one available on the cluster you will be using; log into Cedar or Graham and start a serial CPU interactive job.

Question.png
[name@server ~]$ salloc --time=1:00:0 --ntasks=1 --mem-per-cpu=3600 --account=def-someprof
The job should automatically start on one of the CPU interactive nodes.

2. At the prompt that is now running inside your job, load the offscreen ParaView module and start the server.

Question.png
[name@server ~]$ module load paraview/5.11.2  # in StdEnv/2023 (now default)

or

Question.png
[name@server ~]$ module load gcc/9.3.0 paraview-offscreen/5.11.0  # prior to StdEnv/2023

and then

Question.png
[name@server ~]$ pvserver --force-offscreen-rendering
Waiting for client...
Connection URL: cs://cdr774.int.cedar.computecanada.ca:11111
Accepting connection(s): cdr774.int.cedar.computecanada.ca:11111
Wait for the server to be ready to accept client connection.

3. Make a note of the node (in this case cdr774) and the port (usually 11111) and in another terminal on your computer (on Mac/Linux; in Windows use a terminal emulator) link the port 11111 on your computer and the same port on the compute node (make sure to use the correct compute node).

Question.png
[name@computer $] ssh <username>@cedar.computecanada.ca -L 11111:cdr774:11111

4. Start ParaView on your computer, go to File -> Connect (or click on the green Connect button in the toolbar) and click on Add Server. You will need to point ParaView to your local port 11111, so you can do something like name = cedar, server type = Client/Server, host = localhost, port = 11111; click Configure, select Manual and click Save.

Once the remote is added to the configuration, simply select the server from the list and click on Connect. The first terminal window that read Accepting connection will now read Client connected.

5. Open a file in ParaView (it will point you to the remote filesystem) and visualize it as usual.

NOTE: An important setting in ParaView's preferences is Render View -> Remote/Parallel Rendering Options -> Remote Render Threshold. If you set it to default (20MB) or similar, small rendering will be done on your computer's GPU, the rotation with a mouse will be fast, but anything modestly intensive (under 20MB) will be shipped to your computer and (depending on your connection) visualization might be slow. If you set it to 0MB, all rendering will be remote including rotation, so you will really be using the cluster resources for everything, which is good for large data processing but not so good for interactivity. Experiment with the threshold to find a suitable value.
If you want to do parallel rendering on multiple CPUs, start a parallel job; don't forget to specify the correct maximum walltime limit.

Question.png
[name@server ~]$ salloc --time=0:30:0 --ntasks=8 --mem-per-cpu=3600 --account=def-someprof

Start the ParaView server with srun.

[name@server ~]$ module load gcc/9.3.0 paraview-offscreen/5.11.0
[name@server ~]$ srun pvserver --force-offscreen-rendering


To check that you are doing parallel rendering, you can pass your visualization through the Process Id Scalars filter and then colour it by "process id".

GPU-based ParaView visualization[edit]

Cedar and Graham have a number of interactive GPU nodes that can be used for remote client-server visualization.

1. First, install on your computer the same version as the one available on the cluster you will be using; log into Cedar or Graham and start a serial GPU interactive job.

Question.png
[name@server ~]$ salloc --time=1:00:0 --ntasks=1 --mem-per-cpu=3600 --gres=gpu:1 --account=def-someprof
The job should automatically start on one of the GPU interactive nodes.

2. At the prompt that is now running inside your job, load the ParaView GPU+EGL module, change your display variable so that ParaView does not attempt to use the X11 rendering context, and start the ParaView server.

[name@server ~]$ module load gcc/9.3.0 paraview-offscreen-gpu/5.11.0
[name@server ~]$ unset DISPLAY
Question.png
[name@server ~]$ pvserver
Waiting for client...
Connection URL: cs://cdr347.int.cedar.computecanada.ca:11111
Accepting connection(s): cdr347.int.cedar.computecanada.ca:11111
Wait for the server to be ready to accept client connection.

3. Make a note of the node (in this case cdr347) and the port (usually 11111) and in another terminal on your computer (on Mac/Linux; in Windows use a terminal emulator), link the port 11111 on your computer and the same port on the compute node (make sure to use the correct compute node).

Question.png
[name@computer $] ssh <username>@cedar.computecanada.ca -L 11111:cdr347:11111

4. Start ParaView on your computer, go to File -> Connect (or click on the green Connect button on the toolbar) and click on Add Server. You will need to point ParaView to your local port 11111, so you can do something like name = cedar, server type = Client/Server, host = localhost, port = 11111; click on Configure, select Manual and click on Save.

Once the remote is added to the configuration, simply select the server from the list and click on Connect. The first terminal window that read Accepting connection will now read Client connected.

5. Open a file in ParaView (it will point you to the remote filesystem) and visualize it as usual.

Rendering with NVIDIA's IndeX plugin[edit]

NVIDIA IndeX is a 3D volumetric interactive renderer on NVIDIA GPUs enabled as a ParaView server plugin. To use IndeX, connect via client-server to ParaView 5.10 (provided by paraview-offscreen-gpu/5.10.0) running inside an interactive GPU job as described above. Then in your client go to Tools | Manage Plugins and enable the pvNVIDIAIndeX plugin first locally and then remotely. Loading it locally might not be necessary on all platforms, but we saw a bug in several configurations where ParaView server would crash if the local plugin was not selected first. After enabling the plugin, load your dataset and in the Representation drop-down menu select NVIDIA Index.

Our license lets you run NVIDIA IndeX in parallel on multiple GPUs, however parallel speedup is far from perfect. Before doing any production rendering with IndeX on multiple GPUs, please test your parallel scaling and verify that using more than one GPU leads to better performance for your dataset, otherwise use a single GPU.

Client-server visualization on Niagara[edit]

Niagara does not have GPUs, therefore, you are limited to software rendering. With ParaView, you need to explicitly specify one of the mesa flags to tell it to not use OpenGL hardware acceleration, e.g.

[name@server ~]$ module load paraview
[name@server ~]$ paraview --mesa-swr


or use one of the flags below.

To access interactive resources on Niagara, you will need to start a debugjob. Here are the steps:

  1. Launch an interactive job (debugjob).
  2. Question.png
    [name@server ~]$ debugjob
    
  3. After getting a compute node, let's say niaXYZW, load the ParaView module and start a ParaView server.
  4. Question.png
    [name@server ~]$ module load paraview
    

    The --mesa-swr-avx2 flag has been reported to offer faster software rendering using the OpenSWR library.

  5. Now, you have to wait a few seconds for the server to be ready to accept client connections.
  6. Question.png
     Waiting for client...
     Connection URL: cs://niaXYZW.scinet.local:11111
     Accepting connection(s): niaXYZW.scinet.local:11111
    
  7. Open a new terminal without closing your debugjob, and SSH into Niagara using the following command:
  8. Question.png
    [name@computer $] ssh YOURusername@niagara.scinet.utoronto.ca -L11111:niaXYZW:11111 -N
    

    this will establish a tunnel mapping the port 11111 in your computer (localhost) to the port 11111 on the Niagara's compute node, niaXYZW, where the ParaView server will be waiting for connections.

  9. Start ParaView on your local computer, go to File -> Connect and click on Add Server. You will need to point ParaView to your local port 11111, so you can do something like
  10. name = niagara server type = Client/Server host = localhost port = 11111 then click on Configure, select Manual and click on Save.
  11. Once the remote server is added to the configuration, simply select the server from the list and click on Connect. The first terminal window that read Accepting connection... will now read Client connected.
  12. Open a file in ParaView (it will point you to the remote filesystem) and visualize it as usual.

Multiple CPUs[edit]

For performing parallel rendering using multiple CPUs, pvserver should be run using srun, i.e. either submit a job script or request a job using

[name@server ~]$ salloc --ntasks=N*40 --nodes=N --time=1:00:00
[name@server ~]$ module load paraview
[name@server ~]$ srun pvserver --mesa


where you need to replace N with the number of nodes and N*40 with the single number (the product of multiplication).

Client-server visualization on a cloud[edit]

Prerequisites[edit]

The Cloud Quick Start Guide explains how to launch a new virtual machine (VM). Once you log into the VM, you will need to install some additional packages to be able to compile ParaView or VisIt. For example, on a CentOS VM you can type

[name@VM $] sudo yum install xauth wget gcc gcc-c++ ncurses-devel python-devel libxcb-devel
[name@VM $] sudo yum install patch imake libxml2-python mesa-libGL mesa-libGL-devel
[name@VM $] sudo yum install mesa-libGLU mesa-libGLU-devel bzip2 bzip2-libs libXt-devel zlib-devel flex byacc
[name@VM $] sudo ln -s /usr/include/GL/glx.h /usr/local/include/GL/glx.h


If you have your own private-public SSH key pair (as opposed to the cloud key), you may want to copy the public key to the VM to simplify logins, by issuing the following command on your computer

Question.png
[name@computer $] cat ~/.ssh/id_rsa.pub | ssh -i ~/.ssh/cloudwestkey.pem centos@vm.ip.address 'cat >>.ssh/authorized_keys'

Compiling with OSMesa[edit]

Since the VM does not have access to a GPU (most Arbutus VMs don't), we need to compile ParaView with OSMesa support so that it can do offscreen (software) rendering. The default configuration of OSMesa will enable OpenSWR (Intel's software rasterization library to run OpenGL). What you will end up with is a ParaView server that uses OSMesa for offscreen CPU-based rendering without X but with both llvmpipe (older and slower) and SWR (newer and faster) drivers built. We recommend using SWR.

Back on the VM, compile cmake::

[name@VM $] wget https://cmake.org/files/v3.7/cmake-3.7.0.tar.gz
[name@VM $] unpack and cd there
[name@VM $] ./bootstrap
[name@VM $] make
[name@VM $] sudo make install


Next, compile llvm:

cd
 wget http://releases.llvm.org/3.9.1/llvm-3.9.1.src.tar.xz
 unpack and cd there
 mkdir -p build && cd build
 cmake \
  -DCMAKE_BUILD_TYPE=Release \
  -DLLVM_BUILD_LLVM_DYLIB=ON \
  -DLLVM_ENABLE_RTTI=ON \
  -DLLVM_INSTALL_UTILS=ON \
  -DLLVM_TARGETS_TO_BUILD:STRING=X86 \
  ..
 make
 sudo make install

Next, compile Mesa with OSMesa:

cd
 wget ftp://ftp.freedesktop.org/pub/mesa/mesa-17.0.0.tar.gz
 unpack and cd there
 ./configure \
  --enable-opengl --disable-gles1 --disable-gles2 \
  --disable-va --disable-xvmc --disable-vdpau \
  --enable-shared-glapi \
  --disable-texture-float \
  --enable-gallium-llvm --enable-llvm-shared-libs \
  --with-gallium-drivers=swrast,swr \
  --disable-dri \
  --disable-egl --disable-gbm \
  --disable-glx \
  --disable-osmesa --enable-gallium-osmesa
 make
 sudo make install

Next, compile the ParaView server:

cd
 wget http://www.paraview.org/files/v5.2/ParaView-v5.2.0.tar.gz
 unpack and cd there
 mkdir -p build && cd build
 cmake \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_INSTALL_PREFIX=/home/centos/paraview \
      -DPARAVIEW_USE_MPI=OFF \
      -DPARAVIEW_ENABLE_PYTHON=ON \
      -DPARAVIEW_BUILD_QT_GUI=OFF \
      -DVTK_OPENGL_HAS_OSMESA=ON \
      -DVTK_USE_OFFSCREEN=ON \
      -DVTK_USE_X=OFF \
      ..
 make
 make install

Client-server mode[edit]

You are now ready to start ParaView server on the VM with SWR rendering:

./paraview/bin/pvserver --mesa-swr-avx2

Back on your computer, organize an SSH tunnel from the local port 11111 to the VM's port 11111:

ssh centos@vm.ip.address -L 11111:localhost:11111

Finally, start the ParaView client on your computer and connect to localhost:11111. If successful, you should be able to open files on the remote VM. During rendering in the console you should see the message SWR detected AVX2.

Remote VNC desktop on Graham VDI nodes[edit]

For small interactive visualizations requiring up to 256GB memory and 16 cores, you can use the Graham VDI nodes. Unlike client-server visualizations you will be using VNC remote desktop. Here are the basic steps:

1. Connect to gra-vdi as described TigerVNC then open a terminal window and run:

module load CcEnv

2. Show the available paraview module versions:

module spider paraview

3. Show how to load a specific version such as:

module spider paraview/5.11.0

4. Load the required modules and start paraview:

module load StdEnv/2020  gcc/9.3.0  openmpi/4.0.3
module load paraview/5.11.0
paraview

The most recent versions of ParaView require disabling the VirtualGL dynamic linker faker LD_PRELOAD when running the paraview command

LD_PRELOAD=${LD_PRELOAD/libdlfaker.so/} paraview

Batch rendering[edit]

For large-scale and automated visualization, we strongly recommend switching from interactive client-server to off-screen batch visualization. ParaView supports Python scripting, so you can script your workflow and submit it as a regular, possibly parallel production job on a cluster. If you need any help with this, please contact Technical support.