chundoong-lab-ta/SamsungDS22/submissions/final/minseok_5.oh/A/val.sh

44 lines
902 B
Bash
Raw Normal View History

2022-09-29 18:01:45 +09:00
#!/bin/bash
limit=${1:-1}
loop=0
while [ $loop -lt $limit ]
do
# D: 1~5
# P: 0~10
# S: 1~5
# NODE: 1~2
D=$(expr $(($RANDOM%5)) + 1)
P=$(expr $(($RANDOM%11)))
S=$(expr $(($RANDOM%5)) + 1)
NODES=$(expr $(($RANDOM%2)) + 1)
# N C H W K R S
# : 1~1024
N=$(expr $(($RANDOM%256)) + 1)
K=$(expr $(($RANDOM%256)) + 1)
C=$(expr $(($RANDOM%256)) + 1)
H=$(expr $(($RANDOM%256)) + 1)
W=$(expr $(($RANDOM%256)) + 1)
#R=$(expr $(($RANDOM%1024)) + 1)
#S=$(expr $(($RANDOM%1024)) + 1)
R=16
S=16
if [ $(expr $H + 2 \* $P) -lt $(expr $D \* \( $R - 1 \) + 1) ]
then
continue
fi
if [ $(expr $W + 2 \* $P) -lt $(expr $D \* \( $S - 1 \) + 1) ]
then
continue
fi
# order of parameters: N C H W K R S
source ./run.sh -v -d $D -p $P -s $S -n 1 $N $C $H $W $K $R $S
loop=$(expr $loop + 1)
done