Slurm - vsevolod-ivanov/Ivanov-Group-Wiki GitHub Wiki
Jobs on TinkerCliffs are managed by a job scheduler software called Slurm. This means that when you run a calculation, you submit a job script with instructions about how your code should be run, and your job gets placed into a queue with other jobs submitted by other people. Based on various factors (see below), Slurm decides when to allocate computational resources to you and allow your job to start running.
Here is a nice tutorial on Slurm and its commands: https://hpc.lll.gov/banks-jobs/running-jobs/slurm-quick-start-guide
To launch your job use the command:
sbatch my_job.sh
To monitor how the job is running (this will list all of your jobs and their status):
squeue –me
You can also see all of the jobs currently running on the cluster and in the queue using:
squeue
Our computing allocation has a certain number of hours allocated per month. To see how much computational time you have used:
sreport cluster accountutilizationbyuser start=2022-07-01 end=2024-07-14 users=name
Display information about a completed job:
sacct -l -j <job id>
sacct --format="Elapsed" -j <job id>
Display jobs in a time window:
sacct -S mm/dd/yy -E mm/dd/yy
Here is what a basic job script looks like to run VASP on CPUs:
#! /bin/bash
#
#SBATCH -t 10:00
#SBATCH -n 8
#SBATCH -p normal_q
#SBATCH --account=vtqm
#
module reset
module load vasp/6.4.2
#
echo "VASP_TINKERCLIFFS ROME: Normal beginning of execution."
mpirun -np 8 /bin/bash -c "ulimit -s unlimited; vasp_std"
if [ $? -ne 0 ]; then
echo "VASP_TINKERCLIFFS ROME: Run error!"
exit 1
fi
echo "VASP_TINKERCLIFFS ROME: Normal end of execution."
exit 0
The first line, "#! /bin/bash", denotes that this is a bash script (must be at the start of every bash script file). The subsequent lines starting with # SBATCH communicate various parameters of your job script to Slurm, including the time, the number of nodes, which queue to use, and the account to charge the compute hours to (this is our group account, vtqm).
For a list of queues and other information about TinkerCliffs, see the documentation.