Interactive Jobs¶
Some of the applications available on BlueBEAR make use of a Graphical User Interface (GUI). Some of these are available in the BlueBEAR Portal and that is the preferred method of access for those applications that are available. Where an application is not available in the BlueBEAR Portal you can use an interactive job, with X forwarding enabled in your ssh session, to pass the GUI back to your own computer.
Using an Interactive Job¶
To start an interactive job, use the following commands:
module load slurm-interactive
fisbatch_screen --nodes=1-1 --ntasks=2 --time=1:0:0
You can send the same arguments to fisbatch_screen
as you would put in
a job script submitted using sbatch
. I.e. to specify a QOS or project.
The same limits on resources, such as wall time or number of cores
requested, apply to interactive jobs. The example above asks for two
cores, on one node, for one hour.
You will then see output similar to:
[info] Waiting for JOBID 3345516 to start
.....
[info] Job 3345516 is running
[info] Job is running on bber0501u32b
[info] Connecting to head node (bber0501u32b)
Once the interactive job has started then you will be connected to the node the job is running on and you will be able to run your job commands here. So, to start MATLAB:
module load MATLAB/2018b
matlab
When you disconnect from the job, by exiting the terminal, then the job will automatically be cancelled. If you use an interactive job then it is your responsibility to make sure that you make good use of the resources.
Warning
Please don’t leave the job idle, and remember to disconnect as soon as you’ve finished your work.
The fisbatch_screen
command starts a screen
session on the compute
node whereas there is an equivalent fisbatch_tmux
command that uses
tmux
instead. These two types are provided because if you wish to
start an interactive job within an existing screen
(or tmux
)
terminal multiplex session on a login node then you should avoid
nesting screen
or tmux
sessions by using the alternative
fisbatch_tmux
or fisbatch_screen
respectively. This avoids the issue
of the escape-sequences conflicting.
Be aware that there are several login nodes: if you run either
screen
or tmux
as a terminal multiplexer then you will need to
ensure that you connect to the same login node when you want to
re-attach to an existing session, e.g.
ssh _user_@bb-pg-login01.bham.ac.uk
instead of the normal
ssh _user_@bluebear.bham.ac.uk
.
If you have connected to the login node with X forwarding then the
graphical X connection will automatically be forwarded from the
interactive job. See here for details how to do that
on a Windows machine. Linux or Mac uses should use the -X
ssh flag
when logging in.