Paraview on Cooley

The recommended way of running ParaView on Cooley is in client/server mode. This consists of running the ParaView client on your local resource, and the ParaView server (pvserver) on the Cooley visualization nodes. There are two ways to accomplish this, detailed below. In both cases, the ParaView client needs to first be installed on your local resource, and needs to match the version that you run on Cooley. The most recent production version currently installed on Cooley is ParaView  5.5.2. Binary and source packages for Linux, MacOS, and Windows are available from the ParaView Download Page. (Run the 'softenv' command on a Cooley login node to see earlier versions of ParaView that are available, currently versions 5.4.1 and 5.2.0.)

As mentioned, there are two ways to run ParaView in client/server mode. For more details, including advantages and disadvantages of each, see the section below on: Trade Offs

The first, and arguably easier, way is to run the ParaView client locally, and have it launch the pvserver on Cooley, and connect back to your local client. For details see the section below on: Automated / Reverse Connection

The other way is to first manually launch the pvserver on Cooley, and then launch the ParaView client locally and connect to your running pvserver. For details see the section below on: Manual / Forward Connection

 


Automated / Reverse Connection

This section describes how to launch the pvserver on Cooley from a local ParaView client.

Start ParaView Client

First, launch the ParaView client on your local resource. In order to launch the pvserver on Cooley and have it connect back to our local client, we will need to configure some server settings in the client. This initial set up should only need to be done once, and can be reused each time you want to run ParaView on Cooley.

 

Server Configuration

Connect Icon

Select Connect

From the ParaView client choose to connect to a server by either clicking on the "Connect" icon in the menu bar, or selecting:

File->Connect

From the main menu.

Select Connect
 
Fetch Servers (first time only)

The first time we want to run a pvserver on Cooley and have it connect to our local ParaView client, we need to set up a Server. Once we set up this server, we can reuse it each time we run the ParaView client with the pvserver on Cooley.

Kitware, the maintainers of ParaView, maintain a database of server configurations, which we can retrieve through the ParaView client.

Click "Fetch Servers"

Fetch ParaView Server Configutation

Fetch Server Configuration, Cooley

From the list of server configurations, if your local resource is Linux or Mac, select COOLEY@ANL

If your local resource is Windows, select  windows to COOLEY@ANL

Click "Import Selected"

Fetch ParaView Servers: Cooley
Connect

Now that we have a server defined and configured, highlight it in the list.

Click "Connect"

Select Cooley@ANL

Configure Server Settings

In order to connect to Cooley and submit a job to launch the pvserver, you'll need to edit a few configuration settings.

First, ParaView needs a way to securely connect to Cooley, in order to run a qsub command to launch the pvserver.  On Linux/Mac it does this through Xterm and SSH.  Be sure that the path to the Xterm executable is set correctly.  On Windows be sure that the path to the SSH executable (such as PuTTY) is set correctly.

Username: Should be set to your login name on Cooley.

ParaView version: Be sure this matches the version of the ParaView client that you are running.

Client port and Server port: can use the default values

Set the Number of nodes to reserve and Number of minutes to reserve accordingly.  Note that you will be submitting a job to the queue on Cooley, and the number of nodes you request are not guaranteed to be available.  If they are not, you may have to wait in the queue until the requested number of nodes become available.

Account: set to your project id / allocation on Cooley

Click "OK"

ParaView Cooley Connect Options

Connecting: Enter Password

A window will pop up, indicating that ParaView is connecting to Cooley, and is waiting for the server to connect back to your client.  

A second window will pop up (Xterm on Linux/Mac.  PuTTY, or other local SSH client, on Windows).  Enter your PIN and secure token one time password, just as you would when logging into Cooley.

This will enable ParaView to submit your job to run the pvserver on Cooley.  Once your job starts, and the pvserver connects back to your ParaView client, the Waiting for Server Connection window will go away. 

ParaView Wating to connect to Cooley

Open File

Now when you select File->Open from the main menu, you will be browsing the filesystem on Cooley. You're ready to go.

 

 

 


Manual / Forward Connection

This section describes how to set up and manually launch ParaView on the Cooley visualization nodes, and how to configure and connect to it from a local ParaView client.

Set Up Cooley User Environment

To put ParaView in your environment on Cooley, add the following line to your ~/.soft.cooley file

NOTE: This must go before the @default entry.

 @paraview-5.5.2

Then run the command "resoft".

In order for ParaView to take advantage of the accelerated graphics on Cooley, the DISPLAY environment variable needs to be set to the local X server. This can be done by adding a few lines to the configuration file that sets up your default shell on Cooley.

Bash users should add the following to your ~/.bashrc file on Cooley:

NOTE: Be careful to ensure that the characters around the word hostname are backticks, and not single quotes, especially if cutting and pasting the text.

 if ( echo `hostname` | grep -sq 'cc' ); then
   export DISPLAY=:0.0
 fi

Csh/Tcsh users should add the following to your ~/.cshrc file on Cooley:

NOTE: Be careful to ensure that the characters around the word hostname are backticks, and not single quotes, especially if cutting and pasting the text.

 if(  `hostname` =~ '*cc*' ) then
   setenv DISPLAY :0.0
 endif

This will tell any process that runs on a visualization node to use display :0.0 (without changing any settings you may have set on the login node). This means that there can only be one pvserver process per node, even though each node has 2 graphics cards. 

 

Start the ParaView Server

In order to connect the ParaView client to a running pvserver, you need to know the host (and port) where the server is listening. This will be the head node of the job. There are several ways to do this, but probably the easiest is to submit an interactive job, starting from a shell on a Cooley login node:

  cooleylogin2:~> qsub -I -n 4 -t 60 -A project_id --attrs=pubnet

The -A project_id is required only if you have multiple projects. By default the visualization nodes have private IP addresses. The --attrs=pubnet argument will bring up the public interface on the nodes in your job so that you can connect directly to the head node of your job (where the pvserver will be listening). When the job starts, you will automatically be logged into the head node of your job. Be sure to take note of the hostname of the host that you end up on, as you will need it in order to connect your ParaView client to the pvserver.

We manually run the mpiexec command to start pvserver:

  cc018:~> mpiexec -f $COBALT_NODEFILE -np 4 pvserver --server-port=8000
  Waiting for client..
  Connection URL: CS://cc018:8000
  Accepting connection(s): cc018:8000

Because of the current display settings, you should run 1 process on each node. So the -n value passed to qsub and the -np value passed to mpiexec above should be the same. Otherwise, multiple processes on the same host may step on each other while trying to access the same graphics card.  The server-port should be in the range of 8000 - 8008.

Once the pvserver is running, and is "Accepting connection(s)" as shown above, you can connect to it from the ParaView client on your local resource. To do this we will need to set up a server configuration in your local ParaView client (Details below.) 

 

Start ParaView Client

You should now launch the ParaView client on your local resource. In order to connect to our running pvserver, we will need to configure some server settings in the client. This initial set up should only need to be done once, and can be reused each time you run ParaView on Cooley.

 

Server Configuration

Connect Icon

Select Connect

From the ParaView client choose to connect to a server by either clicking on the "Connect" icon in the menu bar, or selecting:

File->Connect

From the main menu.

Select Connect
 
Add (or Edit) Server

The first time we connect our local ParaView client to a pvserver on Cooley, we need to Add Server. Once we set up this server, we can reuse it each time we connect the ParaView client to the pvserver on Cooley. We may need to Edit Server in the future if our pvserver ends up on a different host.

Click "Add Server" (first time) or "Edit Server" (subsequent times)

Add (or Edit) Server
Configure Server, Part 1 

Configure the server by first giving it a Name, such as Cooley

Select Server Type: Client/Server

The Host value should be set to the full name of the head node of our job where the pvserver is listening: cc018.cooley.pub.alcf.anl.gov

And the port should be set to the value we used when we started the pvserver: 8000.

Click "Configure"

ParaView Server Configuration
Configure Server, Part 2

Because we are going to connect to a ParaView server that we have already started, we don't need the ParaView client to start a server for us.

Select Startup Type: Manual

Click "Save"

Configure Server (Part 2)
 
Connect

Now that we have a server defined and configured, highlight it in the list.

Click "Connect"

Select ParaView Server

Open File

Now when you select File->Open from the main menu, you will be browsing the filesystem on Cooley. You're ready to go.

 

 

 


Trade Offs

As mentioned at the beginning of this documentation, using the Automated / Reverse Connection method is simpler than the Manual / Forward Connection method. However, there are a few trade offs that you should be aware of.  

As was also mentioned in the above documentation, in either case, you are submitting a job to the queue on Cooley.  As such, you will have to wait until the number of requested nodes are available to run your job.  There is no way of knowing this from the ParaView client. This can be done using the qstat command on a Cooley login node, or via the Cooley Status Webpage

If while waiting for the pvserver to start you decide that you want to cancel, you should know that clicking the Cancel button in the ParaView GUI will cause the client to stop waiting for the pvserver to connect, and return control of the GUI to the user.  However, it does not cancel the job submitted to the queue on Cooley. Once the requested nodes become available, the job will start, and the pvserver will run for the time requested.  In order to prevent this behavior, and burning cycles that are not actually being used, login to Cooley and use the qdel command to remove the pvserver job from the queue.

Another advantage that manually launching the pvserver has over the automated method is that it is done through an interactive job.  This means that should ParaView crash or exit unexpectedly, the pvserver process will end, but your interactive job does not.  So, you can simply start the pvserver again, and reconnect with the ParaView client.  If the pvserver was launched using the automated method, if pvserver exits your job will end, and the nodes will be released.  This means that in order to restart, you will need to wait in the queue again, which could potentially take a long time if nodes are in high demand.