<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
If you preserve the order of statements, statement 1 and 2 would get
done first, in parallel if enough resources were available. However,
statement 3 could not be evaluated until the complex function runs, at
which time it can be added to the DAG and executed. <br>
<br>
This implies that you don't need a complete DAG in order to execute the
DAG. In other words, start building the DAG as much as you can with
static information, but also start executing the DAG as soon as there
is anything in the DAG. This would not work if you had to build the
entire DAG apriori to starting to execute it, due to the dynamic nature
of the data dependency.<br>
<br>
So, your question about what should happen here, is that at run time
you figure out the value of the complex function, and execute the
statement accordingly. In the end, a[2] will have the same value as
a[0] or a[1]. In theory, I don't see why this example would have to
deadlock. Also, I don't think the order of the statements should be
changed, for example moving statement statement 3 up and statement 2
down, preventing the a[2] overwrite. Assuming you cannot re-arrange the
statements order when there are dependencies (and there are between
statement 2 and 3), then this should work without any deadlocks. <br>
<br>
Mihael Hategan wrote:
<blockquote cite="mid:1266602670.27070.8.camel@localhost" type="cite">
<pre wrap="">On Fri, 2010-02-19 at 11:50 -0600, Ioan Raicu wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I think we are on the same page, that if you cannot resolve the
dependencies, things just fall apart. The part I don't get, is why
would you get a deadlock in this situation (which is where this whole
discussion started from), as opposed to an error detecting that the
DAG cannot be constructed? It seems that at the time of DAG
construction (I assume this is the SwiftScript compilation stage), any
failure to add nodes to the DAG due to unresolved dependencies should
return an error and halt, rather than execute until the deadlock
happens.
</pre>
</blockquote>
<pre wrap=""><!---->
a[0] = 0;
a[1] = a[2];
a[2] = a[complexFunctionThatReturns0or1()];
What should happen there?
_______________________________________________
Swift-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Swift-devel@ci.uchicago.edu">Swift-devel@ci.uchicago.edu</a>
<a class="moz-txt-link-freetext" href="http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel">http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
=================================================================
Ioan Raicu, Ph.D.
NSF/CRA Computing Innovation Fellow
=================================================================
Center for Ultra-scale Computing and Information Security (CUCIS)
Department of Electrical Engineering and Computer Science
Northwestern University
2145 Sheridan Rd, Tech M384
Evanston, IL 60208-3118
=================================================================
Cel: 1-847-722-0876
Tel: 1-847-491-8163
Email: <a class="moz-txt-link-abbreviated" href="mailto:iraicu@eecs.northwestern.edu">iraicu@eecs.northwestern.edu</a>
Web: <a class="moz-txt-link-freetext" href="http://www.eecs.northwestern.edu/~iraicu/">http://www.eecs.northwestern.edu/~iraicu/</a>
<a class="moz-txt-link-freetext" href="https://wiki.cucis.eecs.northwestern.edu/">https://wiki.cucis.eecs.northwestern.edu/</a>
=================================================================
=================================================================
</pre>
</body>
</html>