Running calculations with GUI: pro-viz
Pro-viz is a service for users of Ares or Athena which allows running software in GUI mode using TurboVNC. It allows you to run GUI software as Matlab, Mathematica, Maple, Ansys Workbench/Mechanical/Fluent/Electronic Desktop and more on HPC clusters – even in a network with low bandwidth.
Information
You can find more details about TurboVNC here.
Requirements
- User is required to have an active computing grant on one of the clusters and an active service to access this cluster
- New versions of the service do not require the user to install any additional packages, access is provided via the HTML5 www interface of a web browser (see the next section)
- User may also need to install TurboVNC software on the PC which will be used for connection with cluster
- TurboVNC usually installs in path /opt/TurboVNC/bin on Linux (Ubuntu, Mint, Fedora, etc.) so you may want to add this directory to your PATH env variable
- To run TurboVNC, you may have to install Java JRE x86
In versions lower than 2.1.2, the problem of missing server files must also be resolved (the solution is given using Java JRE 8 as an example):
- After installing the Java JRE x86, download the Java Server JRE file from here
- Unpack the archive to get the jdk
directory, e.g. jdk1.8.0_121 - Navigate to the installation directory (in this example it will be C:/Program files/java/jre1.8.0_121)
- Copy the contents of the extracted directory to the Java installation directory and allow the files to be overwritten
If this solution is not effective, follow this instruction:
- Navigate to the installation directory (in the example this would be C:/Program files x86/java/jre1.8.0_121), to the bin subdirectory
- Create a "server" directory
- Copy the content of the "client" directory to the "server" directory
Running www web client (default and recommended method)
Some of the Pro-viz modules allow connection to the cluster's GUI directly via a web browser that supports HTML5. An example is the pro-viz/1.8.4-gua module on the Ares cluster. Using this module, once a Pro-viz task has already started, the Pro-viz password JOBID command can be executed, where JOBID is the task ID returned in the pro-viz list command. In our case, the command would look as follows:
Information
A password can only be generated for jobs already running (with DISPLAY configured).
As a result of the command, a web address will be returned, among other information, which must be clicked on or copied into the browser. The link takes the following form:
After clicking/copying, log in via the PLGrid login page to access the graphical mode directly in your browser.
The overall information returned includes instructions on how to connect using the web interface, the TurboVNC Java client and other clients using tunneling:
------- Web client ------------------------------------------------------
Session link:
https://gui01.ares.cyfronet.pl/screen/#/client/alamakota
Web interface link:
https://gui01.ares.cyfronet.pl/screen/#
-------------------------------------------------------------------------
------- TurboVNC client -------------------------------------------------
Session password (for external client): 000000
Full command (for external client): vncviewer -SecurityTypes=VNC,UnixLogin,None -via plguser@ares.cyfronet.pl -password=000000 ac0078:1
-------------------------------------------------------------------------
------- Other VNC clients -----------------------------------------------
Use the following command to forward VNC port to your local computer:
ssh plguser@ares.cyfronet.pl -L5901:ac0078:5901
Start your VNC client and connect to the forwarded port:
i.e: gvncviewer localhost:1
Session password: 000000
-------------------------------------------------------------------------
Running Pro-viz on a cluster
At first step user need to run Pro-viz on the cluster. This is done by an application whose module has to be loaded on the access machine of the corresponding cluster using the Lmod system. First, it is necessary to check the exact name of the service module on the cluster. This is done using the command:
then load the respective module with the command:
For example, on Ares cluster it will be: module load pro-viz.
This will make the Pro-viz software available in the terminal. Its syntax is as follows:
Usage: pro-viz
start [-n CORES | -N NODES | -p PARTITION | -t TIME | -A ACCOUNT | -r RESERVATION | -g GPUS | -C constraints | -m EMAIL-ADDRESS ] - start a new batch session
interactive [ -p PARTITION | -t TIME | -A ACCOUNT | -r RESERVATION | -g GPUS | -C constraints ] - start a new interactive session
list - list all sessions
attach JOBID - attach session to a working job with JOBID
password JOBID - generate access token for session JOBID
stop JOBID - terminate session JOBID
killall - terminate all sessions
help - duh
The following instructions show the running of one batch job on one full compute node on a Prometheus cluster. To do this, execute the example command:
Where provizgrant is the name of the corresponding grant on the cluster where you want the task to start. It is now necessary to wait for the task to start. You can check the status of the task using the command:
the result of which is shown below:
The output means that the job with JOBID 4201152 was started on working node p1788 on display 1. This info will be required to set up connection with Java TurboVNC client.
Connection to the service using the TurboVNC Viewer Java client
To connect to the service, you need to run the Java TurboVNC Viewer client on your computer, and then set up a connection to the task you have previously run. A tunnel to the cluster access machine is required to set up the connection. This function is built into the TurboVNC client (Java TurboVNC Viewer).
First, the tunnel must be configured. To do this, go to the options panel: Options... --> Security -> Gateway (SSH server or UltraVNC repeater). Deselect "Extended encryption and authentication" (VeNCrypt), and in the "SSH user" field enter your PLGrid login with the prefix "plg", (e.g. plguser). As "Host", enter the address of the cluster access machine:
- ares.cyfronet.pl for Ares
- athena.cyfronet.pl for Athena
Information
For newer versions of TurboVNC, select only the Standard VNC option.
Warning
If your running TurboVNC client does not have the Security tab described above, please close the running TurboVNC Viewer client and start the Java TurboVNC Viewer client described in the documentation.
After clicking "OK", return to the main window and there type as "VNC server" the host and display address returned by the pro-viz list command in HOST:DISPLAY notation, e.g. p1788:1:
After clicking "Connect", another window will appear to set up a tunnel to the VNC server. As "User name" you enter the user previously specified in the "Gateway ..." configuration, as password you must enter the password of this PLGrid user:
Once the password for the cluster has been entered correctly, an SSH message is displayed with the example content:
Confirm it by clicking on the "OK" button. A window will appear in which you need to enter the connection password for the VNC server.
To generate a password while logged into the cluster, use the command:
where JOBID is the job ID returned in the pro-viz list command, in our case the command would be as follows:
The password can only be generated for tasks already running ( having the DISPLAY configured). As a return message, you will receive, among other data, a one-time password (for external client), which must be copied and entered in the open TurboVNC window. For the following explanations, we assume that the returned password is 000000.
If you prefer to use the TurboVNC client in a terminal, you can execute a command that also displays the pro-viz password JOBID, eg:
Once connected, a view of the task in GUI mode appears. At this point you can already start the terminal, whose icon is located in the bottom bar:
and use the allocated resources after loading the respective application module.
Warning
The first module to be loaded in the terminal should be the pro-viz module, which will add the relevant paths to the user environment.
Below is an example with a running Matlab application. You can see that the user has run the Parallel Computing Toolbox benchmark example in GUI mode using 24 cores on the machine.
Disconnection from the session
Since a TurboVNC task can run without an open client, it is possible to close the TurboVNC client window with the close/exit or disconnect button after requesting calculations. In this case, the calculation continues to run, but without a preview.
To log back into a disconnected session, re-generate the password with the pro-viz password 4201152 command and then enter the so-generated password when logging in.
Closing the session
To close the session and end the job, stop it from the terminal using the pro-viz stop command:
Alternatively, you can simply click on the username shown in the top right of the TurboVNC screen on the panel and then select the "log Out" option. This will automatically end the session on the cluster.