Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

comment in bash script processed by slurm

Tags:

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 [email protected]  echo "hello" 

Can I somehow comment out a #SBATCH line, e.g. the #SBATCH [email protected] in this script? Since the slurm instructions are bash comments themselves I would not know how to achieve this.

like image 920
user1981275 Avatar asked Oct 31 '16 16:10

user1981275


People also ask

How do you comment on Sbatch?

sbatch is used to submit a job script for later execution. Lines that begin with #SBATCH in all caps is treated as a command by Slurm. This means that to comment out a Slurm command, you need to append a second another pound sign # to the SBATCH command (#SBATCH means Slurm command, ##SBATCH means comment).

Does Slurm use bash?

Shebang The Shebang command tells the shell (which interprets UNIX commands) to interpret and run the Slurm script using the bash (Bourne-again shell) shell.

What is Sbatch command?

You use the sbatch command with a bash script to specify the resources you need to run your jobs, such as the number of nodes you want to run your jobs on and how much memory you'll need. Slurm then schedules your job based on the availability of the resources you've specified.

What is Slurm command?

Go back to Instructions. The Slurm Workload Manager, or more simply Slurm, is what Resource Computing uses for scheduling jobs on our cluster SPORC and the Ocho. Slurm makes allocating resources and keeping tabs on the progress of your jobs easy.


1 Answers

just add another # at the beginning.

##SBATCH --mail-user...

This will not be processed by Slurm

like image 86
Carles Fenoy Avatar answered Oct 27 '22 11:10

Carles Fenoy