sinteractive

Interactive Jobs

sinteractive is a tiny wrapper on srun to create interactive jobs quickly and easily.
It allows you to get a shell on one of the nodes, with similar limits as you would do for a normal job.

Load the module file slurm/utils (EEMCS-HPC Cluster) or download the provided script below.

To use it, simply run:

sinteractive -c <num_cpus> --mem <amount_mem> --time <minutes> -p <partition>

You will then be presented with a new shell prompt on one of the compute nodes (run 'hostname' to see which!). From here, you can test out code in an interactive fashion as needs be.
Be advised though - not filling in the above fields will get you a shell with 1 CPU and 100Mb of RAM for 1 hour. This is useful for quick testing.

Additionally you can pass other parameters from the Slurm srun command.

The source of sinteractive is here :

sinteractive
#!/bin/bash
srun "$@" -I60 -N 1 -n 1 --pty bash -i