Page MenuHomec4science

exp-runner.sh
No OneTemporary

File Metadata

Created
Tue, Feb 25, 17:50

exp-runner.sh

#!/bin/bash
if [ $# -ne 19 ]
then
echo "Wrong number of parameters given. Given $#"
echo "Usage: ./exp-runner.sh TRACE_FILE TOPO_FILE SIMTYPE DIR_ID RUN_CTR HBSEED PORT_START PENALTY EST_ERROR WAIT_TIME_ESTIMATION INITIAL_BUMP MIN_RATIO HB_INTERVAL CORES P1 P2 P3 P4 P5"
exit
fi
TRACE_FILE=$1
TOPO_FILE=$2
SIMTYPE=$3
EXPID=$4
RUN_CTR=$5
HBSEED=$6
PORT_START=$7
PENALTY=$8
EST_ERROR=$9
WAIT_TIME_ESTIMATION=${10}
INITIAL_BUMP=${11}
MIN_RATIO=${12}
HB_INTERVAL=${13}
CORES=${14}
P1=${15}
P2=${16}
P3=${17}
P3=${18}
P3=${19}
BASE_DIR=`pwd`
EXP_DIR=`pwd`/xexperiments
exp (){
RUN_DIR=$EXPID-$RUN_CTR-$TRACE_FILE---$TOPO_FILE---$SIMTYPE-$WAIT_TIME_ESTIMATION--$HBSEED---`date +"%Y-%m-%d_%H-%M-%S"`
OUT_DIR=$EXP_DIR/$RUN_DIR
echo "Output dir $RUN_DIR on `hostname`"
mkdir $OUT_DIR
bin/slsrun.sh --input-sls=$TRACE_FILE --output-dir=$OUT_DIR --nodes=$TOPO_FILE --print-simulation --simtype=$SIMTYPE --hbseed=$HBSEED --portstart=$PORT_START --penalty=$PENALTY --esterror=$EST_ERROR --waitTimeEstimation=$WAIT_TIME_ESTIMATION --initialBump=$INITIAL_BUMP --minRatio=$MIN_RATIO --hbInterval=$HB_INTERVAL --cores=$CORES --p1=$P1 --p2=$P2 --p3=$P3 --p4=$P4 --p5=$P5 >$OUT_DIR/simulation-log 2>&1
cp $TOPO_FILE $TRACE_FILE $OUT_DIR
echo "Usage: TRACE_FILE TOPO_FILE SIMTYPE DIR_ID RUN_CTR HBSEED PORT_START PENALTY EST_ERROR WAIT_TIME_ESTIMATION INITIAL_BUMP MIN_RATIO HB_INTERVAL CORES P1 P2 P3 P4 P5" > $OUT_DIR/parameters.tmp
echo "Params: $TRACE_FILE $TOPO_FILE $SIMTYPE $EXPID $RUN_CTR $HBSEED $PORT_START $PENALTY $EST_ERROR $WAIT_TIME_ESTIMATION $INITIAL_BUMP $MIN_RATIO $HB_INTERVAL $CORES $P1 $P2 $P3 $P4 $P5" >> $OUT_DIR/parameters.tmp
cat $OUT_DIR/parameters.tmp | column -t > $OUT_DIR/parameters
rm $OUT_DIR/parameters.tmp
cd $OUT_DIR
echo "`hostname` did $RUN_DIR at `date | awk '{print $4}'`"
TRUNC=$EXP_DIR/$EXPID-$RUN_CTR-$SIMTYPE-$WAIT_TIME_ESTIMATION
#grep app jobruntime.csv | awk -F, '{print $1,$6-$5}' | sed 's/_/ /g' | awk '{print $4,$5/1000}' | sed 's/^0*//g' > $TRUNC.jrt
grep app jobruntime.csv | awk -F, '{print $1,$6-$5}' | tr "a-z_" " " | awk '{print $1,$2/1000}' > $TRUNC.jrt
/root/cdf-gen.py $TRUNC.jrt 1 > $TRUNC.jrt.cdf
cat metrics/variable.cluster.allocated.memory.csv | sed 's/,/ /g' | grep -v value | awk 'BEGIN{s=0}{s++; print s,$2/1000}' > $TRUNC.tmem
cd $BASE_DIR
}
exp

Event Timeline