Have a Question?
Intro to Slurm Workload Manager
The ARC Cluster uses the Slurm Workload Manager to coordinate resource management and job scheduling. This ensures that the resources are allocated to all the user requests in an optimized manner.
The slurm scheduler allows the user to request a computer node (or nodes with the respective resources) to run their jobs. The scheduler also provides a framework which can be used to start, cancel, monitor or edit their submitted jobs. The scheduler keeps track of everyone and all the jobs to ensure that everyone can use all the requested resources without stepping on someone’s toe.
The scheduler works by first running jobs which require less resources. This means, the more resources (nodes, cores, memory, wall time) you request, the chances are the more time the scheduler is going to queue your job. The scheduler makes the allocation based on what you request, not by what you need. Requesting the right resources will help you avoid unnecessary queue time.
For more information regarding slurm scripts and figuring out your way around the workload manager, refer to this article.
Run interactive jobs
The salloc command in SLURM is used to allocate resources for an interactive job or a batch job. When you run salloc, it will allocate resources according to the options you specify, and then provide you with a shell environment that you can use to run commands or scripts.
Here’s an example of how to use the salloc command to allocate resources for an interactive job:
salloc --nodes=1 --ntasks-per-node=1 --time=1:00:00
This command will allocate one node with one task per node, and a maximum time limit of 1 hour. Once the resources are allocated, you will be given a shell prompt where you can run commands or scripts. Note that you should not exit the shell environment until you are finished with your job, as this will release the allocated resources.
You can also specify additional options with the salloc command to customize the resources allocated for your job, such as the amount of memory or the partition to use. For example, the following command requests 4 CPU cores and 8 GB of memory:
salloc --nodes=1 --ntasks-per-node=1 --cpus-per-task=4 --mem=8G --time=1:00:00
Once the requested resources are allocated, you can use the srun command with the --pty option. This will mount your file system and open a pseudo-terminal for your job on the allocated compute node. Now you can interact with it as if you were using a command prompt. Here is an example command:
srun --pty bash