X11 forwarding batch interactive jobs

From ScientificComputing
Revision as of 10:15, 19 December 2022 by Sfux (talk | contribs) (Submitting X11 forwarding batch interactive jobs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


In some cases it is useful to run a compute- or memory-intensive program with a graphical user interface (GUI). Such computations should not be run on a login node but on a compute node through the batch system. You can use batch interactive jobs with X11 forwarding.


Please make sure that you have an SSH config file in your home directory


which contains the line

Host *
   ForwardX11Trusted yes

This is required for running a batch interactive job with X11 forwarding enabled.

Submitting X11 forwarding batch interactive jobs

To run xterm as an X11 forwarding batch interactive job, you would need to connect to Euler with X11 forwarding enabled and run the following command


[nmarounina@eu-login-40 ~]$  srun --pty --x11 bash
srun: job 1465178 queued and waiting for resources
srun: job 1465178 has been allocated resources
[nmarounina@eu-a2p-530 ~]


[sfux@eu-login-02 ~]$ bsub -XF -R "rusage[mem=3000]" -Is xterm
Generic job.
Job <37994100> is submitted to queue <normal.4h>.
<<ssh X11 forwarding job>>
<<Waiting for dispatch ...>>
<<Starting on eu-a2p-230-1>>

After submitting your interactive job, you would need to wait until the session gets dispatched on a compute node. You can request the resources for your interactive job the same way as for batch jobs.

Troubleshooting X11 forwarding batch interactive jobs

If the batch system detects that your connection to Euler does not support X11 forwarding, then it will reject your job submission:

[leonhard@euler02 ~]$ bsub -XF -R "rusage[mem=3000]" -Is xterm
Error: X11 connection is not set up.
Request aborted by esub. Job not submitted.
[leonhard@euler02 ~]$

Check your settings for SSH and X11 forwarding.