<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Thank Mike, today was a good day :)</span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Tim, sure, I can try that once we have a large enough net to catch bugs here. </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I will try adding some logging to see progress on the fibonacci code.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Here's the stats for the fibonacci code, and as Tim noted the code is not recursive.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><div>fibonacci stats (x_func.swift) : </div>
<div>1K -> 3.059s</div><div>10K -> 5.047s (double check results here)</div><div>100K -> 31.85s</div><div>1M -> Exception in thread "Hang checker"</div><div class="im" style="color:rgb(80,0,80)">
<div> java.lang.StackOverflowError</div><div> at java.util.HashMap.put(HashMap.java:484)</div><div> at java.util.HashSet.add(HashSet.java:217)</div><div><br></div></div><div>I have a recursion code to calculate N+(N-1)... +2+1 (code : x_recursion.swift).</div>
<div>This one fails much faster and with very different logs and exceptions:</div><div><div>x_recursion stats: </div><div>1K -> 25s real (i5 8gb)</div><div>10K -> (10% ram 8gb in use by java)</div><div>Uncaught exception: java.lang.StackOverflowError in vdl:unitstart @ x_recursion.kml, line: 45</div>
<div>java.lang.StackOverflowError</div><div> at java.lang.String.valueOf(String.java:2959)</div><div> at org.globus.cog.karajan.util.ThreadingContext.toString(ThreadingContext.java:87)</div><div> at org.globus.cog.karajan.util.ThreadingContext.toString(ThreadingContext.java:87)</div>
<div> ...</div><div>Exception is: java.lang.StackOverflowError</div><div>Near Karajan line: vdl:unitstart @ x_recursion.kml, line: 45</div><div>Another uncaught exception while handling an uncaught exception.</div>
<div>java.lang.StackOverflowError</div><div> at org.globus.cog.karajan.workflow.nodes.FlowNode.failImmediately(FlowNode.java:77)</div><div> at org.globus.cog.karajan.workflow.nodes.FlowNode.failed(FlowNode.java:245)</div>
<div> ...</div><div>The initial exception was</div><div>java.lang.StackOverflowError</div><div> at java.lang.String.valueOf(String.java:2959)</div><div> at org.globus.cog.karajan.util.ThreadingContext.toString(ThreadingContext.java:87)</div>
<div> at org.globus.cog.karajan.util.ThreadingContext.toString(ThreadingContext.java:87)</div><div><br></div><div>100K -> ?</div></div><div><br></div><div><br></div><div>-Yadu</div></div><br><div class="gmail_quote">
On Sat, Mar 2, 2013 at 1:35 AM, Tim Armstrong <span dir="ltr"><<a href="mailto:tim.g.armstrong@gmail.com" target="_blank">tim.g.armstrong@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yadu, awesome, feel free to try and break Swift/T as well :)<br><br>There isn't any recursion in Yadu's code - it looks like there's a recursive call in the hang checker.<span class="HOEnZb"><font color="#888888"><br>
<br>- Tim</font></span><div class="HOEnZb"><div class="h5"><br><br><br><div class="gmail_quote">
On Fri, Mar 1, 2013 at 2:01 PM, Michael Wilde <span dir="ltr"><<a href="mailto:wilde@mcs.anl.gov" target="_blank">wilde@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hurray!!!! Nice work, Yadu.<br>
<br>
I think you need to do a few things here:<br>
<br>
- put in some (perhaps periodic) logging to see how far fib progressed<br>
- try a non-recursive example: fib() is not reflective of most swift scripts and excessively challenges the call stack<br>
- learn how to control Java heap and stack limits (the former is documented *I think* in the User Guide and if not needs to be, and should be, in the release notes<br>
<br>
Others may have some more specific guidance for you.<br>
<br>
- Mike<br>
<div><div><br>
<br>
----- Original Message -----<br>
> From: "Yadu Nand" <<a href="mailto:yadudoc1729@gmail.com" target="_blank">yadudoc1729@gmail.com</a>><br>
> To: "swift-devel" <<a href="mailto:swift-devel@ci.uchicago.edu" target="_blank">swift-devel@ci.uchicago.edu</a>><br>
> Sent: Friday, March 1, 2013 1:23:27 PM<br>
> Subject: [Swift-devel] Swift crashing for runs with 1M calls<br>
><br>
><br>
> Hi,<br>
><br>
><br>
> I'm trying to see swift behavior with some stress on and I see<br>
> crashes at close to 1M calls/loops.<br>
><br>
><br>
> Here's one such case ( x_func.swift code is here -><br>
> <a href="https://github.com/yadudoc/swift-basics/blob/master/stress/x_func.swift" target="_blank">https://github.com/yadudoc/swift-basics/blob/master/stress/x_func.swift</a><br>
> ):<br>
> Test run with 0.94 ( corei5 with 8Gb ram)<br>
><br>
><br>
> yadu@Miranda:~/src/swift-basics/stress$ time swift x_func.swift<br>
> -loops=1000000<br>
> Swift 0.94RC3 swift-r6268 cog-r3605<br>
><br>
><br>
> RunID: 20130302-0019-l2alv5d2<br>
> Progress: time: Sat, 02 Mar 2013 00:19:38 +0530<br>
> Fibonacci[2] = 1<br>
> No events in 10s.<br>
> Progress: time: Sat, 02 Mar 2013 00:20:08 +0530<br>
> Progress: time: Sat, 02 Mar 2013 00:20:38 +0530<br>
> Progress: time: Sat, 02 Mar 2013 00:21:08 +0530<br>
> Progress: time: Sat, 02 Mar 2013 00:21:38 +0530<br>
> Progress: time: Sat, 02 Mar 2013 00:22:08 +0530<br>
> Progress: time: Sat, 02 Mar 2013 00:22:38 +0530<br>
> Progress: time: Sat, 02 Mar 2013 00:23:08 +0530<br>
> Finding dependency loops...Exception in thread "Hang checker"<br>
> java.lang.StackOverflowError<br>
> at java.util.HashMap.put(HashMap.java:484)<br>
> at java.util.HashSet.add(HashSet.java:217)<br>
> at org.griphyn.vdl.karajan.HangChecker.findLoop(HangChecker.java:299)<br>
> at org.griphyn.vdl.karajan.HangChecker.findLoop(HangChecker.java:303)<br>
><br>
><br>
> Earlier I had posted about iterate failing to compile on 0.94. I ran<br>
> a few tests on 0.93<br>
> (code :<br>
> <a href="https://github.com/yadudoc/swift-basics/blob/master/stress/x_iterate.swift" target="_blank">https://github.com/yadudoc/swift-basics/blob/master/stress/x_iterate.swift</a><br>
> ) with<br>
> results:<br>
> 100K loops -> 17s real<br>
> 1M loops -> No response for a while, then java.lang.OutOfMemory<br>
> exception thrown.<br>
><br>
><br>
> I'm finding it difficult to keep stats so, I'm placing the stats and<br>
> as much run info as<br>
> possible in comments in the scripts themselves. All the scripts are<br>
> here -><br>
> <a href="https://github.com/yadudoc/swift-basics/tree/master/stress" target="_blank">https://github.com/yadudoc/swift-basics/tree/master/stress</a><br>
><br>
><br>
><br>
><br>
> -Yadu<br>
</div></div>> _______________________________________________<br>
> Swift-devel mailing list<br>
> <a href="mailto:Swift-devel@ci.uchicago.edu" target="_blank">Swift-devel@ci.uchicago.edu</a><br>
> <a href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel" target="_blank">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel</a><br>
><br>
_______________________________________________<br>
Swift-devel mailing list<br>
<a href="mailto:Swift-devel@ci.uchicago.edu" target="_blank">Swift-devel@ci.uchicago.edu</a><br>
<a href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel" target="_blank">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel</a><br>
</blockquote></div><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Thanks and Regards,<br>Yadu Nand B<br>