Skip to content

Instantly share code, notes, and snippets.

@zbyerly
Created August 1, 2017 17:36
Show Gist options
  • Save zbyerly/461da96f264aa139cf25cc93d9441362 to your computer and use it in GitHub Desktop.
Save zbyerly/461da96f264aa139cf25cc93d9441362 to your computer and use it in GitHub Desktop.
Example slurm script for running KNL with mpi on TACC's Stampede2
#!/bin/bash
#----------------------------------------------------
# Sample SLURM job script
# for TACC Stampede2 KNL nodes
#
# *** MPI Job on Normal Queue ***
#
# Last revised: 27 Jun 2017
#
# Notes:
#
# -- Launch this script by executing
# "sbatch knl.mpi.slurm" on Stampede2 login node.
#
# -- Use ibrun to launch MPI codes on TACC systems.
# Do not use mpirun or mpiexec.
#
# -- Max recommended MPI tasks per KNL node: 64-68
# (start small, increase gradually).
#
# -- If you're running out of memory, try running
# fewer tasks per node to give each task more memory.
#
#----------------------------------------------------
#SBATCH -J myjob # Job name
#SBATCH -o myjob.o%j # Name of stdout output file
#SBATCH -e myjob.e%j # Name of stderr error file
#SBATCH -p normal # Queue (partition) name
#SBATCH -N 4 # Total # of nodes
#SBATCH -n 32 # Total # of mpi tasks
#SBATCH -t 01:30:00 # Run time (hh:mm:ss)
#SBATCH [email protected]
#SBATCH --mail-type=all # Send email at begin and end of job
#SBATCH -A myproject # Allocation name (req'd if you have more than 1)
# Other commands must follow all #SBATCH directives...
module list
pwd
date
# Launch MPI code...
ibrun ./mycode.exe # Use ibrun instead of mpirun or mpiexec
# ---------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment