include examples/cpp/dag-failure/s4u-dag-failure.cpp
include examples/cpp/dag-failure/s4u-dag-failure.tesh
include examples/cpp/dag-from-dot/dag.dot
+include examples/cpp/dag-from-dot/dag_with_cycle.dot
include examples/cpp/dag-from-dot/s4u-dag-from-dot.cpp
include examples/cpp/dag-from-dot/s4u-dag-from-dot.tesh
include examples/cpp/dag-io/s4u-dag-io.cpp
include examples/deprecated/msg/mc/deploy_bugged2_liveness.xml
include examples/deprecated/msg/mc/deploy_centralized_mutex.xml
include examples/deprecated/msg/mc/promela_bugged2_liveness
-include examples/deprecated/simdag/dag-dotload/dag_with_cycle.dot
-include examples/deprecated/simdag/dag-dotload/sd_dag-dotload.c
-include examples/deprecated/simdag/dag-dotload/sd_dag-dotload.tesh
include examples/deprecated/simdag/daxload/sd_daxload.c
include examples/deprecated/simdag/daxload/sd_daxload.tesh
include examples/deprecated/simdag/daxload/simple_dax_with_cycle.xml
${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness-stack-cleaner
${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/promela_bugged1_liveness PARENT_SCOPE)
set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dot/dag.dot
+ ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dot/dag_with_cycle.dot
${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p0.txt
${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p1.txt
${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm.txt
std::vector<simgrid::s4u::ActivityPtr> dag = simgrid::s4u::create_DAG_from_dot(argv[2]);
+ if (dag.empty()) {
+ XBT_CRITICAL("No dot loaded. Do you have a cycle in your graph?");
+ exit(2);
+ }
+
XBT_INFO("--------- Display all activities of the loaded DAG -----------");
for (const auto& a : dag) {
std::string type = "an Exec";
> [110.047415] [dag_from_dot/INFO] [80.039443->80.129922] '7->end' transferred from node-16.simgrid.org to node-0.simgrid.org
> [110.047415] [dag_from_dot/INFO] [0.000000->0.090396] 'root->5' transferred from node-0.simgrid.org to node-14.simgrid.org
> [110.047415] [dag_from_dot/INFO] [100.047415->110.047415] 'end' executed on node-0.simgrid.org
+
+! expect return 2
+$ ${bindir:=.}/s4u-dag-from-dot --log=no_loc ${platfdir}/cluster_backbone.xml ${srcdir:=.}/dag_with_cycle.dot
+> [0.000000] [sd_dotparse/ERROR] The DOT described in dag_with_cycle.dot is not a DAG. It contains a cycle.
+> [0.000000] [dag_from_dot/CRITICAL] No dot loaded. Do you have a cycle in your graph?
set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/sd_${x}.tesh)
endforeach()
-foreach(x dag-dotload)
- if(HAVE_GRAPHVIZ)
- add_executable (sd_${x} EXCLUDE_FROM_ALL ${x}/sd_${x}.c)
- target_link_libraries(sd_${x} simgrid)
- set_target_properties(sd_${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
- add_dependencies(tests sd_${x})
- endif()
- set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/sd_${x}.c)
- set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/sd_${x}.tesh)
-endforeach()
-
set(tesh_files ${tesh_files} PARENT_SCOPE)
set(examples_src ${examples_src} PARENT_SCOPE)
set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/scheduling/Montage_25.xml
${CMAKE_CURRENT_SOURCE_DIR}/daxload/simple_dax_with_cycle.xml
${CMAKE_CURRENT_SOURCE_DIR}/daxload/smalldax.xml PARENT_SCOPE)
-set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/dag-dotload/dag_with_cycle.dot
- ${CMAKE_CURRENT_SOURCE_DIR}/scheduling/expected_output.jed PARENT_SCOPE)
+set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/scheduling/expected_output.jed PARENT_SCOPE)
foreach(x daxload scheduling)
ADD_TESH(simdag-${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/deprecated/simdag --cd ${CMAKE_BINARY_DIR}/examples/deprecated/simdag ${CMAKE_HOME_DIRECTORY}/examples/deprecated/simdag/${x}/sd_${x}.tesh)
endforeach()
-
-if(HAVE_GRAPHVIZ)
- foreach(x dag-dotload)
- ADD_TESH(simdag-${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/deprecated/simdag --cd ${CMAKE_BINARY_DIR}/examples/deprecated/simdag ${CMAKE_HOME_DIRECTORY}/examples/deprecated/simdag/${x}/sd_${x}.tesh)
- endforeach()
-endif()
+++ /dev/null
-/* simple test trying to load a DOT file. */
-
-/* Copyright (c) 2010-2021. The SimGrid Team.
- * All rights reserved. */
-
-/* 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/simdag.h"
-#include "xbt/log.h"
-#include <stdio.h>
-#include <libgen.h>
-
-XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Logging specific to this SimDag example");
-
-int main(int argc, char **argv)
-{
- xbt_dynar_t dot;
-
- /* initialization of SD */
- SD_init(&argc, argv);
-
- /* Check our arguments */
- xbt_assert(argc > 2, "Usage: %s platform_file dot_file [trace_file]"
- "example: %s ../2clusters.xml dag.dot dag.mytrace", argv[0], argv[0]);
-
- /* creation of the environment */
- SD_create_environment(argv[1]);
-
- /* load the DOT file */
- dot = SD_dotload(argv[2]);
- if(dot == NULL){
- XBT_CRITICAL("No dot loaded. Do you have a cycle in your graph?");
- exit(2);
- }
-
- return 0;
-}
+++ /dev/null
-#!/usr/bin/env tesh
-p Test the loader of DAG written in the DOT format
-
-! expect return 2
-$ ${bindir:=.}/dag-dotload/sd_dag-dotload --log=no_loc ${srcdir:=.}/../../platforms/cluster_backbone.xml ${srcdir:=.}/dag-dotload/dag_with_cycle.dot
-> [0.000000] [xbt_cfg/INFO] Switching to the L07 model to handle parallel tasks.
-> [0.000000] [sd_daxparse/WARNING] the task root is not marked
-> [0.000000] [sd_daxparse/WARNING] the task 1 is in a cycle
-> [0.000000] [sd_daxparse/WARNING] the task 2 is in a cycle
-> [0.000000] [sd_daxparse/WARNING] the task 3 is in a cycle
-> [0.000000] [sd_daxparse/WARNING] the task 4 is in a cycle
-> [0.000000] [sd_daxparse/WARNING] the task 5 is in a cycle
-> [0.000000] [sd_daxparse/WARNING] the task 6 is in a cycle
-> [0.000000] [sd_dotparse/ERROR] The DOT described in dag_with_cycle.dot is not a DAG. It contains a cycle.
-> [0.000000] [test/CRITICAL] No dot loaded. Do you have a cycle in your graph?