From: Fabien Chaix Date: Fri, 26 Feb 2016 21:09:00 +0000 (+0200) Subject: control better random, returning to assertion X-Git-Tag: v3_13~646^2^2~8 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8c24f94990a4fe05da6552075ad8654eaf5c7925 control better random, returning to assertion --- diff --git a/src/surf/maxmin.cpp b/src/surf/maxmin.cpp index b6712d9ba6..312360dc2a 100644 --- a/src/surf/maxmin.cpp +++ b/src/surf/maxmin.cpp @@ -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); } diff --git a/teshsuite/surf/maxmin_bench/maxmin_bench.c b/teshsuite/surf/maxmin_bench/maxmin_bench.c index 16a0152c39..06e3436d2a 100644 --- a/teshsuite/surf/maxmin_bench/maxmin_bench.c +++ b/teshsuite/surf/maxmin_bench/maxmin_bench.c @@ -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