Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
9d90d2b52fa1edce60a000d3d3cf2cbc0338565a
[simgrid.git] / tools / graphicator / graphicator.cpp
1 /* Copyright (c) 2008-2020. The SimGrid Team.
2  * All rights reserved.                                                     */
3
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. */
6
7 #include "simgrid/instr.h"
8 #include "simgrid/s4u.hpp"
9 #include "xbt/graph.h"
10
11 int main(int argc, char** argv)
12 {
13   simgrid::s4u::Engine e(&argc, argv);
14
15   xbt_assert(argc == 3, "Usage: %s <platform_file.xml> <graphviz_file.dot>", argv[0]);
16
17   e.load_platform(argv[1]);
18   int status = TRACE_platform_graph_export_graphviz(argv[2]);
19
20   xbt_assert(status != 0, "%s expects --cfg=tracing:yes --cfg=tracing/platform:yes", argv[0]);
21   e.run(); /* useless, except for correctly cleaning memory */
22   return 0;
23 }