From 64344360cbabf3c8af0f4cbf2d74fbcd9294ff4d Mon Sep 17 00:00:00 2001 From: Hamed Gorjiara Date: Wed, 20 Nov 2019 16:26:01 -0800 Subject: [PATCH] Fixing performance bug in learning --- dirk-new/learn.sh | 58 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100755 dirk-new/learn.sh diff --git a/dirk-new/learn.sh b/dirk-new/learn.sh new file mode 100755 index 00000000..59ed0954 --- /dev/null +++ b/dirk-new/learn.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +#Terminate the script if even one command fails +set -e + + +#Variables +source ../common.sh +BIN=../../bin +BDIR=../Benchmarks/dirk-new/learningset/ + +#Checking the number of +if [ "$#" -lt 2 ]; then + echo "Illegal number of argument" + echo "./learn.sh [LearningSet=0,1,2,3] [TunerType=1,2,3,4]" + exit 1 +fi +if [ "$1" -gt 3 ]; then + echo "Only 4 sets are available for learning. Parameter should be less than 4" + exit 1 +fi + +#12 test cases +ACCOUNT="$(find ./learningset/ -name "*account*.dump")" +ACCOUNT=${ACCOUNT//.\/learningset/$BDIR} +AIRLINE="$(find ./learningset/ -name "*airline*.dump")" +AIRLINE=${AIRLINE//.\/learningset/$BDIR} +ARRAY="$(find ./learningset/ -name "*array*.dump")" +ARRAY=${ARRAY//.\/learningset/$BDIR} +BBUFFER="$(find ./learningset/ -name "*bbuffer*.dump")" +BBUFFER=${BBUFFER//.\/learningset/$BDIR} +BUBBLESORT="$(find ./learningset/ -name "*bubblesort*.dump")" +BUBBLESORT=${BUBBLESORT//.\/learningset/$BDIR} +BUFWRITER="$(find ./learningset/ -name "*bufwriter*.dump")" +BUFWRITER=${BUFWRITER//.\/learningset/$BDIR} +CRITICAL="$(find ./learningset/ -name "*critical*.dump")" +CRITICAL=${CRITICAL//.\/learningset/$BDIR} +MERGESORT="$(find ./learningset/ -name "*mergesort*.dump")" +MERGESORT=${MERGESORT//.\/learningset/$BDIR} +MOLDYN="$(find ./learningset/ -name "*moldyn*.dump")" +MOLDYN=${MOLDYN//.\/learningset/$BDIR} +MONTECARLO="$(find ./learningset/ -name "*montecarlo*.dump")" +MONTECARLO=${MONTECARLO//.\/learningset/$BDIR} +PINGPONG="$(find ./learningset/ -name "*pingpong*.dump")" +PINGPONG=${PINGPONG//.\/learningset/$BDIR} +RAYTRACER="$(find ./learningset/ -name "*raytracer-raytracer*.dump")" +RAYTRACER=${RAYTRACER//.\/learningset/$BDIR} + +declare -a LearningSet=("${BUFWRITER}" +"${BBUFFER}" +"${RAYTRACER} ${ACCOUNT} ${BBUFFER} ${PINGPONG} ${CRITICAL} ${MOLDYN} ${BUBBLESORT} ${AIRLINE} ${BUFWRITER}" +"${RAYTRACER} ${ACCOUNT} ${BBUFFER} ${PINGPONG} ${CRITICAL} ${MOLDYN} ${MERGESORT} ${MONTECARLO} ${ARRAY}") + +echo ${LearningSet[$1]} +cd $BIN +./run.sh serializestatictuner +./run.sh runmultituner $2 $BUDGET $ROUND $TIMEOUT ${LearningSet[$1]} - $TUNERCONF + -- 2.34.1