49 lines
1.0 KiB
Bash
49 lines
1.0 KiB
Bash
|
#!/bin/bash
|
||
|
|
||
|
|
||
|
: ${NODES:=2}
|
||
|
|
||
|
salloc -N $NODES --exclusive \
|
||
|
mpirun --bind-to none -mca btl ^openib -npernode 1 \
|
||
|
numactl --physcpubind 0-39 \
|
||
|
./main $@
|
||
|
|
||
|
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%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%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
|