Running a simple serial test job
This job is very simple; it just sleeps for 60 seconds.
There are sample job submission scripts available to you in the following path
/opt/examples/slurm. We will copy one of these to our home directory, and submit it in this example.
$ cp /opt/examples/slurm/serial-job.sh ~/serial-job.sh
#!/bin/bash # Which partition/queue does this job need to run in. Default is 'hsw-fdr' #SBATCH --partition=hsw-fdr # How long does my job have to run (HH:MM:SS), # without this option limit is # 5min #SBATCH --time=01:00:00 # This is memory need per task (see above). If not specified you will get # 3GB of RAM per cpu. #SBATCH --mem-per-cpu=1G # The descriptive name for your job this potentially will be visible to other # users on ACTnowHPC #SBATCH --job-name=serial_test # the name of the file to write stdout/stderr to. Use %j as a place holder # for the current job number #SBATCH --output=serial_test-%j.out echo "I've start my serial job it's running on" hostname echo "Sleeping for 60 seconds" sleep 60
Options used in this job submission script
|Run in the hsw-fdr partition|
|Run for 1 hour|
|I will need 1GB of RAM for my job|
|I'm naming my job "serial_test"|
|Write all the output to a file called |
To run the job issue the following command
$ sbatch serial-job.sh Submitted batch job 1520
Check the status of the job
Check the status with squeue (more info Basic SLURM commands).
$ squeue --job 1520