IQSS / IQSS-slurm-examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IQSS-slurm-examples

This repository has been added to this one: https://github.com/fasrc/User_Codes so this original will no longer be developed.

It will be archived for that reason.

This repository includes "Hello World" scripts to run IQSS statistics packages on a slurm cluster.

  • Bash
  • Julia
  • Matlab
  • Mathematica
  • Python 2
  • Python 3
  • R
  • SAS
  • Stata

Scripts for submitting jobs to slurm can specify slurm settings starting at the beginning of the script.

  • They must come after the initial shebang (!#) line if there is one.
  • The lines should begin with #SBATCH.
  • #SBATCH settings should come before any comments or they may not work.
  • %x is the name of the file used to submit the job
  • %j is the job id number
  • when running a job array, %A is the overall job id, %a is the array index number

Typical #SBATCH lines include:

#SBATCH -n 1 # Number of cores requested; default: 1

#SBATCH -N 1 # Ensure that all cores are on one machine; default: unset- causes poor performance

#SBATCH -t 15 # Runtime in minutes; job killed after this amount of time; default: 10

#SBATCH -p serial_requeue # Partition to submit to; default: serial_requeue

#SBATCH --mem=4000 # 4GB; Memory shared across all cores in MB (see also –mem-per-cpu)

#SBATCH --open-mode=append; default: overwrite

#SBATCH -o %x_%j.out # Standard out goes to this file; default: slurm-JOBID.out

#SBATCH -e %x_%j.err # Standard err goes to this file; default: slurm-JOBID.err

More info here:

More complex examples can be found here:

https://github.com/fasrc/User_Codes

About


Languages

Language:Shell 93.2%Language:R 3.1%Language:SAS 1.0%Language:Python 0.9%Language:MATLAB 0.8%Language:Stata 0.5%Language:Julia 0.4%