#!/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%64)) + 1) K=$(expr $(($RANDOM%64)) + 1) C=$(expr $(($RANDOM%64)) + 1) H=$(expr $(($RANDOM%64)) + 1) W=$(expr $(($RANDOM%64)) + 1) R=$(expr $(($RANDOM%32)) + 1) S=$(expr $(($RANDOM%32)) + 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 $S -n 1 $N $C $H $W $K $R $S loop=$(expr $loop + 1) done