Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simplify and fix cycle detection
[simgrid.git] / examples / simdag / dag-dotload / sd_dag-dotload.tesh
1 #! ./tesh
2 p Test the loader of DAG written in the DOT format
3
4 $ $SG_TEST_EXENV ${bindir:=.}/dag-dotload/sd_dag-dotload --log=no_loc ${srcdir:=.}/../platforms/two_clusters.xml ${srcdir:=.}/dag-dotload/dag.dot
5 > [0.000000] [xbt_cfg/INFO] Switching to the L07 model to handle parallel tasks.
6 > [0.000000] [test/INFO] ------------------- Display all tasks of the loaded DAG ---------------------------
7 > [0.000000] [sd_task/INFO] Displaying task root
8 > [0.000000] [sd_task/INFO]   - state: schedulable not runnable
9 > [0.000000] [sd_task/INFO]   - kind: sequential computation
10 > [0.000000] [sd_task/INFO]   - amount: 0
11 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 0
12 > [0.000000] [sd_task/INFO]   - post-dependencies:
13 > [0.000000] [sd_task/INFO]     0
14 > [0.000000] [sd_task/INFO]     root->5
15 > [0.000000] [sd_task/INFO] Displaying task 0
16 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
17 > [0.000000] [sd_task/INFO]   - kind: sequential computation
18 > [0.000000] [sd_task/INFO]   - amount: 10000000129
19 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
20 > [0.000000] [sd_task/INFO]   - pre-dependencies:
21 > [0.000000] [sd_task/INFO]     root
22 > [0.000000] [sd_task/INFO]   - post-dependencies:
23 > [0.000000] [sd_task/INFO]     0->1
24 > [0.000000] [sd_task/INFO] Displaying task 1
25 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
26 > [0.000000] [sd_task/INFO]   - kind: sequential computation
27 > [0.000000] [sd_task/INFO]   - amount: 10000000131
28 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
29 > [0.000000] [sd_task/INFO]   - pre-dependencies:
30 > [0.000000] [sd_task/INFO]     0->1
31 > [0.000000] [sd_task/INFO]   - post-dependencies:
32 > [0.000000] [sd_task/INFO]     1->2
33 > [0.000000] [sd_task/INFO] Displaying task 2
34 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
35 > [0.000000] [sd_task/INFO]   - kind: sequential computation
36 > [0.000000] [sd_task/INFO]   - amount: 10000000121
37 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
38 > [0.000000] [sd_task/INFO]   - pre-dependencies:
39 > [0.000000] [sd_task/INFO]     1->2
40 > [0.000000] [sd_task/INFO]   - post-dependencies:
41 > [0.000000] [sd_task/INFO]     2->3
42 > [0.000000] [sd_task/INFO] Displaying task 3
43 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
44 > [0.000000] [sd_task/INFO]   - kind: sequential computation
45 > [0.000000] [sd_task/INFO]   - amount: 10000000231
46 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
47 > [0.000000] [sd_task/INFO]   - pre-dependencies:
48 > [0.000000] [sd_task/INFO]     2->3
49 > [0.000000] [sd_task/INFO]   - post-dependencies:
50 > [0.000000] [sd_task/INFO]     4
51 > [0.000000] [sd_task/INFO] Displaying task 4
52 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
53 > [0.000000] [sd_task/INFO]   - kind: sequential computation
54 > [0.000000] [sd_task/INFO]   - amount: 10000000005
55 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
56 > [0.000000] [sd_task/INFO]   - pre-dependencies:
57 > [0.000000] [sd_task/INFO]     3
58 > [0.000000] [sd_task/INFO]   - post-dependencies:
59 > [0.000000] [sd_task/INFO]     4->5
60 > [0.000000] [sd_task/INFO] Displaying task 5
61 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
62 > [0.000000] [sd_task/INFO]   - kind: sequential computation
63 > [0.000000] [sd_task/INFO]   - amount: 10000000046
64 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 2
65 > [0.000000] [sd_task/INFO]   - pre-dependencies:
66 > [0.000000] [sd_task/INFO]     4->5
67 > [0.000000] [sd_task/INFO]     root->5
68 > [0.000000] [sd_task/INFO]   - post-dependencies:
69 > [0.000000] [sd_task/INFO]     6
70 > [0.000000] [sd_task/INFO] Displaying task 6
71 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
72 > [0.000000] [sd_task/INFO]   - kind: sequential computation
73 > [0.000000] [sd_task/INFO]   - amount: 10000000092
74 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
75 > [0.000000] [sd_task/INFO]   - pre-dependencies:
76 > [0.000000] [sd_task/INFO]     5
77 > [0.000000] [sd_task/INFO]   - post-dependencies:
78 > [0.000000] [sd_task/INFO]     6->7
79 > [0.000000] [sd_task/INFO] Displaying task 7
80 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
81 > [0.000000] [sd_task/INFO]   - kind: sequential computation
82 > [0.000000] [sd_task/INFO]   - amount: 10000000041
83 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
84 > [0.000000] [sd_task/INFO]   - pre-dependencies:
85 > [0.000000] [sd_task/INFO]     6->7
86 > [0.000000] [sd_task/INFO]   - post-dependencies:
87 > [0.000000] [sd_task/INFO]     7->8
88 > [0.000000] [sd_task/INFO]     7->end
89 > [0.000000] [sd_task/INFO] Displaying task 8
90 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
91 > [0.000000] [sd_task/INFO]   - kind: sequential computation
92 > [0.000000] [sd_task/INFO]   - amount: 10000000250
93 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
94 > [0.000000] [sd_task/INFO]   - pre-dependencies:
95 > [0.000000] [sd_task/INFO]     7->8
96 > [0.000000] [sd_task/INFO]   - post-dependencies:
97 > [0.000000] [sd_task/INFO]     9
98 > [0.000000] [sd_task/INFO] Displaying task 9
99 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
100 > [0.000000] [sd_task/INFO]   - kind: sequential computation
101 > [0.000000] [sd_task/INFO]   - amount: 10000000079
102 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
103 > [0.000000] [sd_task/INFO]   - pre-dependencies:
104 > [0.000000] [sd_task/INFO]     8
105 > [0.000000] [sd_task/INFO]   - post-dependencies:
106 > [0.000000] [sd_task/INFO]     end
107 > [0.000000] [sd_task/INFO] Displaying task 0->1
108 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
109 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
110 > [0.000000] [sd_task/INFO]   - amount: 10001
111 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
112 > [0.000000] [sd_task/INFO]   - pre-dependencies:
113 > [0.000000] [sd_task/INFO]     0
114 > [0.000000] [sd_task/INFO]   - post-dependencies:
115 > [0.000000] [sd_task/INFO]     1
116 > [0.000000] [sd_task/INFO] Displaying task 1->2
117 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
118 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
119 > [0.000000] [sd_task/INFO]   - amount: 10004
120 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
121 > [0.000000] [sd_task/INFO]   - pre-dependencies:
122 > [0.000000] [sd_task/INFO]     1
123 > [0.000000] [sd_task/INFO]   - post-dependencies:
124 > [0.000000] [sd_task/INFO]     2
125 > [0.000000] [sd_task/INFO] Displaying task 2->3
126 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
127 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
128 > [0.000000] [sd_task/INFO]   - amount: 10002
129 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
130 > [0.000000] [sd_task/INFO]   - pre-dependencies:
131 > [0.000000] [sd_task/INFO]     2
132 > [0.000000] [sd_task/INFO]   - post-dependencies:
133 > [0.000000] [sd_task/INFO]     3
134 > [0.000000] [sd_task/INFO] Displaying task 4->5
135 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
136 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
137 > [0.000000] [sd_task/INFO]   - amount: 10029
138 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
139 > [0.000000] [sd_task/INFO]   - pre-dependencies:
140 > [0.000000] [sd_task/INFO]     4
141 > [0.000000] [sd_task/INFO]   - post-dependencies:
142 > [0.000000] [sd_task/INFO]     5
143 > [0.000000] [sd_task/INFO] Displaying task 6->7
144 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
145 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
146 > [0.000000] [sd_task/INFO]   - amount: 10005
147 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
148 > [0.000000] [sd_task/INFO]   - pre-dependencies:
149 > [0.000000] [sd_task/INFO]     6
150 > [0.000000] [sd_task/INFO]   - post-dependencies:
151 > [0.000000] [sd_task/INFO]     7
152 > [0.000000] [sd_task/INFO] Displaying task 7->8
153 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
154 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
155 > [0.000000] [sd_task/INFO]   - amount: 10000
156 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
157 > [0.000000] [sd_task/INFO]   - pre-dependencies:
158 > [0.000000] [sd_task/INFO]     7
159 > [0.000000] [sd_task/INFO]   - post-dependencies:
160 > [0.000000] [sd_task/INFO]     8
161 > [0.000000] [sd_task/INFO] Displaying task 7->end
162 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
163 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
164 > [0.000000] [sd_task/INFO]   - amount: 10014000
165 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
166 > [0.000000] [sd_task/INFO]   - pre-dependencies:
167 > [0.000000] [sd_task/INFO]     7
168 > [0.000000] [sd_task/INFO]   - post-dependencies:
169 > [0.000000] [sd_task/INFO]     end
170 > [0.000000] [sd_task/INFO] Displaying task root->5
171 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
172 > [0.000000] [sd_task/INFO]   - kind: end-to-end communication
173 > [0.000000] [sd_task/INFO]   - amount: 10014000
174 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 1
175 > [0.000000] [sd_task/INFO]   - pre-dependencies:
176 > [0.000000] [sd_task/INFO]     root
177 > [0.000000] [sd_task/INFO]   - post-dependencies:
178 > [0.000000] [sd_task/INFO]     5
179 > [0.000000] [sd_task/INFO] Displaying task end
180 > [0.000000] [sd_task/INFO]   - state: not scheduled not runnable
181 > [0.000000] [sd_task/INFO]   - kind: sequential computation
182 > [0.000000] [sd_task/INFO]   - amount: 10000000129
183 > [0.000000] [sd_task/INFO]   - Dependencies to satisfy: 2
184 > [0.000000] [sd_task/INFO]   - pre-dependencies:
185 > [0.000000] [sd_task/INFO]     9
186 > [0.000000] [sd_task/INFO]     7->end
187 > [0.000000] [test/INFO] ------------------- Schedule tasks ---------------------------
188 > [0.000000] [test/INFO] ------------------- Run the schedule ---------------------------
189 > [110.006082] [test/INFO] ------------------- Produce the trace file---------------------------
190 > [110.006082] [test/INFO] Producing the trace of the run into dag.trace
191
192 $ cat ${srcdir:=.}/dag-dotload/dag.trace
193 > [0.000000->0.000000] node-3.acme.org compute 0.000000 flops # root
194 > [0.000000->10.000000] node-7.acme.org compute 10000000129.452715 flops # 0
195 > [10.001680->20.001680] node-10.acme.org compute 10000000131.133657 flops # 1
196 > [20.002360->30.002360] node-14.acme.org compute 10000000121.124870 flops # 2
197 > [30.003040->40.003041] node-18.acme.org compute 10000000230.608025 flops # 3
198 > [40.003041->50.003041] node-0.acme.org compute 10000000004.994019 flops # 4
199 > [50.003721->60.003721] node-4.acme.org compute 10000000046.016401 flops # 5
200 > [60.003721->70.003721] node-8.acme.org compute 10000000091.598791 flops # 6
201 > [70.005401->80.005401] node-11.acme.org compute 10000000040.679438 flops # 7
202 > [80.006081->90.006081] node-15.acme.org compute 10000000250.490017 flops # 8
203 > [90.006081->100.006081] node-19.acme.org compute 10000000079.267649 flops # 9
204 > [10.000000 -> 10.001680] node-7.acme.org -> node-10.acme.org transfer of 10001 bytes # 0->1
205 > [20.001680 -> 20.002360] node-10.acme.org -> node-14.acme.org transfer of 10004 bytes # 1->2
206 > [30.002360 -> 30.003040] node-14.acme.org -> node-18.acme.org transfer of 10002 bytes # 2->3
207 > [50.003041 -> 50.003721] node-0.acme.org -> node-4.acme.org transfer of 10029 bytes # 4->5
208 > [70.003721 -> 70.005401] node-8.acme.org -> node-11.acme.org transfer of 10005 bytes # 6->7
209 > [80.005401 -> 80.006081] node-11.acme.org -> node-15.acme.org transfer of 10000 bytes # 7->8
210 > [80.005401 -> 80.087113] node-11.acme.org -> node-3.acme.org transfer of 10014000 bytes # 7->end
211 > [0.000000 -> 0.080712] node-3.acme.org -> node-4.acme.org transfer of 10014000 bytes # root->5
212 > [100.006081->110.006082] node-3.acme.org compute 10000000129.452715 flops # end
213
214 $ rm -f ${srcdir:=.}/dag-dotload/dag.trace ${srcdir:=.}/dot.dot
215
216 ! expect return 2
217 $ $SG_TEST_EXENV ${bindir:=.}/dag-dotload/sd_dag-dotload --log=no_loc ${srcdir:=.}/../platforms/two_clusters.xml ${srcdir:=.}/dag-dotload/dag_with_cycle.dot
218 > [0.000000] [xbt_cfg/INFO] Switching to the L07 model to handle parallel tasks.
219 > [0.000000] [sd_daxparse/WARNING] the task root is not marked
220 > [0.000000] [sd_daxparse/WARNING] the task 1 is in a cycle
221 > [0.000000] [sd_daxparse/WARNING] the task 2 is in a cycle
222 > [0.000000] [sd_daxparse/WARNING] the task 3 is in a cycle
223 > [0.000000] [sd_daxparse/WARNING] the task 4 is in a cycle
224 > [0.000000] [sd_daxparse/WARNING] the task 5 is in a cycle
225 > [0.000000] [sd_daxparse/WARNING] the task 6 is in a cycle
226 > [0.000000] [sd_dotparse/ERROR] The DOT described in dag_with_cycle.dot is not a DAG. It contains a cycle.
227 > [0.000000] [test/CRITICAL] No dot loaded. Do you have a cycle in your graph?