From Documentation
Jump to: navigation, search
m (Rainbow and your PC)
(Using client/server mode through the visualization station)
Line 13: Line 13:
 
Adding a <tt>--stereo</tt> option will enable stereo rendering when supported by the hardware.
 
Adding a <tt>--stereo</tt> option will enable stereo rendering when supported by the hardware.
  
= Rainbow and Visualization Stations =
+
= Visualization Stations and your PC =  
  
The supported way to run ParaView on rainbow is through the visualization stations.
+
You can also download ParaView for your PC (Linux, MacOS, and Windows version exist) from the [http://www.paraview.org ParaView Website] (or install it using your package manager under Linux) and use it in client server mode. Note that you must
  
Once ParaView has started up, choose the ''connect'' option from the ''file'' menu. Click on ''rainbow'' and then ''connect''. Select the desired number of processors (note that more is not necessarily faster due to the overhead of moving data around) and then press ''connect'' again. ParaView will then (depending on your ssh setup) request your password (on the command prompt if you started ParaView that way), login to rainbow, and submit an appropriate job to the vis queue.
+
* use the same version of ParaView as on the visualization stations, and
 
+
* setup ssh for passwordless login
Be aware that ParaView will expect your data files to be on rainbow and your state files to be on the local machine. As well, the use of the vis queue implies individual sessions will only last up to eight hours, and stereo rendering does not work in conjunction with rainbow.
+
 
+
= Rainbow and your PC =
+
 
+
You can also download ParaView for your PC (Linux, MacOS, and Windows version exist) from the [http://www.paraview.org ParaView Website] (or install it using your package manager under Linux) and use it in client server mode to perform your rendering on rainbow. Note that you must use the same version of ParaView as on rainbow, you must setup ssh for passwordless login, and you must open tcp port 11111 for incoming connections on any firewalls. 
+
  
 
== Linux and MacOS ==
 
== Linux and MacOS ==
Line 29: Line 24:
 
Place the following in ''servers.pvsc'' under ''.config/ParaView'' in your home directory (this must be done while ParaView is not running)
 
Place the following in ''servers.pvsc'' under ''.config/ParaView'' in your home directory (this must be done while ParaView is not running)
  
  <Servers>
+
  <nowiki><Servers>
  <Server name="builtin" resource="builtin:">
+
  <Server name="SHARCNET" resource="csrc://localhost">
    <ManualStartup/>
+
    <CommandStartup>
  </Server>
+
      <Options>
  <Server name="rainbow" resource="csrc://rainbow.sharcnet.ca:11111">
+
        <Option name="PV_SERVER_HOST" label="Host" save="true">
    <CommandStartup>
+
          <String default="vdi-fedora20.user.sharcnet.ca"/>
      <Options>
+
        </Option>
        <Option name="PV_NODES" label="Number of Nodes">
+
        <Option name="PV_SERVER_PORT" label="Port">
          <Range type="int" min="1" max="16" step="1" default="4"/>
+
          <Range type="int" min="1024" max="65535" step="1" default="random"/>
        </Option>
+
        </Option>
        <Option name="PV_CLIENT_HOST" label="Client Host" save="true">
+
        <Option name="PV_NODES" label="CPUs" save="true">
        </Option>
+
          <Range type="int" min="1" max="16" step="1" default="4"/>
        <Option name="PV_LOGIN" label="Login Name" save="true">
+
        </Option>
        </Option>
+
        <Option name="PV_USERNAME" label="Login" save="true">
      </Options>
+
          <String/>
      <Command exec="ssh" timeout="0" delay="5" Arguments="24">
+
        </Option>
        <Arguments>
+
        <Option name="PV_CONNECT_ID" label="ID" readonly="true">
          <Argument value="-x"/>
+
          <Range type="int" min="1" max="65535" step="1" default="random"/>
          <Argument value="-l"/>
+
        </Option>
          <Argument value="$PV_LOGIN$"/>
+
      </Options>
          <Argument value="rainbow.sharcnet.ca"/>
+
      <Command exec="ssh" timeout="0" delay="5">
          <Argument value="sh"/>
+
        <Arguments>
          <Argument value="-l"/>
+
          <Argument value="-x"/>
          <Argument value="-c"/>
+
          <Argument value="-R"/>
          <Argument value="&#x27;"/>
+
          <Argument value="$PV_SERVER_PORT$:localhost:$PV_SERVER_PORT$"/>
          <Argument value="sqsub"/>
+
          <Argument value="-l"/>
          <Argument value="-q"/>
+
          <Argument value="$PV_USERNAME$"/>
          <Argument value="vis"/>
+
          <Argument value="$PV_SERVER_HOST$"/>
          <Argument value="-n"/>
+
          <Argument value="sh"/>
          <Argument value="$PV_NODES$"/>
+
          <Argument value="-c"/>
          <Argument value="-N"/>
+
          <Argument value="'module load mpi/openmpi-x86_64; DISPLAY=:0 exec mpirun -n $PV_NODES$ pvserver --reverse-connection --client-host=localhost --server-port=$PV_SERVER_PORT$ --connect-id=$PV_CONNECT_ID$'"/>
          <Argument value="$PV_NODES$"/>
+
        </Arguments>
          <Argument value="-o"/>
+
      </Command>
          <Argument value="/tmp/pvsharcnet-mpi.%J.out"/>
+
    </CommandStartup>
          <Argument value="-r"/>
+
  </Server>
          <Argument value="480"/>
+
</Servers></nowiki>
          <Argument value="-f"/>
+
          <Argument value="mpi"/>
+
          <Argument value="/opt/sharcnet/paraview/3.4.0/bin/pvsharcnet-mpi"/>
+
          <Argument value="--reverse-connection"/>
+
          <Argument value="--client-host=$PV_CLIENT_HOST$"/>
+
          <Argument value="--connect-id=$PV_CONNECT_ID$"/>
+
          <Argument value="&#x27;"/>
+
        </Arguments>
+
      </Command>
+
    </CommandStartup>
+
  </Server>
+
</Servers>
+
  
The directions above on connecting from the Visualization Stations will now apply to your PC as well. Enter your [http://www.whatsmyip.org/ external IP address] in the ''Client Host'' field.
+
After adding this file start ParaView.  Click the '''connect''' icon (third from the the right) or picking '''connect''' from the '''file''' menu will now bring up a menu that allows you to connect to '''SHARCNET'''. Pick '''SHARCNET''' and then clicking '''connect'''.  This will give a menu where you can pick the number of ''CPUs'' (more can actually be slower) and enter your SHARCNET '''login'''.
 +
 
 +
If everything goes correctly, you should see ''csrc://localhost:<number>'' (where ''<number>'' is some number) in your pipeline browser. Data files will now be your SHARCNET files and only state files will be local. Beware that any changes made to ''servers.pvsc'' while ParaView is running will be lost.
  
 
== Windows ==
 
== Windows ==
  
 
A similar file, customized for your ssh setup, must be placed under your applications settings directory, and then the above directions will apply as well.
 
A similar file, customized for your ssh setup, must be placed under your applications settings directory, and then the above directions will apply as well.
 
= Other Options =
 
 
It is also possible to run ParaView directly on rainbow. While this option is not supported, advanced users may find it useful. ParaView is installed into ''/opt/sharcnet/paraview/$version'', where ''$version'' is the version number, and can be add to your path by doing
 
 
export PATH=/opt/sharcnet/paraview/$version/bin:$PATH
 
 
This will directly allow you to directly run the various ParaView programs (the ones compiled with MPI are postfixed with ''-mpi''). Most of the programs, however, won’t actually work because they require a running X server in order to access the graphics card for rendering.
 
 
The ''pvsharcnet''/''pvsharcnet-mpi'' scripts are wrappers around the ''pvserver''/''pvserver-mpi'' commands that handle starting and stopping of an X server. The following is an example of manually starting a four node render server and telling it to connect back to the client running on $myhost
 
 
sqsub -q vis -n 4 -N 4 -r 480 -f mpi -o /tmp/pvsharcnet-mpi.%J.out \
 
      /opt/sharcnet/paraview/3.4.0/bin/pvsharcnet-mpi              \
 
      --reverse-connection --client-host=$myhost</pre>
 
  
 
=References=
 
=References=

Revision as of 17:54, 20 February 2015

PARAVIEW
Description: Application designed to visualize data sets of size varying from small to very large
SHARCNET Package information: see PARAVIEW software page in web portal
Full list of SHARCNET supported software


Visualization Stations

ParaView can be started from the applications menu (the one in the upper-left hand corner) under the graphics sub-menu after logging into any of the visualization stations. It can also be launched from the command prompt on any of the visualization stations by typing

paraview

Adding a --stereo option will enable stereo rendering when supported by the hardware.

Visualization Stations and your PC

You can also download ParaView for your PC (Linux, MacOS, and Windows version exist) from the ParaView Website (or install it using your package manager under Linux) and use it in client server mode. Note that you must

  • use the same version of ParaView as on the visualization stations, and
  • setup ssh for passwordless login

Linux and MacOS

Place the following in servers.pvsc under .config/ParaView in your home directory (this must be done while ParaView is not running)

<Servers>
  <Server name="SHARCNET" resource="csrc://localhost">
    <CommandStartup>
      <Options>
        <Option name="PV_SERVER_HOST" label="Host" save="true">
          <String default="vdi-fedora20.user.sharcnet.ca"/>
        </Option>
        <Option name="PV_SERVER_PORT" label="Port">
          <Range type="int" min="1024" max="65535" step="1" default="random"/>
        </Option>
        <Option name="PV_NODES" label="CPUs" save="true">
          <Range type="int" min="1" max="16" step="1" default="4"/>
        </Option>
        <Option name="PV_USERNAME" label="Login" save="true">
          <String/>
        </Option>
        <Option name="PV_CONNECT_ID" label="ID" readonly="true">
          <Range type="int" min="1" max="65535" step="1" default="random"/>
        </Option>
      </Options>
      <Command exec="ssh" timeout="0" delay="5">
        <Arguments>
          <Argument value="-x"/>
          <Argument value="-R"/>
          <Argument value="$PV_SERVER_PORT$:localhost:$PV_SERVER_PORT$"/>
          <Argument value="-l"/>
          <Argument value="$PV_USERNAME$"/>
          <Argument value="$PV_SERVER_HOST$"/>
          <Argument value="sh"/>
          <Argument value="-c"/>
          <Argument value="'module load mpi/openmpi-x86_64; DISPLAY=:0 exec mpirun -n $PV_NODES$ pvserver --reverse-connection --client-host=localhost --server-port=$PV_SERVER_PORT$ --connect-id=$PV_CONNECT_ID$'"/>
        </Arguments>
      </Command>
    </CommandStartup>
  </Server>
</Servers>

After adding this file start ParaView. Click the connect icon (third from the the right) or picking connect from the file menu will now bring up a menu that allows you to connect to SHARCNET. Pick SHARCNET and then clicking connect. This will give a menu where you can pick the number of CPUs (more can actually be slower) and enter your SHARCNET login.

If everything goes correctly, you should see csrc://localhost:<number> (where <number> is some number) in your pipeline browser. Data files will now be your SHARCNET files and only state files will be local. Beware that any changes made to servers.pvsc while ParaView is running will be lost.

Windows

A similar file, customized for your ssh setup, must be placed under your applications settings directory, and then the above directions will apply as well.

References

o Paraview Help Documentation
http://www.paraview.org/documentation/

o Sharcnet Paraview Training Document
https://www.sharcnet.ca/Documents/training/scientific_computing/sn_viz_paraview_weiguang.pdf