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.
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).
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.
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.
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.
just add another #
at the beginning.
##SBATCH --mail-user...
This will not be processed by Slurm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With