Files
gitea-pages/docs/merlin7/03-Slurm-General-Documentation/slurm-examples.md
Hans-Nikolai Viessmann bde174b726 first stab at mkdocs migration
refactor CSCS and Meg content

add merlin6 quick start

update merlin6 nomachine docs

give the userdoc its own color scheme

we use the Materials default one

refactored slurm general docs merlin6

add merlin6 JB docs

add software support m6 docs

add all files to nav

vibed changes #1

add missing pages

further vibing #2

vibe #3

further fixes
2026-01-12 17:49:41 +01:00

2.2 KiB

title, keywords, last_updated, summary, sidebar, permalink
title keywords last_updated summary sidebar permalink
Slurm Examples slurm example, template, examples, templates, running jobs, sbatch, single core based jobs, HT, multithread, no-multithread, mpi, openmp, packed jobs, hands-on, array jobs, gpu 24 Mai 2023 This document shows different template examples for running jobs in the Merlin cluster. merlin7_sidebar /merlin7/slurm-examples.html

Single core based job examples

#!/bin/bash
#SBATCH --partition=hourly      # Using 'hourly' will grant higher priority
#SBATCH --ntasks-per-core=2     # Request the max ntasks be invoked on each core
#SBATCH --hint=multithread      # Use extra threads with in-core multi-threading
#SBATCH --time=00:30:00         # Define max time job will run
#SBATCH --output=myscript.out   # Define your output file
#SBATCH --error=myscript.err    # Define your error file

module purge
module load $MODULE_NAME # where $MODULE_NAME is a software in PModules
srun $MYEXEC             # where $MYEXEC is a path to your binary file

Multi-core based jobs example

Pure MPI

#!/bin/bash
#SBATCH --job-name=purempi
#SBATCH --partition=daily      # Using 'daily' will grant higher priority
#SBATCH --time=24:00:00        # Define max time job will run
#SBATCH --output=%x-%j.out     # Define your output file
#SBATCH --error=%x-%j.err      # Define your error file
#SBATCH --exclusive
#SBATCH --nodes=1
#SBATCH --ntasks=128
#SBATCH --hint=nomultithread
##SBATCH --cpus-per-task=1

module purge
module load $MODULE_NAME # where $MODULE_NAME is a software in PModules
srun $MYEXEC             # where $MYEXEC is a path to your binary file

Hybrid

#!/bin/bash
#SBATCH --job-name=hybrid
#SBATCH --partition=daily      # Using 'daily' will grant higher priority
#SBATCH --time=24:00:00        # Define max time job will run
#SBATCH --output=%x-%j.out     # Define your output file
#SBATCH --error=%x-%j.err      # Define your error file
#SBATCH --exclusive
#SBATCH --nodes=1
#SBATCH --ntasks=128
#SBATCH --hint=multithread
#SBATCH --cpus-per-task=2

module purge
module load $MODULE_NAME # where $MODULE_NAME is a software in PModules
srun $MYEXEC             # where $MYEXEC is a path to your binary file