#!/bin/sh
#
# Usage:
#   run [-n=<number of runs>] <executable1> [<executable2> ...]

N="-n=1"

DIR=`dirname $0`;
if [ "$DIR" = "" ]; then
	DIR="."
fi

if [ "$#" > "0" ]; then
    if echo $1 | grep '\-n=[1-9][0-9]*' > /dev/null; then
        N=$1
        shift
    fi
fi

exec $DIR/benchmark -p $DIR/problems-bw $N -o $DIR/Bmtool/bmtool-timeschema ${1+"$@"}
