I'm a cancer researcher and we were wondering if any of you knew how to make a SLURM script that calls other slurms. If the previous script finished successfully, continue to the next call. I.E something like:
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --tasks-per-node=1
#SBATCH --time=24:00:00
#SBATCH --mem=40GB?
#SBATCH --job-name=Master_script
#call first slurm
sbatch a.slurm
#if it completes successfully
if a.slurm:
sbatch b.slurm
if b.slurm:
sbatch c.slurm
sbatch d.slurm
if c.slurm:
sbatch e.slurm
else:
echo "c.slurm did not complete successfully"
else:
echo "b.slurm did not complete successfully"
else:
echo "a.slurm did not complete successfully"