Difference between revisions of "Hardware Accelerated GUI Sessions"

From UFRC
Jump to navigation Jump to search
(Replaced content with "Category:Software {|align=right |__TOC__ |} ==Launching Hardware (HW) Accelerated GUI software== ''''' * Select the 'hwgui' partition for an Open-On-Demand consol...")
Tag: Replaced
 
(6 intermediate revisions by one other user not shown)
Line 6: Line 6:
  
 
'''''
 
'''''
{{Note|Please note: The original HWGUI system based on xpra is being deprecated, please use our Open-On-Demand service as a replacement: [[Open OnDemand|UFRC Open OnDemand]]|warn}}
+
* Select the 'hwgui' partition for an Open-On-Demand console or desktop session. See [[Open OnDemand|UFRC Open OnDemand]] for details on using OOD.
  
Load hidden HW GUI beta module:
+
* load the appropriate environment module and launch the application in question.
 
 
<code>
 
module load hwgui
 
</code>
 
 
 
Launch application with default resources (trackvis for this example):
 
 
 
<code>
 
launch_hwgui_trackvis
 
</code>
 
 
 
You should get an output of the following form:
 
 
 
<pre>
 
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
 
</pre>
 
 
 
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:
 
 
 
{| class="wikitable"
 
|-
 
| <code>launch_hwgui_freeview</code>
 
|| <code>launch_hwgui_matlab</code>
 
|| <code>launch_hwgui_vmd</code>
 
|| <code>launch_hwgui_trackvis</code>
 
|-
 
| <code>launch_hwgui_fsleyes</code>
 
|| <code>launch_hwgui_relion</code>
 
|| <code>launch_hwgui_visit</code>
 
|| <code>launch_hwgui_scipion</code>
 
|}
 
 
 
The launch scripts also support the normal additional resource parameters (e.g. processor count, memory, etc):
 
 
 
<pre>
 
[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
 
</pre>
 
 
 
;Please use the <code>-h</code> 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:
 
 
 
<code>
 
xpra_list_sessions
 
</code>
 
 
 
;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 <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.
 

Latest revision as of 13:18, 12 April 2023

Launching Hardware (HW) Accelerated GUI software

  • Select the 'hwgui' partition for an Open-On-Demand console or desktop session. See UFRC Open OnDemand for details on using OOD.
  • load the appropriate environment module and launch the application in question.