haga/build.sbatch

29 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-04-21 13:24:39 +02:00
#!/usr/bin/env bash
#SBATCH --time=00:10:00
#SBATCH --partition=cpu
2024-05-21 20:18:42 +02:00
# 9 Experiments * 3 Datasets
2024-05-09 13:44:23 +02:00
#SBATCH --array=0-27
2024-05-21 20:18:42 +02:00
# ensure output exists, is a folder and is writable in your working directory
2024-05-09 13:44:23 +02:00
#SBATCH --output=./output/output_run_%a.txt
#SBATCH --error=./output/error_run_%a.txt
2024-05-21 20:18:42 +02:00
# run once for every node you plan to use
#SBATCH --nodelist=oc-compute02
2024-05-09 13:44:23 +02:00
#SBATCH --mem=2G
2024-05-21 20:18:42 +02:00
# list your branches
2024-05-09 13:44:23 +02:00
problems=("iris" "nurse" "german")
2024-05-21 20:18:42 +02:00
#9 Experiments
2024-05-09 13:44:23 +02:00
current_problem=${problems[(${SLURM_ARRAY_TASK_ID}/9)]}
2024-05-21 20:18:42 +02:00
#9 Experiments
2024-05-09 13:44:23 +02:00
current_variant=$(((${SLURM_ARRAY_TASK_ID}) % 9 + 1))
current_branch="${current_problem}_${current_variant}"
2024-05-21 20:18:42 +02:00
# ensure [full path to writable folder on node *] exists
git clone -b $current_branch --single-branch "[your git repo]" [full path to writable folder on node 1]/$current_branch
git clone -b $current_branch --single-branch "[your git repo]" [full path to writable folder on node 1]/$current_branch
#... for every node
2024-05-09 13:44:23 +02:00
srun bash -c "cd /data/$SLURMD_NODENAME/merljoha/$current_branch; nix develop --command stack --no-nix --system-ghc --no-install-ghc build"