forked from mfatihaktas/deep-scheduler
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·78 lines (72 loc) · 2.41 KB
/
run.sh
File metadata and controls
executable file
·78 lines (72 loc) · 2.41 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
echo $1 $2 $3
PY=python3
if [ $1 = 'i' ]; then
source ~/tensorflow/bin/activate
elif [ $1 = 'mm' ]; then
FILE='model_checking_wmpi'
NTASKS=20
echo "#!/bin/bash
#SBATCH --partition=main # Partition (job queue)
#SBATCH --job-name=$FILE
#SBATCH --nodes=$NTASKS # Number of nodes you require
#SBATCH --ntasks=$NTASKS # Total # of tasks across all nodes
#SBATCH --cpus-per-task=1 # Cores per task (>1 if multithread tasks)
#SBATCH --mem=4000 # Real memory (RAM) required (MB)
#SBATCH --time=24:00:00 # Total run time limit (HH:MM:SS)
#SBATCH --export=ALL # Export your current env to the job env
#SBATCH --output=logmodel/$FILE.%N.%j.out
export MV2_ENABLE_AFFINITY=0
srun --mpi=pmi2 python3 $PWD/$FILE.py
" > jscript.sh
rm logmodel/*
sbatch jscript.sh
elif [ $1 = 'me' ]; then
FILE='experience_replay'
NTASKS=1
echo "#!/bin/bash
#SBATCH --partition=main # Partition (job queue)
#SBATCH --job-name=$FILE
#SBATCH --nodes=$NTASKS # Number of nodes you require
#SBATCH --ntasks=$NTASKS # Total # of tasks across all nodes
#SBATCH --cpus-per-task=1 # Cores per task (>1 if multithread tasks)
#SBATCH --mem=8000 # Real memory (RAM) required (MB)
#SBATCH --time=24:00:00 # Total run time limit (HH:MM:SS)
#SBATCH --export=ALL # Export your current env to the job env
# #SBATCH --output=loglearning/$FILE.ro$2.slen3.node%N.jid%j.out
#SBATCH --output=loglearning/$FILE.ro$2.slen2.out
export MV2_ENABLE_AFFINITY=0
srun --mpi=pmi2 python3 $PWD/$FILE.py --ro $2
" > jscript.sh
sbatch jscript.sh
# elif [ $1 = 'den' ]; then
# echo "den $2"
elif [ $1 = 'ame' ]; then
# rm loglearning/* save_expreplay/*
for ro in $(seq 0.1 0.1 0.9)
do
echo "Launching MPI experience_replay for ro=$ro"
./run.sh me $ro
sleep 1
done
elif [ $1 = 's' ]; then
# $PY sim_exp.py
$PY sim_wrelaunch_exp.py
elif [ $1 = 'e' ]; then
# rm save_expreplay/*
$PY experience_replay.py --ro=0.1
# nohup $PY experience_replay.py > experience_replay.out 2>&1 &
elif [ $1 = 'd' ]; then
$PY drl_plots.py
elif [ $1 = 'r' ]; then
# $PY rlearning.py
# $PY redsmall_plots.py
$PY relaunch_plot.py
elif [ $1 = 'm' ]; then
$PY modeling.py
# $PY model_checking.py
elif [ $1 = 'n' ]; then
$PY numeric_comparison.py
else
echo "Arg did not match!"
fi