Normally any generated data would be saved to a file and you download that to your local machine for viewing, or post processing. However, sometimes the data can’t be reduced and you need to visualise some aspect of it in-situ. To display some graphics from a program running on the HPC onto your local machine you need to do a thing called “X forwarding”.
When you start SSH from the command line you need to use the -X option to enable X forwarding like this:
$ ssh -X firstname.lastname@example.org hpcnode01$
Now your on the login node you can test X forwarding is working as decribed in the section below.
If you need to login to an execution node because your job will be using significant CPU and memory then you can use -X with an PBS interactive job submission request. See: Logging into Other Nodes. An example is:
$ qsub -I -X -l select=1:host=hpcnode07 -l walltime=00:30:00 hpcnode07$
To test that X forwarding is working we can start the R programming language and get it to display a simple graph.
hpcnode01$ R R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-redhat-linux-gnu (64-bit) ..... Type 'q()' to quit R. >
Display a histogram of 100 random gaussian variables:
The following graph should appear:
Close the graph window and then exit R:
> q() Save workspace image? [y/n/c]: n $