-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmk_testplan.sh
executable file
·75 lines (56 loc) · 1.8 KB
/
mk_testplan.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
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
#!/bin/bash
#set -x
#
# Copyright 2019-2023 Saul Alonso Monsalve, Felix Garcia Carballeira, Jose Rivadeneira Lopez-Bravo, Alejandro Calderon Mateos,
#
# This file is part of DaLoFlow.
#
# DaLoFlow is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# DaLoFlow is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with DaLoFlow. If not, see <http://www.gnu.org/licenses/>.
#
#
# Params
#
SIZES="32 128"
N_IMG_TRAIN="1000000"
N_IMG_TEST="1000"
N_NODES=4
N_PROCESS="1 2 4 8"
N_CONVS="1 10 50"
#
# Main
#
# build datasets...
echo ": : Building dataset..."
for S in $SIZES; do
DIR_NAME="dataset"$S"x"$S
if [ ! -d $DIR_NAME ]; then
echo ": Dataset for "$N_IMG_TRAIN" images of "$S"x"$S" pixels..."
echo " python3 mk_dataset.py --height $S --width $S --ntrain $N_IMG_TRAIN --ntest $N_IMG_TEST"
fi
done
# build datasets...
echo ": : Work session..."
echo ./daloflow.sh swarm-start $N_NODES
for CONVS in $N_CONVS; do
for NP in $N_PROCESS; do
for S in $SIZES; do
DIR_NAME="dataset"$S"x"$S
let IPART=$NP*$CONVS
let ITERS=52000/$IPART
echo ": Testing dataset $DIR_NAME with $NP processes on $N_NODES nodes..."
echo " ./daloflow.sh mpirun $NP \"python3 ./do_tf2kp_mnist.py --height $S --width $S --path $DIR_NAME --iters $ITERS --convs $CONVS\" |& grep -v \"Read -1\""
done
done
done
echo ./daloflow.sh swarm-stop