2018-10-24 09:12:52 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
function force_exit {
|
|
|
|
echo "Committing suicide (PID $$)"
|
|
|
|
exit
|
|
|
|
}
|
|
|
|
|
|
|
|
trap force_exit SIGINT
|
|
|
|
|
2018-11-13 07:35:25 +00:00
|
|
|
. ./config.sh
|
|
|
|
|
2018-10-24 09:12:52 +00:00
|
|
|
|
|
|
|
|
2018-11-13 15:07:38 +00:00
|
|
|
for COUNT in ${COUNT_ARR[@]}; do
|
2018-10-24 09:12:52 +00:00
|
|
|
for TYPE in ${TYPE_ARR[@]}; do
|
|
|
|
for NN in ${NN_ARR[@]}; do
|
|
|
|
for T in ${T_ARR[@]}; do
|
|
|
|
for PPN in ${PPN_ARR[@]}; do
|
|
|
|
for API in ${API_ARR[@]}; do
|
2018-11-14 11:27:24 +00:00
|
|
|
BENCHFILE="./output_v2/COUNT:$COUNT-NN:$NN-PPN:$PPN-API:$API-T:$T-TYPE:$TYPE.txt"
|
2018-10-24 09:12:52 +00:00
|
|
|
|
2018-11-14 11:27:24 +00:00
|
|
|
if [ ! -e "${BENCHFILE}" ]; then
|
2018-11-13 07:35:25 +00:00
|
|
|
OUTDIR="$(dirname $BENCHFILE)"
|
|
|
|
[ ! -d $OUTDIR ] && mkdir $OUTDIR
|
2018-10-24 09:12:52 +00:00
|
|
|
touch $BENCHFILE
|
|
|
|
|
|
|
|
if [[ "read" == $TYPE ]]; then
|
2018-11-14 11:27:24 +00:00
|
|
|
IOR_TYPE_OPTS="-r -E -k"
|
2018-11-13 07:35:25 +00:00
|
|
|
LUSTRE_TESTFILE="$TD/sharedread$NN/file"
|
|
|
|
TESTDIR="$(dirname $LUSTRE_TESTFILE)"
|
|
|
|
lfs getstripe $TESTDIR | tee -a $BENCHFILE
|
2018-10-24 09:12:52 +00:00
|
|
|
elif [[ "write" == $TYPE ]]; then
|
|
|
|
IOR_TYPE_OPTS="-w"
|
2018-11-14 11:27:24 +00:00
|
|
|
LUSTRE_TESTFILE="$TD/sharedwrite$NN/file"
|
2018-10-24 09:12:52 +00:00
|
|
|
TESTDIR="$(dirname $LUSTRE_TESTFILE)"
|
2018-11-14 11:27:24 +00:00
|
|
|
[ -d $TESTDIR ] && rm -r $TESTDIR
|
|
|
|
mkdir -p $TESTDIR
|
2018-10-24 09:12:52 +00:00
|
|
|
lfs setstripe -c $((2 * $NN)) $TESTDIR
|
|
|
|
lfs getstripe $TESTDIR | tee -a $BENCHFILE
|
|
|
|
fi
|
|
|
|
|
2018-11-13 14:48:24 +00:00
|
|
|
IOR_PARAMS="-i 1 "
|
2018-11-14 11:27:24 +00:00
|
|
|
IOR_PARAMS+="-s 1 -t $T -b $(($DATASIZE / $PPN)) "
|
2018-11-13 07:35:25 +00:00
|
|
|
IOR_PARAMS+="-D 60 -O stoneWallingWearOut=1 "
|
|
|
|
IOR_PARAMS+="-a $API "
|
2018-11-14 11:27:24 +00:00
|
|
|
#IOR_PARAMS+="-p " # preallocate -- preallocate file size
|
|
|
|
#IOR_PARAMS+="-e " # fsync -- perform sync operation after each block write
|
|
|
|
IOR_PARAMS+="-g " # intraTestBarriers -- use barriers between open, write/read, and close
|
|
|
|
IOR_PARAMS+="-H " # showHints -- show hints
|
|
|
|
IOR_PARAMS+="-z " # randomOffset -- access is to random, not sequential, offsets within a file
|
|
|
|
IOR_PARAMS+="-o $LUSTRE_TESTFILE $IOR_TYPE_OPTS "
|
|
|
|
IOR_PARAMS+="-O summaryFile=${BENCHFILE}.json "
|
|
|
|
IOR_PARAMS+="-O summaryFormat=JSON "
|
2018-11-13 07:35:25 +00:00
|
|
|
|
|
|
|
if [[ "isc17" == ${hostname:0:5} ]]; then
|
2018-11-13 15:37:23 +00:00
|
|
|
$MPIEXEC -np $NN --hosts $(hosts $NN) ./drop_caches.sh
|
2018-11-13 07:35:25 +00:00
|
|
|
MPIEXEC_PARAMS=" -ppn $PPN -np $(($NN * $PPN)) --hosts $(hosts $NN) -wdir $WD "
|
|
|
|
MPIEXEC_PARAMS+="-genv MV2_NUM_HCAS 1 "
|
|
|
|
MPIEXEC_PARAMS+="-genv MV2_CPU_BINDING_LEVEL core "
|
|
|
|
MPIEXEC_PARAMS+="-genv MV2_CPU_BINDING_POLICY scatter "
|
|
|
|
elif [[ "m" == ${hostname:0:1} ]]; then
|
2018-11-13 14:48:24 +00:00
|
|
|
#MPIEXEC_PARAMS=" -ppn $PPN -n $(($NN * $PPN)) -wdir $WD --host $(hosts $NN) "
|
|
|
|
MPIEXEC_PARAMS=" -ppn $PPN -n $(($NN * $PPN)) -wdir $WD "
|
2018-11-13 07:35:25 +00:00
|
|
|
else
|
|
|
|
echo "Cluster $hostname is not supported. Quitting."
|
|
|
|
exit 1
|
|
|
|
fi
|
2018-10-24 09:12:52 +00:00
|
|
|
|
2018-11-13 14:48:24 +00:00
|
|
|
NETOUTDIR="${BENCHFILE}_network"
|
|
|
|
[[ ! -d $NETOUTDIR ]] && mkdir $NETOUTDIR || rm $NETOUTDIR/HOST*PID*.txt
|
2018-11-14 11:27:24 +00:00
|
|
|
|
|
|
|
(
|
|
|
|
set -x
|
2018-11-13 14:48:24 +00:00
|
|
|
$MPIEXEC $MPIEXEC_PARAMS ./ior_wrapper.sh "$IOR_PARAMS" "$NETOUTDIR" | tee -a $BENCHFILE
|
2018-11-13 07:35:25 +00:00
|
|
|
#$MPIEXEC $MPIEXEC_PARAMS $IOR $IOR_PARAMS | tee -a $BENCHFILE
|
2018-10-24 09:12:52 +00:00
|
|
|
set +x
|
2018-11-13 07:35:25 +00:00
|
|
|
) 2> >(tee -a $BENCHFILE)
|
|
|
|
else
|
|
|
|
echo "skip $(readlink -f $BENCHFILE), already exists"
|
|
|
|
fi
|
2018-10-24 09:12:52 +00:00
|
|
|
|
|
|
|
done
|
|
|
|
done
|
|
|
|
done
|
|
|
|
done
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|