Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
control better random, returning to assertion
authorFabien Chaix <chaix@ics.forth.gr>
Fri, 26 Feb 2016 21:09:00 +0000 (23:09 +0200)
committerFabien Chaix <chaix@ics.forth.gr>
Fri, 26 Feb 2016 21:09:00 +0000 (23:09 +0200)
src/surf/maxmin.cpp
teshsuite/surf/maxmin_bench/maxmin_bench.c

index b6712d9..312360d 100644 (file)
@@ -751,11 +751,11 @@ void lmm_print(lmm_system_t sys)
     }
     XBT_DEBUG("%s", trace_buf);
     trace_buf[0] = '\000';
-    //   xbt_assert(!double_positive(sum - cnst->bound, cnst->bound*sg_maxmin_precision),
-    //           "Incorrect value (%f is not smaller than %f): %g",
-    //             sum, cnst->bound, sum - cnst->bound);
-    if(double_positive(sum - cnst->bound, cnst->bound*sg_maxmin_precision))
-      XBT_ERROR("Incorrect value (%f is not smaller than %f): %g",sum, cnst->bound, sum - cnst->bound);
+       xbt_assert(!double_positive(sum - cnst->bound, cnst->bound*sg_maxmin_precision),
+               "Incorrect value (%f is not smaller than %f): %g",
+                 sum, cnst->bound, sum - cnst->bound);
+       //if(double_positive(sum - cnst->bound, cnst->bound*sg_maxmin_precision))
+       //XBT_ERROR("Incorrect value (%f is not smaller than %f): %g",sum, cnst->bound, sum - cnst->bound);
       
   }
 
index 16a0152..06e3436 100644 (file)
@@ -145,10 +145,6 @@ int main(int argc, char **argv)
   //How many times?
   testcount=atoi(argv[2]);
   
-  srand(testcount);
-
-  printf("Starting to test (%i,%i,%i)\n",rand()%1000,rand()%1000,rand()%1000);
-
   //Show me everything (debug or performance)!
   mode=0;
   if(argc>=4 && strcmp(argv[3],"test")==0)
@@ -180,6 +176,8 @@ int main(int argc, char **argv)
   xbt_init(&argc, argv);
   
   for(i=0;i<testcount;i++){
+    srand(i+1);
+    printf("Starting %i: (%i,%i,%i)\n",i,rand()%1000,rand()%1000,rand()%1000);
     test(nb_cnst, nb_var, nb_elem, pw_base_limit, pw_max_limit, rate_no_limit,max_share,mode);
     acc_date+=date;
     acc_date2+=date*date;