<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi Mihael,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
Is this the same issue that was discussed in this mail -></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><a href="http://lists.ci.uchicago.edu/pipermail/swift-devel/2013-March/010109.html" style="font-family:arial">http://lists.ci.uchicago.edu/pipermail/swift-devel/2013-March/010109.html</a></div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
I am seeing this script failing on trunk (but not on 0.94). The internals stress test</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">runs this script which does an assignment to an array within an iterate loop -> </div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><a href="https://github.com/yadudoc/swift-basics/blob/master/stress/x_iterate.swift" style="font-family:arial">https://github.com/yadudoc/swift-basics/blob/master/stress/x_iterate.swift</a></div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">The test-suite has some pending issues on trunk, which I haven't cleaned up yet,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
and which is why this went under the radar.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Here's the error I get when running stress/x_iterate.swift:</div>
<div class="gmail_default"><div class="gmail_default"><font face="arial, helvetica, sans-serif">[yadunand@midway001 x_iterate-142712]$ swift x_iterate.swift -loops=5</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Swift trunk swift-r7071 (swift modified locally) cog-r3787 (cog modified locally)</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif">RunID: 20130916-1936-i6mqe9qa</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">[Error] sites.xml, line 1, col 9: cvc-elt.1: Cannot find the declaration of element 'config'.</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif">Progress: time: Mon, 16 Sep 2013 19:36:50 +0000</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Result[0] = 0 </font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Execution failed:</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">java.lang.IndexOutOfBoundsException: Invalid index [4] for result</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>tracef @ x_iterate, line: 56</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Caused by: java.lang.IndexOutOfBoundsException: Invalid index [4] for result</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>at org.griphyn.vdl.mapping.AbstractDataNode.checkNoValue(AbstractDataNode.java:716)</font></div><div class="gmail_default">
<font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>at org.griphyn.vdl.mapping.AbstractDataNode.waitFor(AbstractDataNode.java:682)</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>at org.griphyn.vdl.karajan.lib.SwiftFunction.waitForAll(SwiftFunction.java:343)</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>at org.griphyn.vdl.karajan.lib.swiftscript.Tracef.function(Tracef.java:57)</font></div><div class="gmail_default">
<font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>at org.griphyn.vdl.karajan.lib.SwiftFunction.runBody(SwiftFunction.java:108)</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>at org.globus.cog.karajan.compiled.nodes.InternalFunction.run(InternalFunction.java:154)</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>at org.globus.cog.karajan.compiled.nodes.CompoundNode.runChild(CompoundNode.java:87)</font></div><div class="gmail_default">
<font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>at org.globus.cog.karajan.compiled.nodes.Sequential.run(Sequential.java:22)</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>at org.globus.cog.karajan.compiled.nodes.CompoundNode.runChild(CompoundNode.java:87)</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>at org.globus.cog.karajan.compiled.nodes.UParallel$1.run(UParallel.java:68)</font></div><div class="gmail_default">
<font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>at k.thr.LWThread.run(LWThread.java:228)</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)</font></div><div class="gmail_default">
<font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>at java.lang.Thread.run(Thread.java:722)</font></div><div style="font-family:arial,helvetica,sans-serif"><br></div></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
Here's the error I'm getting when running Ketan's code :</div><div class="gmail_default"><div class="gmail_default"><font face="arial, helvetica, sans-serif">Execution failed:</font></div><div class="gmail_default">
<font face="arial, helvetica, sans-serif">org.griphyn.vdl.mapping.InvalidPathException: Array index '[2]' not found for out of size 2</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>swift:getFieldSubscript @ iterate, line: 93</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif">Caused by: org.griphyn.vdl.mapping.InvalidPathException: Array index '[2]' not found for out of size 2</font></div><div style="font-family:arial,helvetica,sans-serif">
<br></div></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Are these coming from the same bug ?</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
Thanks,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">-Yadu<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Mon, Sep 16, 2013 at 1:52 PM, Mihael Hategan <span dir="ltr"><<a href="mailto:hategan@mcs.anl.gov" target="_blank">hategan@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">
I can confirm that this is an issue with write reference counting in<br>
trunk. I'm working on it.<br>
<div class="HOEnZb"><div class="h5"><br>
On Mon, 2013-09-16 at 11:29 -0500, Michael Wilde wrote:<br>
> If this is indeed failing on trunk, hopefully the test suite will see the same thing.<br>
> Yadu, can you look into this and file a ticket if its indeed a trunk bug?<br>
><br>
> Thanks,<br>
><br>
> - Mike<br>
><br>
> ----- Original Message -----<br>
> > From: "Ketan Maheshwari" <<a href="mailto:ketancmaheshwari@gmail.com">ketancmaheshwari@gmail.com</a>><br>
> > To: "Michael Wilde" <<a href="mailto:wilde@mcs.anl.gov">wilde@mcs.anl.gov</a>><br>
> > Cc: "Swift Devel" <<a href="mailto:swift-devel@ci.uchicago.edu">swift-devel@ci.uchicago.edu</a>><br>
> > Sent: Monday, September 16, 2013 11:23:54 AM<br>
> > Subject: Re: [Swift-devel] iterate fails<br>
> ><br>
> ><br>
> ><br>
> > Mike,<br>
> ><br>
> > I am using the latest trunk:<br>
> > Swift trunk swift-r7065 (swift modified locally) cog-r3782<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > On Mon, Sep 16, 2013 at 11:20 AM, Michael Wilde < <a href="mailto:wilde@mcs.anl.gov">wilde@mcs.anl.gov</a> ><br>
> > wrote:<br>
> ><br>
> ><br>
> > Ketan, this worked for me (see below). What version of swift did you<br>
> > run where?<br>
> ><br>
> > I ran on swift.rcc, on localhost.<br>
> ><br>
> > - Mike<br>
> ><br>
> > swift$ swift km2.swift -data=data.txt<br>
> > Swift 0.94.1 RC2 swift-r6895 cog-r3765<br>
> ><br>
> > RunID: 20130916-1617-i570fay7<br>
> > Progress: time: Mon, 16 Sep 2013 16:17:32 +0000<br>
> > Final status: Mon, 16 Sep 2013 16:17:33 +0000 Finished successfully:3<br>
> ><br>
> > swift$ ls -lt outdir | head<br>
> > total 16032<br>
> > -rw-r--r-- 1 wilde wilde 9 Sep 16 11:17 f.0002.out<br>
> > -rw-r--r-- 1 wilde wilde 9 Sep 16 11:17 f.0001.out<br>
> > -rw-rw-r-- 1 wilde wilde 9 Sep 16 11:17 f.0000.out<br>
> > -rw-rw-r-- 1 wilde wilde 9 Jul 27 17:05 f.0483.out<br>
> > -rw-rw-r-- 1 wilde wilde 9 Jul 27 17:05 f.0490.out<br>
> > -rw-rw-r-- 1 wilde wilde 9 Jul 27 17:05 f.0488.out<br>
> > -rw-rw-r-- 1 wilde wilde 9 Jul 27 17:05 f.0500.out<br>
> > -rw-rw-r-- 1 wilde wilde 9 Jul 27 17:05 f.0498.out<br>
> > -rw-rw-r-- 1 wilde wilde 9 Jul 27 17:05 f.0491.out<br>
> > swift$ swift -version<br>
> > Swift 0.94.1 RC2 swift-r6895 cog-r3765<br>
> ><br>
> > swift$<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > ----- Original Message -----<br>
> > > From: "Ketan Maheshwari" < <a href="mailto:ketancmaheshwari@gmail.com">ketancmaheshwari@gmail.com</a> ><br>
> > > To: "Swift Devel" < <a href="mailto:swift-devel@ci.uchicago.edu">swift-devel@ci.uchicago.edu</a> ><br>
> > > Sent: Monday, September 16, 2013 10:49:07 AM<br>
> > > Subject: [Swift-devel] iterate fails<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > Hi,<br>
> > ><br>
> > > I am trying a catsn example with foreach replaced by iterate as<br>
> > > follows:<br>
> > ><br>
> > > ===<br>
> > > type file;<br>
> > ><br>
> > > app (file o) cat (file i) {<br>
> > > cat @i stdout=@o;<br>
> > > }<br>
> > > file out[]<simple_mapper; location="outdir",<br>
> > > prefix="f.",suffix=".out">;<br>
> > ><br>
> > > string d=@arg("data");<br>
> > ><br>
> > > #foreach j in [1:1000] {<br>
> > > iterate j {<br>
> > > file data<single_file_mapper; file=d>;<br>
> > > out[j] = cat(data);<br>
> > > } until (j==3);<br>
> > ><br>
> > ><br>
> > > ===<br>
> > ><br>
> > ><br>
> > > The run fails with error message as follows:<br>
> > > $ swift -tc.file tc -config cf -sites.file sites.xml catsn.swift<br>
> > > -data=data.txt<br>
> > > Swift trunk swift-r7065 (swift modified locally) cog-r3782<br>
> > > RunID: 20130916-1045-tldyyexe<br>
> > > Progress: time: Mon, 16 Sep 2013 10:45:41 -0500<br>
> > ><br>
> > > Execution failed:<br>
> > > org.griphyn.vdl.mapping.InvalidPathException: Array index '[2]' not<br>
> > > found for out of size 2<br>
> > > swift:getFieldSubscript @ catsn, line: 93<br>
> > > Caused by: org.griphyn.vdl.mapping.InvalidPathException: Array<br>
> > > index<br>
> > > '[2]' not found for out of size 2<br>
> > ><br>
> > ><br>
> > ><br>
> > > Any suggestions?<br>
> > ><br>
> > ><br>
> > > Thanks,<br>
> > ><br>
> > > --<br>
> > > Ketan<br>
> > ><br>
> > ><br>
> > > _______________________________________________<br>
> > > Swift-devel mailing list<br>
> > > <a href="mailto:Swift-devel@ci.uchicago.edu">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>
> ><br>
> ><br>
> > --<br>
> > Ketan<br>
> ><br>
> ><br>
> _______________________________________________<br>
> Swift-devel mailing list<br>
> <a href="mailto:Swift-devel@ci.uchicago.edu">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>
_______________________________________________<br>
Swift-devel mailing list<br>
<a href="mailto:Swift-devel@ci.uchicago.edu">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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Yadu Nand B<div><br></div></div>
</div>