Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove depredecated dag-dotload example
authorSUTER Frederic <frederic.suter@cc.in2p3.fr>
Fri, 24 Dec 2021 11:01:16 +0000 (12:01 +0100)
committerSUTER Frederic <frederic.suter@cc.in2p3.fr>
Fri, 24 Dec 2021 11:01:16 +0000 (12:01 +0100)
MANIFEST.in
examples/cpp/CMakeLists.txt
examples/cpp/dag-from-dot/dag_with_cycle.dot [moved from examples/deprecated/simdag/dag-dotload/dag_with_cycle.dot with 100% similarity]
examples/cpp/dag-from-dot/s4u-dag-from-dot.cpp
examples/cpp/dag-from-dot/s4u-dag-from-dot.tesh
examples/deprecated/simdag/CMakeLists.txt
examples/deprecated/simdag/dag-dotload/sd_dag-dotload.c [deleted file]
examples/deprecated/simdag/dag-dotload/sd_dag-dotload.tesh [deleted file]

index 86a5e6d..4f331de 100644 (file)
@@ -207,6 +207,7 @@ include examples/cpp/dag-comm/s4u-dag-comm.tesh
 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
@@ -491,9 +492,6 @@ include examples/deprecated/msg/mc/centralized_mutex.tesh
 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
index 8ebe990..fc2fb38 100644 (file)
@@ -252,6 +252,7 @@ set(bin_files     ${bin_files}    ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/gener
                                   ${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
index 3a7cbc0..ce05e47 100644 (file)
@@ -18,6 +18,11 @@ int main(int argc, char** argv)
 
   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";
index b53237e..04bb0cc 100644 (file)
@@ -45,3 +45,8 @@ $ ${bindir:=.}/s4u-dag-from-dot --log=no_loc ${platfdir}/cluster_backbone.xml ${
 > [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?
index d48566c..8d611f9 100644 (file)
@@ -7,31 +7,13 @@ foreach(x daxload scheduling)
   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()
diff --git a/examples/deprecated/simdag/dag-dotload/sd_dag-dotload.c b/examples/deprecated/simdag/dag-dotload/sd_dag-dotload.c
deleted file mode 100644 (file)
index 3753651..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 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;
-}
diff --git a/examples/deprecated/simdag/dag-dotload/sd_dag-dotload.tesh b/examples/deprecated/simdag/dag-dotload/sd_dag-dotload.tesh
deleted file mode 100644 (file)
index 5e453d6..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/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?