Difference between revisions of "Hardware Accelerated GUI Sessions"

From UFRC
Jump to navigation Jump to search
(Added XPRA_SCREENLIMIT information)
Line 65: Line 65:
  
 
https://wiki.rc.ufl.edu/doc/GUI_Programs#Connect_From_a_Client_Computer
 
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 <code> --desktop-scaling=0 </code> to your xpra attach command.
 +
First calculate your screen size in pixels.  For single monitor configurations, this is just the resolution of the monitor:
 +
 +
<code> Width x Height </code>
 +
 +
For example a 1080p monitor would have a resolution of:
 +
 +
<code> 1920x1080 </code>
 +
 +
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:
 +
 +
<code> Horizontal Resolution = 1920 + 1920 = 3,840 pixels </code>
 +
 +
Since the monitors are side-by-side there is no additional vertical components:
 +
 +
<code> Vertical Resolution = 1080 </code>
 +
 +
So the overall display resolution is:
 +
 +
<code> 3840x1080 </code>
 +
 +
===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 <code> export XPRA_SCREENLIMIT </code> 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:
 +
 +
<code> export XPRA_SCREENLIMIT=3840x1080 </code>
 +
 +
===Complete Example===
 +
 +
Once the <code>XPRA_SCREENLIMIT</code> is set, the job can be started using the job launch script:
 +
 +
For a start-to-finish example:
 +
 +
<pre>
 +
module load hwgui;
 +
export XPRA_SCREENLIMIT=3840x1080;
 +
launch_hwgui_matlab;
 +
</pre>
 +
 +
;Please note, when connecting to a screen size limited job, disable desktop scaling on the client when you connect by adding <code> --desktop-scaling=0 </code> to your xpra attach command.

Revision as of 20:01, 3 July 2017

Currently in Beta Test

Please note that these scripts and instructions are temporary for the duration of the beta test. launch_hwgui* will likely be integrated into the existing launch_gui_sessions scripts as an argument at a later date.

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.

Other applications currently included in the beta:

launch_hwgui_freeview

launch_hwgui_matlab

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.