Requesting resources with salloc - ryandkuster/EPP_575_RNA_25 GitHub Wiki

Requesting resources using salloc

When learning to use a HPC environment with a resource manager (e.g. slurm), it can be a useful intermediate to run an interactive environment instead of running as a batch job (not interactive).

Create a bash script called request_salloc.sh with the following salloc command:

#!/bin/bash

salloc --account isaac-UTK0386 \
       --partition=short \
       --qos=short \
       --nodes=1 \
       --ntasks=4 \
       --mem=5G \
       --time=0-02:30:00

Save it, then run the bash script:

bash request_salloc.sh

Standard out will display output in the following form:

salloc: Pending job allocation 1562131
salloc: job <number> queued and waiting for resources
salloc: job <number> has been allocated resources
salloc: Granted job allocation <number>
salloc: Waiting for resource configuration
salloc: Nodes <nodeid> are ready for job

Congratulations, your node is now ready for an interactive session!

To interact with your node:

ssh <nodeid>

Your shell prompt should no longer read login1 or login2, and should now show your node name. You are also automatically in your home directory, so be sure to change to where you'd like to be.

To leave the shell, simply type the command exit and hit enter.

To check the status of your slurm requests, you can run:

squeue -u <your_username>
⚠️ **GitHub.com Fallback** ⚠️