33 lines
1.4 KiB
Markdown
33 lines
1.4 KiB
Markdown
---
|
|
title: Slurm Examples
|
|
#tags:
|
|
keywords: 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
|
|
last_updated: 24 Mai 2023
|
|
summary: "This document shows different template examples for running jobs in the Merlin cluster."
|
|
sidebar: merlin7_sidebar
|
|
permalink: /merlin7/slurm-examples.html
|
|
---
|
|
|
|
{:style="display:block; margin-left:auto; margin-right:auto"}
|
|
|
|
{{site.data.alerts.warning}}The Merlin7 documentation is <b>Work In Progress</b>.
|
|
Please do not use or rely on this documentation until this becomes official.
|
|
This applies to any page under <b><a href="https://lsm-hpce.gitpages.psi.ch/merlin7/">https://lsm-hpce.gitpages.psi.ch/merlin7/</a></b>
|
|
{{site.data.alerts.end}}
|
|
|
|
## Single core based job examples
|
|
|
|
```bash
|
|
#!/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
|
|
```
|