DAIC Experimental
— Documentation for the experimental environment.
(Go to stable docs)
First DAIC Job
Submit your first job to DAIC with SLURM and check the results.
2 minute read
Before you begin
You should already be logged in to DAIC. If not, complete First Login.
Example: submit a simple job
To submit a Python script using SLURM:
Create a Python script
script.py:script.pyimport time time.sleep(60) # Simulate some work. print("Hello SLURM!")Create a SLURM submission script
submit.sh:submit.sh#!/bin/sh #SBATCH --partition=all # Request partition #SBATCH --time=0:05:00 # Run time limit (wall-clock) #SBATCH --ntasks=1 # Number of tasks #SBATCH --cpus-per-task=2 # CPUs per task #SBATCH --mem=1GB # Memory #SBATCH --mail-type=END # Get email notification when job ends #SBATCH --output=slurm_%j.out # Output file # Run your script with the `srun` command: srun python script.py
Important
Always usesrun inside your batch script. It ensures your program runs on the allocated resources.GPU jobs
To request a GPU, add:
#SBATCH --gres=gpu:1 # Request 1 GPU for your job (any type)
Submit the job:
$ sbatch submit.sh Submitted batch job 9267828Monitor the job:
$ squeue -u ${USER} JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) 9267834 all submit.s <YourNetID> R 0:18 1 grs1Check output files.
$ cat slurm_<jobid>.outYou should see:
Hello SLURM!
Notes on this environment
To inspect cluster settings:
$ scontrol show partition
$ sacctmgr list qos format=Name,Priority,MaxWall
Partition and QoS
- The default partition is
all. Other partitions are available depending on your account. - Only the
normalQoS is available. Thus, you can omit#SBATCH --qosunless instructed otherwise.