Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add a new test that loads a DAX with a cycle. It should be detected and
authorsuter <frederic.suter@cc.in2p3.fr>
Tue, 26 Jun 2012 10:24:21 +0000 (12:24 +0200)
committersuter <frederic.suter@cc.in2p3.fr>
Tue, 26 Jun 2012 10:28:05 +0000 (12:28 +0200)
the test should abort.

examples/simdag/dax/simple_dax_with_cycle.tesh [new file with mode: 0644]
examples/simdag/dax/simple_dax_with_cycle.xml [new file with mode: 0644]

diff --git a/examples/simdag/dax/simple_dax_with_cycle.tesh b/examples/simdag/dax/simple_dax_with_cycle.tesh
new file mode 100644 (file)
index 0000000..151fc96
--- /dev/null
@@ -0,0 +1,12 @@
+#! ./tesh
+p Test the DAX loader with a DAX comprising a cycle.
+
+! expect signal SIGABRT
+$ $SG_TEST_EXENV ./dax_test --log=no_loc ${srcdir:=.}/../2clusters.xml ${srcdir:=.}/simple_dax_with_cycle.xml 
+> [0.000000] [surf_workstation/INFO] surf_workstation_model_init_ptask_L07
+> [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] [sd_daxparse/WARNING] the task 2@task2 is in a cycle
+> [0.000000] [sd_daxparse/WARNING] the task 3@task3 is in a cycle
+> [0.000000] [sd_daxparse/ERROR] The DAX described in simple_dax_with_cycle.xml is not a DAG. It contains a cycle.
+> [0.000000] [xbt/CRITICAL] A problem occurred during parsing. The simulation can't continue.
diff --git a/examples/simdag/dax/simple_dax_with_cycle.xml b/examples/simdag/dax/simple_dax_with_cycle.xml
new file mode 100644 (file)
index 0000000..eb8ff13
--- /dev/null
@@ -0,0 +1,34 @@
+<?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 -->
+  <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"/>
+  </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"/>
+  </job>
+  <!-- Control-flow dependencies -->
+  <child ref="3">
+    <parent ref="2"/>
+  </child>
+  <!-- add a cycle on purpose. It won't be a DAG anymore -->
+  <child ref="1">
+    <parent ref="3"/>
+  </child>
+</adag>