First DAIC Job

Submit your first job to DAIC with SLURM and check the results.

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:

  1. Create a Python script script.py:

    script.py
    
    import time
    time.sleep(60)  # Simulate some work.
    print("Hello SLURM!")
       

  2. 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
       

  1. Submit the job:

    $ sbatch submit.sh
    Submitted batch job 9267828
    
  2. Monitor the job:

    $ squeue -u ${USER}
    JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)
    9267834       all submit.s <YourNetID>  R       0:18      1 grs1
    
  3. Check output files.

    $ cat slurm_<jobid>.out
    

    You should see:

    Hello SLURM!
    

Notes on this environment

To inspect cluster settings:

$ scontrol show partition
$ sacctmgr list qos format=Name,Priority,MaxWall