X-Git-Url: http://plrg.eecs.uci.edu/git/?p=satune.git;a=blobdiff_plain;f=src%2FTuner%2Fmultituner.cc;h=fbf66c7f1b9f9b462d6d1e559a98e3239b963b5e;hp=4ccd29f1f1af3123213e7e70a92ea916e5c7543d;hb=6e6cd462b9993f07c5e0e34402106b0cbcdad05b;hpb=23975bc927f2cc13bf215f13ff7ba1dc0c012c01 diff --git a/src/Tuner/multituner.cc b/src/Tuner/multituner.cc index 4ccd29f..fbf66c7 100644 --- a/src/Tuner/multituner.cc +++ b/src/Tuner/multituner.cc @@ -66,7 +66,7 @@ long long MultiTuner::evaluate(Problem *problem, SearchTuner *tuner) { tuner->serialize(buffer); //Do run - snprintf(buffer, sizeof(buffer), "deserializerun %s %u tuner%u result%s%u > log%u", problem->getProblem(), timeout, execnum, problem->getProblem(), execnum, execnum); + snprintf(buffer, sizeof(buffer), "./run.sh deserializerun %s %u tuner%u result%s%u > log%u", problem->getProblem(), timeout, execnum, problem->getProblem(), execnum, execnum); int status = system(buffer); long long metric = -1; @@ -99,7 +99,6 @@ long long MultiTuner::evaluate(Problem *problem, SearchTuner *tuner) { void MultiTuner::tuneComp() { Vector *tunerV = new Vector(&tuners); for (uint b = 0; b < budget; b++) { - uint tSize = tunerV->getSize(); for (uint i = 0; i < tSize; i++) { SearchTuner *tmpTuner = mutateTuner(tunerV->get(i)->getTuner(), b); @@ -127,10 +126,10 @@ void MultiTuner::tuneComp() { places.insertAt(k, tuner); } } - int points = 4; + int points = 9; for (uint k = 0; k < places.getSize() && points; k++) { TunerRecord *tuner = places.get(k); - points = points / 2; + points = points / 3; int currScore = 0; if (scores.contains(tuner)) currScore = scores.get(tuner); @@ -155,6 +154,13 @@ void MultiTuner::tuneComp() { } ranking.insertAt(j, tuner); } + for (uint i = tuners.getSize(); i < ranking.getSize(); i++) { + TunerRecord *tuner = ranking.get(i); + for (uint j = 0; j < tunerV->getSize(); j++) { + if (tunerV->get(j) == tuner) + tunerV->removeAt(j); + } + } } }