Skip to content

cluster

DaminK edited this page Jun 9, 2022 · 1 revision

SLURM Script for Cluster Deployment

The following shell script decode.sh defines all required parameters for scheduling jobs through SLURM.

#!/usr/local_rwth/bin/zsh  
#SBATCH --job-name=Brain_Connectivity_Pipeline
#SBATCH --ntasks=1   
#SBATCH --cpus-per-task=8
#SBATCH --mem=60G
#SBATCH --mail-type=ALL
#SBATCH --mail-user=damin.kuehn@rwth-aachen.de
#SBATCH --time=10:00:00

source ~/miniconda3/etc/profile.d/conda.sh
conda activate snakemake
snakemake -j8 --use-conda --rerun-incomplete decoding_performances

It can be scheduled with sbatch decode.sh through SSH

Detailed:

Defines Shell for execution

#!/usr/local_rwth/bin/zsh  

Job Name

#SBATCH --job-name=Brain_Connectivity_Pipeline

Multithreading (with 1 instance of the pipeline having 8 available cores)
You can increase the number of CPUs as you like. Keep in mind that all CPUs must be on a single node in the cluster for multithreading. SLURM will tell you if no such node is available, so you don't have to worry about that.

#SBATCH --ntasks=1   
#SBATCH --cpus-per-task= 8  

RAM Usage (depending on Threads + Dataset Size)
Specifically the recursive feature elimination requires a lot of RAM, up to 30 GB for each core when decoding multiple sessions.

#SBATCH --mem=60G

Enables Mail notification

#SBATCH --mail-type=ALL
#SBATCH --mail-user=name@domain.com

Allocated Time frame
Jobs are killed after this time!

#SBATCH --time=10:00:00

Enables conda in shell and activates snakemake environment

source ~/miniconda3/etc/profile.d/conda.sh
conda activate snakemake

Call snakemake with desired rule (like local execution, detailed here)

snakemake -j8 --use-conda --rerun-incomplete decoding_performances

For Users

For Devs

    • Loading & Preprocessing
    • Parcellation
    • Filtering
    • Condition Extraction
    • Feature Calculation
    • Recursive Feature Elimination
    • Deconding
    • Plotting
Clone this wiki locally