Using the queue system on skd-cyclone: Difference between revisions

From gfi
Line 8: Line 8:
== Short tutorial ==
== Short tutorial ==


# create a basic wrapper script for your job
1. create a basic wrapper script for your job


<pre>
<pre>
# SLURM wrapper script
  # SLURM wrapper script
# start this job with sbatch NAME_OF_THIS_FILE directly on the machine
  # start this job with sbatch NAME_OF_THIS_FILE directly on the machine


#SBATCH --job-name=my_slurm_job
  #SBATCH --job-name=my_slurm_job
#SBATCH --workdir=/scratch/$USER
  #SBATCH --workdir=/scratch/$USER
#SBATCH --partition=default
  #SBATCH --partition=default
#SBATCH --output=results.%j.txt
  #SBATCH --output=results.%j.txt
#SBATCH --error=errors.%j.out
  #SBATCH --error=errors.%j.out
#SBATCH --mail-type=END
  #SBATCH --mail-type=END
#SBATCH --time=12:00:00
  #SBATCH --time=12:00:00
#SBATCH --mem-per-cpu=100
  #SBATCH --mem-per-cpu=100


<apply any required path settings>
  <apply any required path settings>
<change to your working directory>
  <change to your working directory>
<command to start your job>
  <command to start your job>


# done
  # done
</pre>
  </pre>


# submit the script
2. submit the script


<code>sbatch ./my_queue_job.sh</code>
<code>sbatch ./my_queue_job.sh</code>


# receive an email
3. receive an email when the job is finished
 
<pre>
From: slurm@klientdrift.uib.no
To: <username>@uib.no
Subject: SLURM Job_id=34 Name=WaterSip3.0 Ended, Run time 00:01:00
</pre>


== Converting a script to a queue script ==
== Converting a script to a queue script ==

Revision as of 10:01, 1 November 2016

General information

  1. Purpose
  2. Advantages
  3. Disadvantages
  4. Rules and procedures

Short tutorial

1. create a basic wrapper script for your job

  # SLURM wrapper script
  # start this job with sbatch NAME_OF_THIS_FILE directly on the machine

  #SBATCH --job-name=my_slurm_job
  #SBATCH --workdir=/scratch/$USER
  #SBATCH --partition=default
  #SBATCH --output=results.%j.txt
  #SBATCH --error=errors.%j.out
  #SBATCH --mail-type=END
  #SBATCH --time=12:00:00
  #SBATCH --mem-per-cpu=100

  <apply any required path settings>
  <change to your working directory>
  <command to start your job>

  # done
  

2. submit the script

sbatch ./my_queue_job.sh

3. receive an email when the job is finished

From: slurm@klientdrift.uib.no
To: <username>@uib.no
Subject: SLURM Job_id=34 Name=WaterSip3.0 Ended, Run time 00:01:00

Converting a script to a queue script

  1. add elements to the header

Description of each element

  1. parameters explained in short

Best practices, Q&A

Further information

  1. Contacts
  2. Links