43 lines
888 B
Bash
Executable File
43 lines
888 B
Bash
Executable File
#!/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)))
|
|
ST=$(expr $(($RANDOM%5)) + 1)
|
|
NODE=1
|
|
#NODES=$(expr $(($RANDOM%2)) + 1)
|
|
|
|
# N C H W K R S
|
|
# : 1~1024
|
|
N=$(expr $(($RANDOM%128)) + 1)
|
|
K=$(expr $(($RANDOM%128)) + 1)
|
|
C=$(expr $(($RANDOM%128)) + 1)
|
|
H=$(expr $(($RANDOM%128)) + 1)
|
|
W=$(expr $(($RANDOM%128)) + 1)
|
|
R=$(expr $(($RANDOM%128)) + 1)
|
|
S=$(expr $(($RANDOM%128)) + 1)
|
|
|
|
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 $ST -n 1 $N $C $H $W $K $R $S
|
|
|
|
loop=$(expr $loop + 1)
|
|
done
|