Sometimes you may want to run some test code on a compute node, or compile something interactively on a compute node to ensure that your code works as intended before running the main job.
You can request a short-term interactive shell session by running the following from a login node:
$ srun --pty --partition=bigmem /bin/bash
This will queue a request for a BASH session on a node in the bigmem partition and the command will pause until the request is granted. Usually you will get a session opened within a few seconds, but this may take longer in periods of intense activity. Once the session is started you can run normal commands on that node, just as you would on a login node, including loading software modules. To exit the session, simply use the Control-D key combination, or type 'exit', as you would with any other shell. You will then be returned to the login node from where you requested that session.
If you need a session on a partition which is only accessible to projects with funds, then remember to include your account / project code in the request:
$ srun --pty --account=myhpc_group --partition=GPU-L /bin/bash
This requests a session on the GPU-L partition, with resource use billed against the myhpc_group HPC Project account.
You can request an interactive session on a specific node from a given partition with the -w option to srun:
-w
srun
$ srun --pty --account=myhpc_group -w compute23 --partition=default_free /bin/bash
This requests a session on node compute23 of the default_free partition. Do note that there may be times when one or more nodes are under maintenance and not available, so you should always check with sinfo before you attempt to request a specific node.
For further info on srun, check out our Introduction to Slurm pages.
Back to FAQ
Table of Contents
Main Content Sections
Documentation Tools