{"id":137982,"date":"2021-12-03T15:44:39","date_gmt":"2021-12-03T20:44:39","guid":{"rendered":"http:\/\/www.bu.edu\/tech\/?page_id=137982"},"modified":"2025-01-13T10:34:32","modified_gmt":"2025-01-13T15:34:32","slug":"virtual-gl","status":"publish","type":"page","link":"https:\/\/www.bu.edu\/tech\/support\/research\/system-usage\/running-jobs\/virtual-gl\/","title":{"rendered":"Running Interactive Graphics Jobs (using VirtualGL)"},"content":{"rendered":"<p><a name=\"top\"><\/a><\/p>\n<h2>Overview<\/h2>\n<div class=\"highlight-yellow\"><strong>Due to the ease of use and excellent graphics performance of the <a href=\"https:\/\/www.bu.edu\/tech\/support\/research\/system-usage\/connect-scc\/scc-ondemand\/\">SCC OnDemand<\/a> system&#8217;s Desktop Session, we recommended its use instead of using VNC as described here.<\/strong><\/div>\n<p>While the majority of interactive graphical applications that run on the SCC perform well, there are a class of complex interactive visualization applications that require additional software called VirtualGL in order to perform adequately on users&#8217; workstations or desktops. These include OpenGL applications that utilize full 3D hardware acceleration like Freesurfer or PyMOL.<\/p>\n<p>Research Computing has set aside a limited number of shared nodes that utilize VirtualGL to support these complex visualization applications on the SCC. To successfully run an interactive graphics job that requires VirtualGL, the user has to be on the BU Network.<\/p>\n<p>It is important to note that the VirtualGL offering is a limited resource and should only be used for applications that require complex OpenGL 3D hardware acceleration. Most applications such as MATLAB, RStudio, QGIS, and others do not require this and will function well using a typical interactive desktop session.<\/p>\n<h4 id=\"VIRTUALGL OnDemand Desktop\">OnDemand Interactive Graphics Desktop<\/h4>\n<p>Under the &#8220;<a href=\"https:\/\/www.bu.edu\/tech\/support\/research\/system-usage\/connect-scc\/scc-ondemand\/interactive-apps\/\">Interactive Apps<\/a>&#8221; menu there is an application options called &#8220;VirtualGL Desktop&#8221;. Select this application to launch an interactive VirtualGL desktop on a compute node.<\/p>\n<h4>Manual VirtualGL Connection<\/h4>\n<ol>\n<li><a href=\"#VGLPASSWRD\">VNC password setup<\/a><\/li>\n<li><a href=\"#VGLSTART\">Start Interactive Graphics Job<\/a><\/li>\n<li><a href=\"#VGLTUNNEL\">Configure SSH tunnel<\/a><\/li>\n<li><a href=\"#VGLCLIENT_PC\">Connect with VNC Client &#8211; PC<\/a><\/li>\n<li><a href=\"#VGLCLIENT_Mac\">Connect with VNC Client &#8211; Mac<\/a><\/li>\n<li><a href=\"#VGLJOB\">Running Graphics Application<\/a><\/li>\n<li><a href=\"#VGLKILL\">Terminating Interactive Graphics Job<\/a><\/li>\n<\/ol>\n<h4 id=\"VGLPASSWRD\">VNC password setup<\/h4>\n<p>The first time you use <i>vncserver<\/i> or start an <i>interactive graphics job<\/i>, you have to establish your VNC password. This VNC password must be different from your <i>Kerberos<\/i> password. To set your VNC password, execute the following command:<\/p>\n<pre class=\"code-block\"><code><span class=\"prompt\">scc2%<\/span> <span class=\"command\">vncpasswd<\/span><\/code><\/pre>\n<h4 id=\"VGLSTART\">Start Interactive Graphics Job<\/h4>\n<p>To start an <i>Interactive Graphics Job<\/i> execute the following command (on any SCC login node):<\/p>\n<pre class=\"code-block\"><code><span class=\"prompt\">scc2%<\/span> <span class=\"command\">qvgl<\/span><\/code><\/pre>\n<p>This command accepts many batch job options including project name, time limit, email options, etc. It also accepts vncserver flags including the <i>geometry<\/i> flag to set the VNC screen resolution. The general usage of the command is:<\/p>\n<pre class=\"code-block\"><code> <span class=\"command\">qvgl<\/span> <span class=\"placeholder\">[-v|--vnc \"vncargs\"] [-b|--batch \"batchargs\"] [-P project] [-l batch resources]<\/span><\/code><\/pre>\n<p>For example:<\/p>\n<pre class=\"code-block\"><code><span class=\"prompt\">scc2%<\/span> <span class=\"command\">qvgl<\/span> <span class=\"placeholder\">-P scv -l h_rt=4:00:00 -v \"-geometry 1200x900\" -b \"-m e\"<\/span><\/code><\/pre>\n<p>If the job starts successfully, you should see the output that will provide you with the information about setting up tunneling and running the VNC session:<\/p>\n<pre class=\"code-block\"><code><span class=\"output\">\r\nWaiting for immediate job to be scheduled.\r\n\r\non your local workstation run:\r\n     <b>ssh bgregor@scc1.bu.edu -L XXXX:scc-v06:5901<\/b>\r\n\r\nthen execute vncviewer to connect to localhost port XXXX\r\n     vncviewer localhost:XXXX\r\nto run an OpenGL application on a hardware GPU use vglrun command\r\nfor example:\r\n     vglrun glxinfo\r\nto quit the job please run:\r\n     qdel 2006553\r\n<\/span><\/code><\/pre>\n<h3 id=\"VGLTUNNEL\">Configure SSH tunnel<\/h3>\n<p>The value XXXX is a placeholder &#8211; replace this with a number of your choosing that&#8217;s >1024. Values in the range 7000-8000 are suggested. In the examples below the value of 7000 is used. <b>Linux<\/b> and <b>Mac<\/b> users can execute the <code><span class=\"command\">ssh<\/span><\/code> command provided in the qvgl script output. This should be entered in your <b>local<\/b> machine&#8217;s terminal window, e.g.<\/p>\n<pre class=\"code-block\"><code><span class=\"prompt\">&gt;<\/span> <span class=\"command\">ssh<\/span> <span class=\"placeholder\">bgregor<\/span>@scc1.bu.edu -L <span class=\"placeholder\">7000<\/span>:scc-v06:<span class=\"placeholder\">5901<\/span><\/code><\/pre>\n<p>You will be asked to enter your Kerberos password.<\/p>\n<p><b>Windows<\/b> users can execute the same command in their <a href=\"http:\/\/mobaxterm.mobatek.net\/\">MobaXterm<\/a> or <a href=\"http:\/\/www.cygwin.com\/\">Cygwin<\/a> local terminal window or <a href=\"http:\/\/www.bumc.bu.edu\/linga\/documentation\/connecting\/incoming-to-linga\/windows\/port-forwarding-windows\/\">follow these steps<\/a> to set up tunneling using <a href=\"http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/download.html\">putty<\/a>.<\/p>\n<h3 id=\"VGLCLIENT_PC\">Connect with VNC Client &#8211; PC<\/h3>\n<p>If you do not have the <b>VNC viewer<\/b> built into your system, download it from <a href=\"https:\/\/www.realvnc.com\/en\/connect\/download\/viewer\/\">www.realvnc.com<\/a>. When you install it, select only the VNC Viewer (you do not need to install VNC server on your local machine). Start the VNC Viewer and when a dialog window appears, enter:<\/p>\n<pre class=\"code-block\"><code><span class=\"command\">VNC server:<\/span> localhost:<span class=\"placeholder\">XXXX<\/span><\/code><\/pre>\n<p>where <code><span class=\"placeholder\">XXXX<\/span><\/code> is the number you selected while configuring SSH tunneling (7000 in the example above). You will be prompted to enter your password. Use your VNC (not Kerberos) password.<\/p>\n<h3 id=\"VGLCLIENT_Mac\">Connect with VNC Client &#8211; MAC<\/h3>\n<p>Recent versions of Mac OSX have a VNC client built into the operating system. To connect on a Mac, click on the desktop then press the key combo \u2318-K. In the Connect to Server window that opens, enter the following into the Server Address box, using the port number selected earlier in place of the <code><span class=\"placeholder\">XXXX<\/span><\/code>:<\/p>\n<pre class=\"code-block\"><code>vnc:\/\/localhost:<span class=\"placeholder\">XXXX<\/span><\/code><\/pre>\n<p>You will be prompted to enter your password. Use your VNC (not Kerberos) password.<\/p>\n<h3 id=\"VGLJOB\">Running Graphics Application<\/h3>\n<p>Open a terminal Window (In the menu Applications -&gt; System Tools -&gt; Terminal; Or press right mouse button and select &#8220;Open in terminal&#8221;).<\/p>\n<p>Start graphics application using VirtualGL engine <code><span class=\"command\">vglrun<\/span><\/code> (Load modules first, if needed):<\/p>\n<pre class=\"code-block\"><code><span class=\"prompt\">scc-ha2%<\/span> <span class=\"command\">module load freesurfer\/5.3.0<\/span>\r\n<span class=\"prompt\">scc-ha2%<\/span> <span class=\"command\">vglrun tksurfer <\/span><\/code><\/pre>\n<h3 id=\"VGLKILL\">Terminating Interactive Graphics Job<\/h3>\n<p>To terminate your Interactive Graphics session close your VNC window, exit the tunneling session and delete your job:<\/p>\n<pre class=\"code-block\"><code><span class=\"prompt\">scc2%<\/span> <span class=\"command\">qdel<\/span> <span class=\"placeholder\">2006553<\/span><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Overview Due to the ease of use and excellent graphics performance of the SCC OnDemand system&#8217;s Desktop Session, we recommended its use instead of using VNC as described here. While the majority of interactive graphical applications that run on the SCC perform well, there are a class of complex interactive visualization applications that require additional&#8230;<\/p>\n","protected":false},"author":1692,"featured_media":0,"parent":137962,"menu_order":11,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/137982"}],"collection":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/users\/1692"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/comments?post=137982"}],"version-history":[{"count":7,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/137982\/revisions"}],"predecessor-version":[{"id":155383,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/137982\/revisions\/155383"}],"up":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/137962"}],"wp:attachment":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/media?parent=137982"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}