Interactive mode allows us to introduce instructions from the terminal in real time, and follow their execution, as opposed to instructions in a batch file.

Interactive mode is most suited to compiling, testing and debugging your code, or for complex sets of instructions where you need to inspect the intermediate results or states. Unlike normal logging-in, interactive sessions do spend computational hours, according to the time the job is running.

This kind of job is requested using the salloc command.

Please, note that interactive sessions are still jobs managed by the SLURM system, and that they will be on queue until suitable resources can be gathered - make sure to check queue (squeue) and host availability (system-status) to avoid endlessly waiting for your interactive session to go through.


For instance, a simple job could be:

salloc -t 0-01:00

will run an interactive session during 1 h, using 1 CPU on the stardard partition.


The typical configuration for compiling request more than 1 CPU to compile in parallel and reduce the required time:

salloc -t 0-01:00 -n 4


To exit the interactive session, simply use

exit