The CSF2 has been replaced by the CSF3 - please use that system! This documentation may be out of date. Please read the CSF3 documentation instead. To display this old CSF2 page click here. |
GUI-based work: editing files and interactive jobs (qrsh)
The Fundamentals
By making use of the X-Windows protocol (aka X11), it is simple to have applications run on the CSF which display their GUI on your local desktop/laptop.
To do this, you will need to enable X11 tunnelling within your SSH connection; this is simple to do.
Linux Users
All popular Linux distros run an X11-based desktop (e.g., GNOME, KDE, XFCE or LXDE). The only remaining step is to enable X11-tunnelling when logging in — and one flag to your SSH command:
ssh -X username@csf2.itservices.manchester.ac.uk # # ...that's an UPPERcase X... # ...replace username with your CSF username
OS-X Users
- Please install X-Quartz, a free X11 implemenatation for MacOSX, first (you only need to do this once, very old versions of OS-X may already have it).
- Some people find they need to reboot after installing this before it will work.
- Very occassionally if it does not work after a reboot a re-install of XQuartz is required.
- Applications -> Terminal
- then as per Linux above
MS Windows Users
MS Windows users should consult the dedicated instructions which detail how to download and install MobaXTerm (which provides an X11-server and X-tunnelling SSH all in one convenient application).
Check it has worked
Once you have logged in to the CSF using one of the above methods, run the following command on the CSF:
echo $DISPLAY
If everything is OK you should see something like:
localhost:11.0 # # The number at the end can be different
If you get nothing displayed then X11 is NOT enabled and you won’t be able to open GUI windows. Things to check:
- Did you use an UPPERcase X in the command:
ssh -X username@csf2.....
- If on Mac, after installing X-Quartz, did X-Quartz start automatically when you ran the
ssh
command in the terminal window? If not, reboot your Mac and try again.
Editing Files on the CSF: Using gedit
a GUI-based Editor
Frequently it is convenient to login to the CSF and edit a file located there (rather than transfer the file to your local machine, edit, then transfer back) and do so by using an editor with a familiar GUI, such as gedit (which is similar to MS Notepad or Wordpad).
Once you’ve logged in using the above method simply run gedit
on the login node to edit a file.
Note that enormous output files generated by your applications should not normally be edited with gedit as this will consume a lot of memory on the login node. If you want to quickly look at an output file, assuming it is plain text, (perhaps to inspect whether it looks like your code has at least generated some results) use:
less filename
and this will display your file page by page in the terminal window.
Running GUI-Based Apps Interactively in SGE: qrsh
Using qrsh
, rather than qsub
, allows users to start an interactive session within the batch system, SGE, which is suitable for running GUI-based work (e.g., with RStudio, Fluent or Star-CCM). This may sound contradictory but means that your interactive session is scheduled to run on a compute node (rather than the login node) and the session will only start when the correct resources become available.
For very short interactive jobs:
- login to the CSF with X11-tunnelling enabled (see above);
- load the environment module appropriate to your GUI application;
- on the command line enter
qrsh -V -l inter -l short <application> # # replace "<application>" with your application/software executable
For longer interactive jobs (up to two days), replace short
with twoday
:
- on the command line enter
qrsh -V -l inter -l twoday <application> # # replace "<application>" with your application/software executable
N.B. The CSF exists primarily for batch work and as such little provision is made for interactive work. Frequently it is not possible to run any (new) interactive sessions as no resources are available. In these cases, after issue the qrsh
command users will receive the message
Your "qrsh" request could not be scheduled, try again later
and the interactive job will not be scheduled. There is no option but to try again later, as suggested. Please do not simply run your application on the login node – such jobs will be killed by the sysadmins.
If you have a requirement to run a lot of interative/GUI-based work and frequently are unable to get your qrsh
jobs scheduled, contact its-ri-team@manchester.ac.uk.
Further information on using qrsh
can be found in the CSF SGE user documentation.