forked from junyanz/pytorch-CycleGAN-and-pix2pix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_pretrained.slurm
executable file
·47 lines (38 loc) · 1.3 KB
/
test_pretrained.slurm
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
41
42
43
44
45
46
47
#!/bin/sh
#SBATCH --partition=GPUQ
#SBATCH --gres=gpu:1
#SBATCH --account=ie-idi
#SBATCH --time=2-00:00:00
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=20
#SBATCH --mem=256000
#SBATCH --job-name="test_100"
#SBATCH --output=out/test_100.out
#SBATCH --mail-user=hmlangvi@stud.ntnu.no
#SBATCH --mail-type=ALL
WORKDIR=${SLURM_SUBMIT_DIR}
cd ${WORKDIR}
echo "We are running from this directory: $SLURM_SUBMIT_DIR"
echo "The name of the job is: $SLURM_JOB_NAME"
echo "The job ID is $SLURM_JOB_ID"
echo "The job was run on these nodes: $SLURM_JOB_NODELIST"
echo "Number of nodes: $SLURM_JOB_NUM_NODES"
echo "We are using $SLURM_CPUS_ON_NODE cores"
echo "We are using $SLURM_CPUS_ON_NODE cores per node"
echo "Total of $SLURM_NTASKS cores"
export CUDA_VISIBLE_DEVICES=0,1
echo "CUDA_VISIBLE DEVICES: $CUDA_VISIBLE_DEVICES"
CUDA_LAUNCH_BLOCKING=1
module purge
module load Python/3.9.6-GCCcore-11.2.0
# Create environment if it doesn't exist
if [ ! -d "env" ]; then
python3 -m venv env
fi
source env/bin/activate
# Install required dependencies
pip install --upgrade pip
echo "--------------Starting python script----------------"
python3 test.py --dataroot ./datasets/landscapes/A/Q2 --name photo2art_hedda_100 --model test --no_dropout --results_dir results/test_100
echo "-----------------------COMPLETE-------------------"
uname -a