Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
couple more simplifications
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 23 Mar 2016 09:58:36 +0000 (10:58 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 23 Mar 2016 10:06:29 +0000 (11:06 +0100)
.gitignore
examples/simdag/CMakeLists.txt
examples/simdag/dax/CMakeLists.txt [deleted file]
examples/simdag/dax/sd_dax.c [moved from examples/simdag/dax/dax_test.c with 97% similarity]
examples/simdag/dax/sd_dax.tesh [moved from examples/simdag/dax/smalldax.tesh with 95% similarity]
examples/simdag/dax/simple_dax_with_cycle.tesh
examples/simdag/dax/simple_dax_with_cycle.xml
examples/simdag/dax/smalldax.xml
examples/simdag/goal/CMakeLists.txt [deleted file]
tools/cmake/DefinePackages.cmake

index 0bd61c5..7e3c0ad 100644 (file)
@@ -210,7 +210,7 @@ examples/msg/z_gtnets.trace
 examples/msg/zmsg_test.trace
 examples/s4u/basic/s4u_basic
 examples/s4u/io/s4u_io
 examples/msg/zmsg_test.trace
 examples/s4u/basic/s4u_basic
 examples/s4u/io/s4u_io
-examples/simdag/dax/dax_test
+examples/simdag/dax/sd_dax
 examples/simdag/dot/dot_test
 examples/simdag/dot/dot_test2
 examples/simdag/dot/simulate_dot
 examples/simdag/dot/dot_test
 examples/simdag/dot/dot_test2
 examples/simdag/dot/simulate_dot
index 0c5e10e..f470387 100644 (file)
@@ -1,4 +1,4 @@
-foreach(x availability fail typed_tasks io properties comm_throttling scheduling test)
+foreach(x availability dax fail typed_tasks io properties comm_throttling scheduling test)
   add_executable       (sd_${x}     ${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_executable       (sd_${x}     ${x}/sd_${x}.c)
   target_link_libraries(sd_${x}     simgrid)
   set_target_properties(sd_${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
@@ -6,11 +6,19 @@ foreach(x availability fail typed_tasks io properties comm_throttling scheduling
   set(tesh_files   ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/${x}/sd_${x}.tesh)
 endforeach()
 
   set(tesh_files   ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/${x}/sd_${x}.tesh)
 endforeach()
 
-set(examples_src ${examples_src}                                                           PARENT_SCOPE)
-set(tesh_files   ${tesh_files}                                                             PARENT_SCOPE)
-set(xml_files    ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/scheduling/Montage_25.xml    PARENT_SCOPE)
-set(bin_files    ${bin_files}     ${CMAKE_CURRENT_SOURCE_DIR}/platform_script.lua          PARENT_SCOPE)
+add_executable       (goal_test goal/goal_test.c)
+target_link_libraries(goal_test simgrid)
+set_target_properties(goal_test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/goal)
 
 
-foreach(x availability fail typed_tasks io properties comm_throttling scheduling test)
+set(examples_src ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/goal/goal_test.c               PARENT_SCOPE)
+set(tesh_files   ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/dax/simple_dax_with_cycle.tesh PARENT_SCOPE)
+set(xml_files    ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/scheduling/Montage_25.xml
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/dax/simple_dax_with_cycle.xml
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/dax/smalldax.xml               PARENT_SCOPE)
+set(bin_files    ${bin_files}     ${CMAKE_CURRENT_SOURCE_DIR}/platform_script.lua            PARENT_SCOPE)
+
+foreach(x availability dax fail typed_tasks io properties comm_throttling scheduling test)
   ADD_TESH(simdag-${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/${x}/sd_${x}.tesh)
 endforeach()
   ADD_TESH(simdag-${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag --cd ${CMAKE_BINARY_DIR}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/${x}/sd_${x}.tesh)
 endforeach()
+
+ADD_TESH(simdag-dax-cycle --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag/dax --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag/dax simple_dax_with_cycle.tesh)
diff --git a/examples/simdag/dax/CMakeLists.txt b/examples/simdag/dax/CMakeLists.txt
deleted file mode 100644 (file)
index 8578645..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-add_executable       (dax_test dax_test.c)
-target_link_libraries(dax_test simgrid)
-
-ADD_TESH(simdag-dax       --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag/dax --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag/dax smalldax.tesh)
-ADD_TESH(simdag-dax-cycle --setenv bindir=${CMAKE_BINARY_DIR}/examples/simdag/dax --cd ${CMAKE_HOME_DIRECTORY}/examples/simdag/dax simple_dax_with_cycle.tesh)
-
-set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/simple_dax_with_cycle.tesh
-                                   ${CMAKE_CURRENT_SOURCE_DIR}/smalldax.tesh                PARENT_SCOPE)
-set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/simple_dax_with_cycle.xml
-                                   ${CMAKE_CURRENT_SOURCE_DIR}/smalldax.xml                 PARENT_SCOPE)
-set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/dax_test.c                   PARENT_SCOPE)
similarity index 97%
rename from examples/simdag/dax/dax_test.c
rename to examples/simdag/dax/sd_dax.c
index 4bd470c..1734949 100644 (file)
@@ -7,6 +7,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "simgrid/simdag.h"
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "simgrid/simdag.h"
+#include "xbt/file.h"
 #include <stdio.h>
 #include <string.h>
 
 #include <stdio.h>
 #include <string.h>
 
@@ -79,7 +80,7 @@ int main(int argc, char **argv)
   XBT_INFO("------------------- Run the schedule ---------------------------");
   SD_simulate(-1);
   XBT_INFO("------------------- Produce the trace file---------------------------");
   XBT_INFO("------------------- Run the schedule ---------------------------");
   SD_simulate(-1);
   XBT_INFO("------------------- Produce the trace file---------------------------");
-  XBT_INFO("Producing the trace of the run into %s", tracefilename);
+  XBT_INFO("Producing the trace of the run into %s", xbt_basename(tracefilename));
   FILE *out = fopen(tracefilename, "w");
   xbt_assert(out, "Cannot write to %s", tracefilename);
   free(tracefilename);
   FILE *out = fopen(tracefilename, "w");
   xbt_assert(out, "Cannot write to %s", tracefilename);
   free(tracefilename);
similarity index 95%
rename from examples/simdag/dax/smalldax.tesh
rename to examples/simdag/dax/sd_dax.tesh
index 95f8fca..7e33671 100644 (file)
@@ -1,7 +1,7 @@
 #! ./tesh
 p Test the DAX loader on a small DAX instance
 
 #! ./tesh
 p Test the DAX loader on a small DAX instance
 
-$ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ${srcdir:=.}/../../platforms/2clusters.xml ./smalldax.xml
+$ $SG_TEST_EXENV ${bindir:=.}/dax/sd_dax --log=no_loc ${srcdir:=.}/../platforms/2clusters.xml ${srcdir:=.}/dax/smalldax.xml
 > [0.000000] [xbt_cfg/INFO] Switching to the L07 model to handle parallel tasks.
 > [0.000000] [sd_daxparse/WARNING] Ignore file o1 size redefinition from 1000000 to 304
 > [0.000000] [sd_daxparse/WARNING] Ignore file o2 size redefinition from 1000000 to 304
 > [0.000000] [xbt_cfg/INFO] Switching to the L07 model to handle parallel tasks.
 > [0.000000] [sd_daxparse/WARNING] Ignore file o1 size redefinition from 1000000 to 304
 > [0.000000] [sd_daxparse/WARNING] Ignore file o2 size redefinition from 1000000 to 304
@@ -101,9 +101,9 @@ $ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ${srcdir:=.}/../../platforms
 > [0.000000] [test/INFO] ------------------- Schedule tasks ---------------------------
 > [0.000000] [test/INFO] ------------------- Run the schedule ---------------------------
 > [84.066238] [test/INFO] ------------------- Produce the trace file---------------------------
 > [0.000000] [test/INFO] ------------------- Schedule tasks ---------------------------
 > [0.000000] [test/INFO] ------------------- Run the schedule ---------------------------
 > [84.066238] [test/INFO] ------------------- Produce the trace file---------------------------
-> [84.066238] [test/INFO] Producing the trace of the run into ./smalldax.trace
+> [84.066238] [test/INFO] Producing the trace of the run into smalldax.trace
 
 
-$ cat ./smalldax.trace
+$ cat ${srcdir:=.}/dax/smalldax.trace
 > [0.000000] C1-00 compute 0.000000 # root
 > [0.016300] C1-01 compute 42000000000.000000 # 1@task1
 > [0.016300] C1-02 compute 42000000000.000000 # 2@task2
 > [0.000000] C1-00 compute 0.000000 # root
 > [0.016300] C1-01 compute 42000000000.000000 # 1@task1
 > [0.016300] C1-02 compute 42000000000.000000 # 2@task2
@@ -120,4 +120,4 @@ $ cat ./smalldax.trace
 > [0.016300] C1-01 recv C1-00 1000000.000000 # root_i1_1@task1
 > [84.066238] C1-00 compute 0.000000 # end
 
 > [0.016300] C1-01 recv C1-00 1000000.000000 # root_i1_1@task1
 > [84.066238] C1-00 compute 0.000000 # end
 
-$ cmake -E remove -f ./dax.dot ./smalldax.trace
+$ cmake -E remove -f ${srcdir:=.}/dax.dot ${srcdir:=.}/dax/smalldax.trace
index 3962062..59cf02b 100644 (file)
@@ -2,7 +2,7 @@
 p Test the DAX loader with a DAX comprising a cycle.
 
 ! expect return 255
 p Test the DAX loader with a DAX comprising a cycle.
 
 ! expect return 255
-$ $SG_TEST_EXENV ${bindir:=.}/dax_test --log=no_loc ${srcdir:=.}/../../platforms/2clusters.xml ./simple_dax_with_cycle.xml
+$ $SG_TEST_EXENV ${bindir:=.}/sd_dax --log=no_loc ${srcdir:=.}/../../platforms/2clusters.xml ./simple_dax_with_cycle.xml
 > [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@task1 is in a cycle
 > [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@task1 is in a cycle
index eb8ff13..6a42ed9 100644 (file)
@@ -1,29 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<adag xmlns="http://pegasus.isi.edu/schema/DAX"
-      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-      xsi:schemaLocation="http://pegasus.isi.edu/schema/DAX
-                          http://pegasus.isi.edu/schema/dax-2.1.xsd" 
-      version="2.1" count="1" index="0" name="smalldax" 
-      jobCount="3" fileCount="0" childCount="1">
-
-  <!-- Job and control dependencies go here -->
+<adag xmlns="http://pegasus.isi.edu/schema/DAX" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="http://pegasus.isi.edu/schema/DAX http://pegasus.isi.edu/schema/dax-2.1.xsd" 
+      version="2.1" count="1" index="0" name="smalldax" jobCount="4" fileCount="0" childCount="2">
   <job id="1" namespace="SG" name="task1" version="1.0" runtime="10">
   <job id="1" namespace="SG" name="task1" version="1.0" runtime="10">
-    <uses file="i1" link="input" register="true" transfer="true" 
-          optional="false" type="data" size="1000000"/>
-    <uses file="o1" link="output" register="true" transfer="true" 
-          optional="false" type="data" size="1000000"/>
+    <uses file="i1" link="input" register="true" transfer="true" optional="false" type="data" size="1000000"/>
+    <uses file="o1" link="output" register="true" transfer="true" optional="false" type="data" size="1000000"/>
   </job>
   <job id="2" namespace="SG" name="task2" version="1.0" runtime="10">
   </job>
   <job id="2" namespace="SG" name="task2" version="1.0" runtime="10">
-    <uses file="i2" link="input" register="true" transfer="true" 
-          optional="false" type="data" size="1000000"/>
+    <uses file="i2" link="input" register="true" transfer="true" optional="false" type="data" size="1000000"/>
   </job>
   <job id="3" namespace="SG" name="task3" version="1.0" runtime="10">
   </job>
   <job id="3" namespace="SG" name="task3" version="1.0" runtime="10">
-    <uses file="o1" link="input" register="true" transfer="true" 
-          optional="false" type="data" size="1000000"/>
-    <uses file="o3" link="output" register="true" transfer="true" 
-          optional="false" type="data" size="1000000"/>
+    <uses file="o1" link="input" register="true" transfer="true" optional="false" type="data" size="1000000"/>
+    <uses file="o3" link="output" register="true" transfer="true" optional="false" type="data" size="1000000"/>
   </job>
   </job>
-  <!-- Control-flow dependencies -->
   <child ref="3">
     <parent ref="2"/>
   </child>
   <child ref="3">
     <parent ref="2"/>
   </child>
index 3829b91..1432fca 100644 (file)
@@ -1,29 +1,22 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- generated: 2008-09-24T14:28:09-07:00 -->
-<!-- generated by: shishir [??] -->
-<adag xmlns="http://pegasus.isi.edu/schema/DAX"
-      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-      xsi:schemaLocation="http://pegasus.isi.edu/schema/DAX
-                         http://pegasus.isi.edu/schema/dax-2.1.xsd" 
-      version="2.1" count="1" index="0" name="test" jobCount="25" fileCount="0" childCount="20">
+<adag xmlns="http://pegasus.isi.edu/schema/DAX" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="http://pegasus.isi.edu/schema/DAX http://pegasus.isi.edu/schema/dax-2.1.xsd" 
+      version="2.1" count="1" index="0" name="test" jobCount="3" fileCount="5" childCount="1">
 
   <job id="1" namespace="SG" name="task1" version="1.0" runtime="10">
     <uses file="i1" link="input" register="true" transfer="true" optional="false" type="data" size="1000000"/>
     <uses file="o1" link="output" register="true" transfer="true" optional="false" type="data" size="1000000"/>
   </job>
 
   <job id="1" namespace="SG" name="task1" version="1.0" runtime="10">
     <uses file="i1" link="input" register="true" transfer="true" optional="false" type="data" size="1000000"/>
     <uses file="o1" link="output" register="true" transfer="true" optional="false" type="data" size="1000000"/>
   </job>
-
   <job id="2" namespace="SG" name="task2" version="1.0" runtime="10">
     <uses file="i2" link="input" register="true" transfer="true" optional="false" type="data" size="1000000"/>
     <uses file="o2" link="output" register="true" transfer="true" optional="false" type="data" size="1000000"/>
   </job>
   <job id="2" namespace="SG" name="task2" version="1.0" runtime="10">
     <uses file="i2" link="input" register="true" transfer="true" optional="false" type="data" size="1000000"/>
     <uses file="o2" link="output" register="true" transfer="true" optional="false" type="data" size="1000000"/>
   </job>
-
   <job id="3" namespace="SG" name="task1" version="1.0" runtime="10">
     <uses file="o1" link="input" register="true" transfer="true" optional="false" type="data" size="304"/>
     <uses file="o2" link="input" register="true" transfer="true" optional="false" type="data" size="304"/>
     <uses file="o3" link="output" register="true" transfer="true" optional="false" type="data" size="4167312"/>
   </job>
 
   <job id="3" namespace="SG" name="task1" version="1.0" runtime="10">
     <uses file="o1" link="input" register="true" transfer="true" optional="false" type="data" size="304"/>
     <uses file="o2" link="input" register="true" transfer="true" optional="false" type="data" size="304"/>
     <uses file="o3" link="output" register="true" transfer="true" optional="false" type="data" size="4167312"/>
   </job>
 
-<!-- part 3: list of control-flow dependencies (may be empty) -->
   <child ref="3">
     <parent ref="1"/>
     <parent ref="2"/>
   <child ref="3">
     <parent ref="1"/>
     <parent ref="2"/>
diff --git a/examples/simdag/goal/CMakeLists.txt b/examples/simdag/goal/CMakeLists.txt
deleted file mode 100644 (file)
index 59fdfc6..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-add_executable       (goal_test goal_test.c)
-target_link_libraries(goal_test simgrid)
-set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/goal_test.c  PARENT_SCOPE)
index 53139cf..3e41773 100644 (file)
@@ -963,9 +963,7 @@ set(CMAKEFILES_TXT
     examples/msg/tracing/CMakeLists.txt
   examples/s4u/CMakeLists.txt
   examples/simdag/CMakeLists.txt
     examples/msg/tracing/CMakeLists.txt
   examples/s4u/CMakeLists.txt
   examples/simdag/CMakeLists.txt
-    examples/simdag/dax/CMakeLists.txt
     examples/simdag/dot/CMakeLists.txt
     examples/simdag/dot/CMakeLists.txt
-    examples/simdag/goal/CMakeLists.txt
   examples/smpi/CMakeLists.txt
     examples/smpi/NAS/CMakeLists.txt
     examples/smpi/smpi_msg_masterslave/CMakeLists.txt
   examples/smpi/CMakeLists.txt
     examples/smpi/NAS/CMakeLists.txt
     examples/smpi/smpi_msg_masterslave/CMakeLists.txt