5 TESTLOG_PREFIX=${TESTLOG_PREFIX:-$TMP/recovery-mds-scale}
6 TESTNAME=${TESTNAME:-""}
7 [ -n "$TESTNAME" ] && TESTLOG_PREFIX=$TESTLOG_PREFIX.$TESTNAME
9 LOG=$TESTLOG_PREFIX.$(basename $0 .sh)_stdout.$(hostname -s).log
10 DEBUGLOG=$(echo $LOG | sed 's/\(.*\)stdout/\1debug/')
18 . $(dirname $0)/functions.sh
20 IOR=${IOR:-"$(which IOR)"}
22 assert_env MOUNT END_RUN_FILE LOAD_PID_FILE IOR
26 # if MACHINEFILE set and exists -- use it
27 if [ -z $MACHINEFILE ] || [ ! -e $MACHINEFILE ]; then
28 MACHINEFILE=$TMP/$(basename $0)-$(hostname).machines
29 echo $(hostname) >$MACHINEFILE
32 THREADS_PER_CLIENT=${THREADS_PER_CLIENT:-3}
33 NUM_CLIENTS=$(cat $MACHINEFILE | wc -l)
35 # recovery-*-scale scripts use this to signal the client loads to die
36 echo $$ >$LOAD_PID_FILE
38 TESTDIR=${TESTDIR:-$MOUNT/d0.ior-$(hostname)}
41 while [ ! -e "$END_RUN_FILE" ] && $CONTINUE; do
42 echoerr "$(date +'%F %H:%M:%S'): IOR run starting"
44 # need this only if TESTDIR is not default
48 mpi_run ${MACHINEFILE_OPTION} ${MACHINEFILE} \
49 -np $((NUM_CLIENTS * THREADS_PER_CLIENT)) $IOR -a POSIX -b 1g \
50 -o $TESTDIR/IOR-file -s 1 -t 1m -v -w -r 1>$LOG &
54 if [ ${PIPESTATUS[0]} -eq 0 ]; then
55 echoerr "$(date +'%F %H:%M:%S'): IOR succeeded"
58 echoerr "$(date +'%F %H:%M:%S'): IOR run finished"
60 echoerr "$(date +'%F %H:%M:%S'): IOR failed"
61 if [ -z "$ERRORS_OK" ]; then
62 echo $(hostname) >> $END_RUN_FILE
64 if [ $BREAK_ON_ERROR ]; then
71 echoerr "$(date +'%F %H:%M:%S'): IOR run exiting"