Search code examples
bashcommentshpcslurm

comment in bash script processed by slurm


I am using slurm on a cluster to run jobs and submit a script that looks like below with sbatch:

#!/usr/bin/env bash

#SBATCH -o slurm.sh.out
#SBATCH -p defq
#SBATCH --mail-type=ALL
#SBATCH --mail-user=my.email@something.com

echo "hello"

Can I somehow comment out a #SBATCH line, e.g. the #SBATCH --mail-user=my.email@something.com in this script? Since the slurm instructions are bash comments themselves I would not know how to achieve this.


Solution

  • just add another # at the beginning.

    ##SBATCH --mail-user...

    This will not be processed by Slurm