Skip to content

Commit fab3660

Browse files
committed
adding script for gpu training
1 parent a521e1b commit fab3660

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

shell/submit.sbatch

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
#SBATCH --partition=gpu2
4+
#SBATCH --job-name=dtsc
5+
#SBATCH --nodes=1
6+
#SBATCH --gpus=1
7+
#SBATCH --ntasks-per-node=1
8+
#SBATCH --gpus-per-task=1
9+
#SBATCH --mem=32000
10+
#SBATCH --time=01:00:00
11+
#SBATCH --mail-user=ltomada@sissa.it
12+
#SBATCH --output=%x.o%j.%N
13+
#SBATCH --error=%x.e%j.%N
14+
15+
# Print job details
16+
NOW=`date +%H:%M-%a-%d/%b/%Y`
17+
echo '------------------------------------------------------'
18+
echo 'This job is allocated on '$SLURM_JOB_CPUS_PER_NODE' cpu(s)'
19+
echo 'Job is running on node(s): '
20+
echo $SLURM_JOB_NODELIST
21+
echo '------------------------------------------------------'
22+
#
23+
# ==== End of Info part (say things) ===== #
24+
#
25+
26+
cd $SLURM_SUBMIT_DIR
27+
export SLURM_NTASKS_PER_NODE=2 # due to Ulysses's bug
28+
29+
module load cuda/12.1
30+
conda init
31+
conda activate ~/miniconda3/envs/devtools_scicomp
32+
33+
# Run the script
34+
python scripts/run.py fit --config=experiments/config.yaml

0 commit comments

Comments
 (0)