Wrapper that enables GNU Make to make use of a Slurm cluster.
A normal Makefile
can be used by overriding the SHELL
variable.
make "SHELL=./wrapper" -j 100
Alternatively, this can be set in the Makefile
itself.
SHELL := ./wrapper
The SBATCH
environment variable can be used for setting default sbatch
options.
export SBATCH="--mem=1G"
Alternatively, this can be set in the Makefile
itself.
export SBATCH := --mem=1G
Defaults can be overridden per rule using the SBATCH
variable.
SBATCH="--mem=2G" mycommand
Rules that start with a definition of the LOCAL
variable are executed
locally.
LOCAL="true" mycommand