38,760
edits
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 4: | Line 4: | ||
= 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 | '''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.5.2 on the cluster, you need client version 5.5.x on your | '''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.5.2 on the cluster, you need client version 5.5.x on your computer. | ||
Please use the tabs below to select the remote system. | Please use the tabs below to select the remote system. | ||
Line 21: | Line 21: | ||
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. | ||
1. First, install on your | 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. | ||
{{Command|salloc --time{{=}}1:00:0 --ntasks{{=}}1 --account{{=}}def-someprof}} | {{Command|salloc --time{{=}}1:00:0 --ntasks{{=}}1 --account{{=}}def-someprof}} | ||
Line 39: | Line 39: | ||
: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. | :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 | 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). | ||
{{Command|prompt=[name@ | {{Command|prompt=[name@computer $]|ssh <username>@cedar.computecanada.ca -L 11111:cdr774:11111}} | ||
4. Start ParaView on your | 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.'' | ||
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.'' If you set it to default (20MB) or similar, small rendering will be done on your | '''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. | ||
Line 69: | Line 69: | ||
Cedar and Graham have a number of interactive GPU nodes that can be used for remote client-server visualization. | Cedar and Graham have a number of interactive GPU nodes that can be used for remote client-server visualization. | ||
1. First, install on your | 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. | ||
{{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 89: | Line 89: | ||
: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 | 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). | ||
{{Command|prompt=[name@ | {{Command|prompt=[name@computer $]|ssh <username>@cedar.computecanada.ca -L 11111:cdr347:11111}} | ||
4. Start ParaView on your | 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 135: | Line 135: | ||
<li> Open a new terminal without closing your debugjob, and SSH into Niagara using the following command:</li> | <li> Open a new terminal without closing your debugjob, and SSH into Niagara using the following command:</li> | ||
{{Command|prompt=[name@ | {{Command|prompt=[name@computer $]|ssh YOURusername@niagara.scinet.utoronto.ca -L11111:niaXYZW:11111 -N}} | ||
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. | ||
Line 181: | Line 181: | ||
}} | }} | ||
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 | 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 | ||
{{Command|prompt=[name@ | {{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 === | === Compiling with OSMesa === | ||
Line 263: | Line 263: | ||
</source> | </source> | ||
Back on your | Back on your computer, organize an SSH tunnel from the local port 11111 to the VM's port 11111: | ||
<source lang="console"> | <source lang="console"> | ||
ssh centos@vm.ip.address -L 11111:localhost:11111 | ssh centos@vm.ip.address -L 11111:localhost:11111 | ||
</source> | </source> | ||
Finally, start the ParaView client on your | 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.'' | ||
</tab> | </tab> | ||
</tabs> | </tabs> |