38,760
edits
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 2: | Line 2: | ||
= Client-server visualization = | = Client-server visualization = | ||
'''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 | '''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. | ||
Please use the tabs below to select the remote system. | |||
<tabs> | <tabs> | ||
<tab name="Cedar and Graham"> | <tab name="Cedar and Graham"> | ||
<br> | |||
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. | |||
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 | |||
=== CPU-based | === CPU-based visualization === | ||
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. | 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. | ||
Line 40: | Line 35: | ||
}} | }} | ||
:The | :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. | ||
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 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). | ||
Line 46: | Line 41: | ||
{{Command|prompt=[name@laptop $]|ssh <username>@cedar.computecanada.ca -L 11111:cdr774:11111}} | {{Command|prompt=[name@laptop $]|ssh <username>@cedar.computecanada.ca -L 11111:cdr774:11111}} | ||
4. Start ParaView on your laptop, go to ''File -> Connect'' (or click on the green ''Connect'' button in the toolbar) and click ''Add Server'' | 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.'' | ||
:Once the remote is added to the configuration, simply select the server from the list and click ''Connect'' | :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. | 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'' | '''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. | ||
<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. | ||
{{Command|salloc --time{{=}}0:30:0 --ntasks{{=}}8 --account{{=}}def-someprof}} | {{Command|salloc --time{{=}}0:30:0 --ntasks{{=}}8 --account{{=}}def-someprof}} | ||
Start the ParaView server with <code>srun</code>. | |||
{{Commands | {{Commands | ||
Line 64: | Line 59: | ||
}} | }} | ||
The | 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. | ||
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". | 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 | === GPU-based ParaView visualization === | ||
<span style="color:red"> | <span style="color:red">There is an issue with GPU-based ParaView on Graham; please use CPU-based ParaView until further notice.</span> | ||
Cedar and Graham have a number of interactive GPU nodes that can be used for remote | Cedar and Graham have a number of interactive GPU nodes that can be used for remote client-server visualization. | ||
1. First, install on your laptop the same | 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. | ||
{{Command|salloc --time{{=}}1:00:0 --ntasks{{=}}1 --gres{{=}}gpu:1 --account{{=}}def-someprof}} | {{Command|salloc --time{{=}}1:00:0 --ntasks{{=}}1 --gres{{=}}gpu:1 --account{{=}}def-someprof}} | ||
Line 93: | Line 88: | ||
:Wait for the server to be ready to accept client connection. | :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 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 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). | ||
{{Command|prompt=[name@laptop $]|ssh <username>@cedar.computecanada.ca -L 11111:cdr347:11111}} | {{Command|prompt=[name@laptop $]|ssh <username>@cedar.computecanada.ca -L 11111:cdr347:11111}} | ||
4. Start ParaView on your laptop, go to ''File -> Connect'' (or click on the green ''Connect'' button on the toolbar) and click ''Add Server'' | 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.'' | ||
:Once the remote is added to the configuration, simply select the server from the list and click ''Connect'' | :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. | 5. Open a file in ParaView (it will point you to the remote filesystem) and visualize it as usual. | ||
Line 104: | Line 99: | ||
</tab> | </tab> | ||
<tab name="Niagara"> | <tab name="Niagara"> | ||
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. | 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. | ||
Line 119: | Line 112: | ||
<ol> | <ol> | ||
<li> Launch an interactive job (debugjob) | <li> Launch an interactive job (debugjob).</li> | ||
{{Command|debugjob}} | {{Command|debugjob}} | ||
<li> After getting a compute node, let's say niaXYZW, load the ParaView module and start a ParaView server | <li> After getting a compute node, let's say niaXYZW, load the ParaView module and start a ParaView server.</li> | ||
{{Commands | {{Commands | ||
Line 138: | Line 131: | ||
Accepting connection(s): niaXYZW.scinet.local:11111 | Accepting connection(s): niaXYZW.scinet.local:11111 | ||
<li> Open a new terminal without closing your debugjob, and | <li> Open a new terminal without closing your debugjob, and SSH into Niagara using the following command:</li> | ||
{{Command|prompt=[name@laptop $]|ssh YOURusername@niagara.scinet.utoronto.ca -L11111:niaXYZW:11111 -N}} | {{Command|prompt=[name@laptop $]|ssh YOURusername@niagara.scinet.utoronto.ca -L11111:niaXYZW:11111 -N}} | ||
Line 144: | Line 137: | ||
this will establish a tunnel mapping the port 11111 in your computer (<code>localhost</code>) to the port 11111 on the Niagara's compute node, <code>niaXYZW</code>, where the ParaView server will be waiting for connections. | this will establish a tunnel mapping the port 11111 in your computer (<code>localhost</code>) to the port 11111 on the Niagara's compute node, <code>niaXYZW</code>, where the ParaView server will be waiting for connections. | ||
<li> Start ParaView on your local computer, go to | <li> 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 <code>11111</code>, so you can do something like</li> | You will need to point ParaView to your local port <code>11111</code>, so you can do something like</li> | ||
name = niagara | name = niagara | ||
Line 150: | Line 143: | ||
host = localhost | host = localhost | ||
port = 11111 | port = 11111 | ||
then click Configure, select | then click on ''Configure'', select ''Manual'' and click on ''Save.'' | ||
<li> Once the remote server is added to the configuration, simply select the server from the list and click Connect. | <li> 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 <code>Accepting connection...</code> will now read <code>Client connected</code>. | The first terminal window that read <code>Accepting connection...</code> will now read <code>Client connected</code>. | ||
Line 173: | Line 166: | ||
</tab> | </tab> | ||
<tab name="Cloud VM"> | <tab name="Cloud VM"> | ||
=== Prerequisites === | === Prerequisites === | ||
The [[Cloud Quick Start|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 | |||
{{Commands|prompt=[name@VM $] | {{Commands|prompt=[name@VM $] | ||
Line 187: | Line 178: | ||
}} | }} | ||
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 laptop | ||
{{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@laptop $]|cat ~/.ssh/id_rsa.pub {{!}} ssh -i ~/.ssh/cloudwestkey.pem centos@vm.ip.address 'cat >>.ssh/authorized_keys'}} | ||
=== Compiling | === Compiling with OSMesa === | ||
Since the VM does not have access to a GPU (most | 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 <code>llvmpipe</code> (older and slower) and <code>SWR</code> (newer and faster) drivers built. We recommend using SWR. | ||
Back on the VM, compile cmake:: | Back on the VM, compile <code>cmake::</code> | ||
{{Commands|prompt=[name@VM $] | {{Commands|prompt=[name@VM $] | ||
Line 205: | Line 196: | ||
}} | }} | ||
Next, compile llvm: | Next, compile <code>llvm</code>: | ||
cd | cd | ||
Line 240: | Line 231: | ||
sudo make install | sudo make install | ||
Next, compile ParaView server: | Next, compile the ParaView server: | ||
cd | cd | ||
Line 259: | Line 250: | ||
make install | make install | ||
=== | === Client-server mode === | ||
You are now ready to start ParaView server on the VM with SWR rendering: | |||
./paraview/bin/pvserver --mesa-swr-avx2 | ./paraview/bin/pvserver --mesa-swr-avx2 | ||
Line 269: | Line 260: | ||
ssh centos@vm.ip.address -L 11111:localhost:11111 | ssh centos@vm.ip.address -L 11111:localhost:11111 | ||
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 | 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.'' | ||
</tab> | </tab> | ||
Line 276: | Line 267: | ||
= Batch rendering = | = Batch rendering = | ||
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 [[Technical support | 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]]. |