Contents
Interactive Sessions and GUI Jobs
What Is an Interactive Session?
An interactive session gives you a shell on a compute node so you can test commands, debug code, or run short exploratory tasks.
Start an Interactive Session
srun -n1 --pty --partition=scu-cpu --mem=8G bash -iThe --pty flag requests a pseudo-terminal, which provides the interactive shell.
Interactive Session with More CPUs
srun -n1 --cpus-per-task=8 --pty --partition=scu-cpu --mem=32G bash -iInteractive GPU Session
srun -n1 --cpus-per-task=4 --pty --partition=scu-gpu --mem=16G --gres=gpu:1 bash -iEnd an Interactive Session
exitAlternatively, terminate the session from another terminal window:
scancel <job_id>GUI / X11 Sessions
To use a GUI, first connect to the SCU login host with X11 forwarding enabled. Then, request an interactive allocation with X11.
ssh -X cwid@scu-login01.med.cornell.edu
srun --x11 -n1 --pty --partition=scu-cpu --mem=8G bash -iVerify your X11 forwarding connection using this test utility:
xclockGood Practice
- Do not leave interactive sessions running overnight.
- Do not use interactive sessions for long production jobs.
- Cancel the session immediately when your work is done.