1 /* Copyright (c) 2008, 2009, 2010. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
18 #include "simdag/simdag.h"
22 #include "xbt/graph.h"
23 #include "surf/surf.h"
24 #include "surf/surf_private.h"
26 XBT_LOG_NEW_DEFAULT_CATEGORY(graphicator,
27 "Graphicator Logging System");
29 int main(int argc, char **argv)
31 char *platformFile = NULL;
32 char *graphvizFile = NULL;
36 MSG_global_init(&argc, argv);
39 XBT_INFO("Usage: %s <platform_file.xml> <graphviz_file.dot>", argv[0]);
42 platformFile = argv[1];
43 graphvizFile = argv[2];
46 MSG_create_environment(platformFile);
48 xbt_die("Error while loading %s: %s",platformFile,e.msg);
51 //creating the graph structure
52 xbt_graph_t graph = TRACE_platform_graph();
54 XBT_INFO ("%s expects --cfg=tracing:1", argv[0]);
56 xbt_graph_export_graphviz(graph, graphvizFile, &TRACE_node_name, NULL);
57 XBT_INFO ("Output is in file %s", graphvizFile);