X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f25af1e2829458e33a3a0b74c75865c89dff5f9e..f36706da5b3f68d53a9e762e791ef85ebe347106:/examples/simdag/dot/simulate_dot.c diff --git a/examples/simdag/dot/simulate_dot.c b/examples/simdag/dot/simulate_dot.c index 5d3000249a..f87bd7f7a3 100644 --- a/examples/simdag/dot/simulate_dot.c +++ b/examples/simdag/dot/simulate_dot.c @@ -12,6 +12,7 @@ #include "xbt/log.h" #include "xbt/ex.h" #include +#include XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Logging specific to this SimDag example"); @@ -48,9 +49,9 @@ int main(int argc, char **argv) /* load the DOT file and schedule tasks */ dot = SD_dotload_with_sched(argv[2]); - if(dot == NULL){ - XBT_INFO("The dot file with the provided scheduling is wrong, more information with the option : --log=sd_dotparse.thres:verbose"); - return -1; + if(!dot){ + xbt_die("The dot file with the provided scheduling is wrong, more information with the option : --log=sd_dotparse.thres:verbose"); + //return 0; } /* Display all the tasks */ @@ -74,9 +75,9 @@ int main(int argc, char **argv) xbt_dynar_free_container(&changed); XBT_INFO ("------------------- Produce the trace file---------------------------"); - XBT_INFO("Producing the trace of the run into %s", tracefilename); + XBT_INFO("Producing the trace of the run into %s", basename(tracefilename)); FILE *out = fopen(tracefilename, "w"); - xbt_assert1(out, "Cannot write to %s", tracefilename); + xbt_assert(out, "Cannot write to %s", tracefilename); free(tracefilename); xbt_dynar_foreach(dot, cursor, task) {