forked from artificial-scientist-lab/Differometor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbatch-script.sh
More file actions
executable file
·40 lines (32 loc) · 1.83 KB
/
batch-script.sh
File metadata and controls
executable file
·40 lines (32 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# Sample Slurm job script for Galvani
#SBATCH -J differometor # Job name
#SBATCH --ntasks-per-node=1 # Number of tasks
#SBATCH --cpus-per-task=8 # Number of CPU cores per task
#SBATCH --nodes=1 # Ensure that all cores are on the same machine with nodes=1
#SBATCH --partition=a100-galvani # Which partition will run your job
#SBATCH --time=0-02:30
#SBATCH --gres=gpu:1 # (optional) Requesting type and number of GPUs
#SBATCH --mem=50G # Total memory pool for all cores (see also --mem-per-cpu); exceeding this number will cause your job to fail.
#SBATCH --output=./jobfiles_out/myjob-%j.out # File to which STDOUT will be written - make sure this is not on $HOME
#SBATCH --error=./jobfiles_err/myjob-%j.err # File to which STDERR will be written - make sure this is not on $HOME
#SBATCH --mail-type=END,FAIL # Type of email notification- BEGIN,END,FAIL,ALL
#SBATCH --mail-user=laurin.sefa@student.uni-tuebingen.de # Email to which notifications will be sent
# Diagnostic and Analysis Phase - please leave these in.
scontrol show job $SLURM_JOB_ID
pwd
# nvidia-smi # only if you requested gpus
# ls $WORK # not necessary just here to illustrate that $WORK is available here
# Setup Phase
# add possibly other setup code here, e.g.
# - copy singularity images or datasets to local on-compute-node storage like /scratch_local
# - loads virtual envs, like with anaconda
# - set environment variables
# - determine commandline arguments for `srun` calls
source $WORK/Differometor/.venv/bin/activate
# Compute Phase
srun python -m optimization.examples.voyager_benchmark
# Profiling:
# srun python -m cProfile -o profile_output.prof -m optimization.examples.voyager_bo
# For interactive session:
# srun -p 2080-galvani --gres=gpu:1 --pty bash -I