using negative scores when error happens
authorHamed Gorjiara <hgorjiar@uci.edu>
Thu, 5 Dec 2019 01:25:22 +0000 (17:25 -0800)
committerHamed Gorjiara <hgorjiar@uci.edu>
Thu, 5 Dec 2019 01:25:22 +0000 (17:25 -0800)
src/Tuner/basictuner.cc
src/Tuner/comptuner.cc

index 6ac7453a249648a16fcb93c3850d1ef8d2250e68..9cd3021e6fd75af8adc695457935c583b801a61f 100644 (file)
@@ -197,7 +197,7 @@ long long BasicTuner::evaluate(Problem *problem, TunerRecord *tuner) {
                model_print("******** Result has changed ******** Found a bug!!\n");
                ASSERT(0);
        }
-       if (sat == IS_INDETER && metric != -1) {//The case when we have a timeout
+       if (sat == IS_INDETER && metric >= 0) {//The case when we have a timeout
                metric = -1;
        }
        return metric;
index 27eba5b4012cf2ee1a027f97428b02d1748da629..029efe9294d954d9f9076b8ac860c5a18ff095f4 100644 (file)
@@ -31,11 +31,11 @@ void CompTuner::findBestTwoTuners() {
                        for (uint l = 0; l < problems.getSize(); l++) {
                                Problem *problem = problems.get(l);
                                long long time1 = tuner1->getTime(problem);
-                               if(time1 == -1 || time1 == -2){
+                               if(time1 < 0){
                                        time1=LLONG_MAX;
                                }
                                long long time2 = tuner2->getTime(problem);
-                               if(time2 == -1 || time2 == -2){
+                               if(time2 < 0){
                                        time2 = LLONG_MAX;
                                }
                                mintimes[l] = pow(min(time1,time2), (double)1 / problems.getSize());