forked from divvun/lang-sme-ml-speech
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_prepare.sh
executable file
·29 lines (25 loc) · 963 Bytes
/
run_prepare.sh
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
#!/bin/bash
#SBATCH --job-name=TestGPUOnSaga
#SBATCH --account=nn9866k
#SBATCH --time=00:05:00
#SBATCH --mem-per-cpu=512M
#SBATCH --partition=accel
#SBATCH --gres=gpu:1
## Set up job environment:
set -o errexit # Exit the script on any error
set -o nounset # Treat any unset variables as an error
module --quiet purge # Reset the modules to the system default
module load PyTorch/1.4.0-fosscuda-2019b-Python-3.7.4
# We got all the dependencies loaded for PyTorch but we don't want this version
# so unload it.
module unload PyTorch/1.4.0-fosscuda-2019b-Python-3.7.4
module list
source $SLURM_SUBMIT_DIR/env/bin/activate
# Setup monitoring
nvidia-smi --query-gpu=timestamp,utilization.gpu,utilization.memory \
--format=csv --loop=1 > "gpu_util-$SLURM_JOB_ID.csv" &
NVIDIA_MONITOR_PID=$! # Capture PID of monitoring process
# Run our computation
python train_tacotron.py --force_align
# After computation stop monitoring
kill -SIGINT "$NVIDIA_MONITOR_PID"