include tools/doxygen/xbt_log_extract_hierarchy.pl
include tools/fix-paje-trace.sh
include tools/generate-dwarf-functions
-include tools/graphicator/graphicator.c
+include tools/graphicator/graphicator.cpp
include tools/graphicator/graphicator.tesh
include tools/normalize-pointers.py
include tools/pkg-config/simgrid.pc.in
-if(enable_msg)
- add_executable (graphicator graphicator.c)
- add_dependencies (tests graphicator)
- target_link_libraries(graphicator simgrid)
- set_target_properties(graphicator PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
- ADD_TESH(graphicator --setenv srcdir=${CMAKE_HOME_DIRECTORY} --setenv bindir=${CMAKE_BINARY_DIR}/bin --cd ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/graphicator.tesh)
+add_executable (graphicator graphicator.cpp)
+add_dependencies (tests graphicator)
+target_link_libraries(graphicator simgrid)
+set_target_properties(graphicator PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+ADD_TESH(graphicator --setenv srcdir=${CMAKE_HOME_DIRECTORY} --setenv bindir=${CMAKE_BINARY_DIR}/bin
+ --cd ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/graphicator.tesh)
- install(TARGETS graphicator DESTINATION ${CMAKE_INSTALL_BINDIR}/)
+install(TARGETS graphicator DESTINATION ${CMAKE_INSTALL_BINDIR}/)
- ## Clean generated files
- get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
- set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${CMAKE_CURRENT_BINARY_DIR}/simgrid.trace;")
-endif()
+## Clean generated files
+get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
+set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${CMAKE_CURRENT_BINARY_DIR}/simgrid.trace;")
set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/graphicator.tesh PARENT_SCOPE)
-set(tools_src ${tools_src} ${CMAKE_CURRENT_SOURCE_DIR}/graphicator.c PARENT_SCOPE)
+set(tools_src ${tools_src} ${CMAKE_CURRENT_SOURCE_DIR}/graphicator.cpp PARENT_SCOPE)
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "simgrid/msg.h"
+#include "simgrid/instr.h"
+#include "simgrid/s4u.hpp"
#include "xbt/graph.h"
-int main(int argc, char **argv)
+int main(int argc, char** argv)
{
- MSG_init(&argc, argv);
+ simgrid::s4u::Engine e(&argc, argv);
xbt_assert(argc == 3, "Usage: %s <platform_file.xml> <graphviz_file.dot>", argv[0]);
- MSG_create_environment(argv[1]);
- int status = TRACE_platform_graph_export_graphviz (argv[2]);
+ e.load_platform(argv[1]);
+ int status = TRACE_platform_graph_export_graphviz(argv[2]);
xbt_assert(status != 0, "%s expects --cfg=tracing:yes --cfg=tracing/platform:yes", argv[0]);
- MSG_main(); /* useless, except for correctly cleaning memory */
+ e.run(); /* useless, except for correctly cleaning memory */
return 0;
}
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes'
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/platform' to 'yes'
-$ rm test.dot
+$ cat test.dot
+> graph test {
+> graph [overlap=scale]
+> node [shape=box, style=filled]
+> node [width=.3, height=.3, style=filled, color=skyblue]
+>
+> "bobbob_cluster_router.hamburger.edu";
+> "bob_cluster_backbone";
+> "bob0.hamburger.edu";
+> "bob_cluster_link_0_UP";
+> "bob_cluster_link_0_DOWN";
+> "bob2.hamburger.edu";
+> "bob_cluster_link_2_UP";
+> "bob_cluster_link_2_DOWN";
+> "bob3.hamburger.edu";
+> "bob_cluster_link_3_UP";
+> "bob_cluster_link_3_DOWN";
+> "bob4.hamburger.edu";
+> "bob_cluster_link_4_UP";
+> "bob_cluster_link_4_DOWN";
+> "bob6.hamburger.edu";
+> "bob_cluster_link_6_UP";
+> "bob_cluster_link_6_DOWN";
+> "bobbob_cluster_router.hamburger.edu" -- "bob_cluster_backbone";
+> "bob0.hamburger.edu" -- "bob_cluster_link_0_UP";
+> "bob_cluster_link_0_UP" -- "bob_cluster_backbone";
+> "bob0.hamburger.edu" -- "bob_cluster_link_0_DOWN";
+> "bob_cluster_link_0_DOWN" -- "bob_cluster_backbone";
+> "bob2.hamburger.edu" -- "bob_cluster_link_2_UP";
+> "bob_cluster_link_2_UP" -- "bob_cluster_backbone";
+> "bob2.hamburger.edu" -- "bob_cluster_link_2_DOWN";
+> "bob_cluster_link_2_DOWN" -- "bob_cluster_backbone";
+> "bob3.hamburger.edu" -- "bob_cluster_link_3_UP";
+> "bob_cluster_link_3_UP" -- "bob_cluster_backbone";
+> "bob3.hamburger.edu" -- "bob_cluster_link_3_DOWN";
+> "bob_cluster_link_3_DOWN" -- "bob_cluster_backbone";
+> "bob4.hamburger.edu" -- "bob_cluster_link_4_UP";
+> "bob_cluster_link_4_UP" -- "bob_cluster_backbone";
+> "bob4.hamburger.edu" -- "bob_cluster_link_4_DOWN";
+> "bob_cluster_link_4_DOWN" -- "bob_cluster_backbone";
+> "bob6.hamburger.edu" -- "bob_cluster_link_6_UP";
+> "bob_cluster_link_6_UP" -- "bob_cluster_backbone";
+> "bob6.hamburger.edu" -- "bob_cluster_link_6_DOWN";
+> "bob_cluster_link_6_DOWN" -- "bob_cluster_backbone";
+> }
+
+$ rm -f test.dot