Hardware Accelerated GUI Sessions

From UFRC
Jump to navigation Jump to search

Launching Hardware (HW) Accelerated GUI software

Load hidden HW GUI beta module:

module load hwgui

Launch application with default resources (trackvis for this example):

launch_hwgui_trackvis

You should get an output of the following form:

Session: c11a-s33.rc.ufl.edu:9830 for HW-Track job 6681209
Copy this command to a terminal on your LOCAL PC:
xpra attach ssh:testusr-1234@c11a-s33.rc.ufl.edu:9830

You can then copy and paste the connection command to your LOCAL PC and connect to the hardware accelerated version of the application. Please see the section below for more information on connecting.

Applications currently included in this service include:

launch_hwgui_freeview

launch_hwgui_matlab

launch_hwgui_vmd

launch_hwgui_trackvis

launch_hwgui_fsleyes

launch_hwgui_relion

launch_hwgui_visit

launch_hwgui_scipion

The launch scripts also support the normal additional resource parameters (e.g. processor count, memory, etc):

[testusr-1234@gator3 vgl-test]$ launch_hwgui_freeview -p 2 -m 40
Verifying SSH setup for 'testusr-1234'

Starting hwfreeview under Xpra in a SLURM gui session.

Requested hwfreeview memory size: '40gb'

Requested '2' processor cores

Requested '8' hours for the session
Please use the -h argument to see more information on what additional parameters are available.

Connecting from your local PC

Connecting from your local PC is the same as a normal GUI session, you can run xpra_list_sessions to find your running gui jobs:

xpra_list_sessions

Please note that the first time you connect to each node, you will need to accept the new host key by entering "yes" in the connection terminal or pop-up after running the xpra attach command.

More information is available in the main GUI section.

https://wiki.rc.ufl.edu/doc/GUI_Programs#Connect_From_a_Client_Computer

Limiting X display Size

For some applications it is nessasary to limit the X server size to prevent windows from being drawn off-screen. This feature has been enabled based on an enviroment variable that can be set prior to staring your job. Please follow these steps if you need to limit your session's X server size

Calculate Display Size

Please note, when connecting to a screen size limited job, disable desktop scaling on the client when you connect by adding --desktop-scaling=0 to your xpra attach command.

First calculate your screen size in pixels. For single monitor configurations, this is just the resolution of the monitor:

Width x Height

For example a 1080p monitor would have a resolution of:

1920x1080

If you have two or more monitors, please be sure to add each monitor's resolution to calculate the overall display size.

For example 2, side by side, landscape orientated, 1080p monitors:

Horizontal Resolution = 1920 + 1920 = 3,840 pixels

Since the monitors are side-by-side there is no additional vertical components:

Vertical Resolution = 1080

So the overall display resolution is:

3840x1080

Set environment variable

Once the display size is calculated, an environment variable can be set to supply this information to the GUI job. This is completed using the export XPRA_SCREENLIMIT command.

For example if the display size is 3840 by 1080, it can be set as the horizontal resolution followed by a 'x' and then the vertical resolution:

export XPRA_SCREENLIMIT=3840x1080

Complete Example

Once the XPRA_SCREENLIMIT is set, the job can be started using the job launch script:

For a start-to-finish example:

module load hwgui;
export XPRA_SCREENLIMIT=3840x1080;
launch_hwgui_matlab;
Please note, when connecting to a screen size limited job, disable desktop scaling on the client when you connect by adding --desktop-scaling=0 to your xpra attach command.