Skip to content

Interactive Jobs

Take note

There is no need to supply a QOS for priortised queues.

Users may request for an interactive console to troubleshoot your work. The console requires you to be constantly connected to the server. Upon discconection, you will lose your session and all unsaved work.

To request for an interactive GPU session from the login node –

srun --pty --qos=<QOS-NAME> --partition=<PARTITION-ASSIGNED> --gres=gpu:1 -c=<CORE-COUNT> --mem=<MEMORY-NEEDED> bash

In the example below. We will request for an interactive job with 1 GPU. Notice how the hostname changes from origami to amgio. This shows that you have successfully requested for a GPU. To verify this, you can execute the command nvidia-smi to find out more information on the assigned GPU.

Example –

[IS000G3@origami ~]$ srun --pty --qos=research-1-qos --partition=researchshort --gres=gpu:1 -c 10 --mem=64GB bash
[IS000G3@amigo ~]$ nvidia-smi

Launching notebooks

While in the compute node, users may launch a GPU notebook with the following command (asumming the relevant packages are installed) –

jupyter notebook --no-browser --ip=0.0.0.0 --port=<RANDOM PORT BETWEEN 50000 and 65000>

The compute nodes are not accessible outside of the GPU cluster. To access these notebooks, a SSH tunnel is required.

Example –

1
2
3
4
5
6
7
[IS000G3@amigo ~]$ source notebook-test/bin/activate
(notebook-test) [IS000G3@amigo ~]$ jupyter notebook --no-browser --ip=0.0.0.0 --port=53426
(notebook-test) [IS000G3@amigo ~]$ .... output reducted
[I 2023-09-11 15:13:34.157 ServerApp] Jupyter Server 2.7.3 is running at:
[I 2023-09-11 15:13:34.157 ServerApp] http://amigo:53426/tree?token=370d5288148c34a36e039c38e01b65e8e50d6ccab9a102bd
[I 2023-09-11 15:13:34.157 ServerApp] http://127.0.0.1:53426/tree?token=370d5288148c34a36e039c38e01b65e8e50d6ccab9a102bd
[I 2023-09-11 15:13:34.157 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

In the above example, the notebook is running on compute node amgio. To establish a SSH Tunnel with amigo, open a new local powershell or terminal window and execute the sample command below. You will need to provide the port number defined earlier and your username. When executing the command you will be prompted for your password. Do not close the powershell/terminal window after logging in, the window needs to remain open throughout the session.

ssh -N -vv -L <PORT-USED-IN-PREVIOUS-COMMAND>:<NODENAME>:<PORT-USED-IN-PREVIOUS-COMMAND> <USERNAME>@origami.smu.edu.sg

Example –

1
2
3
[user@macbook ~]$ ssh -N -vv -L 53426:amigo:53426 IS000G3@origami.smu.edu.sg
output redacted...
IS000G3@origami.smu.edu.sg's password:

After establishing the SSH Tunnel, open a local browser on your computer and point it to the URL provided in the output of the notebook. In this scenario, it is http://127.0.0.1:53426/tree?token=370d5288148c34a36e039c38e01b65e8e50d6ccab9a102bd