Skip to content
Snippets Groups Projects
Commit ac7dbd7f authored by Francois Ledoyen's avatar Francois Ledoyen
Browse files

add slurm real time debugging

parent e1a826a9
No related branches found
No related tags found
No related merge requests found
Pipeline #26875 passed
File moved
label: "Utilisation HPC"
label: "HPC guide"
icon: ":computer:"
File moved
---
order: 1
---
# SLURM guide
## Debug in Real-time on SLURM
Debugging a code by submitting jobs to a supercomputer is an inefficient
process. It goes something like this :
1. Submit job and wait in queue.
1. Check for errors/change code.
1. Repeat endlessly until your code works.
Fortunately, there’s a better way, you can debug in real-time like so:
1. Request a debugging or interactive node and wait in queue :
```sh
srun --partition=<name> --nodes=1 --ntasks-per-node=1 --time=<time> --pty bash -i
```
1. This is how it looks once the interactive job starts :
```sh
srun: job 12345 queued and waiting for resources
srun: job 12345 has been allocated resources
```
1. Check for errors/change code continuously until code is fixed or node has
timed out.
> source :
> https://hpc-uit.readthedocs.io/en/latest/jobs/interactive.html#starting-an-interactive-job
---
label: "Slurm"
---
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment