<div dir="ltr">I have filed this as Swift bug:<br><br><a href="https://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=1099">https://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=1099</a><br></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Fri, Sep 20, 2013 at 4:37 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 this bug. Apps don't properly wait for arrays.<br>
<span class="HOEnZb"><font color="#888888"><br>
Mihael<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Fri, 2013-09-20 at 14:08 -0500, Ketan Maheshwari wrote:<br>
> Hi,<br>
><br>
> I am working with APS user Hemant Sharma (in CC) on one of his projects.<br>
> Hemant wrote a Swift script which has about three foreach invocations which<br>
> he wants to run one after other.<br>
><br>
> In order to achieve this coordination, Hemant is using an int[] in one loop<br>
> which is passed as input to the app call of another loop. He observes that<br>
> the coordination is not maintained and both app calls happen simultaneously<br>
> resulting in application error.<br>
><br>
> Here is a quick reproduction I tried and I observe indeed that coordination<br>
> is not happening:<br>
><br>
> $ cat dummy.swift<br>
> type file;<br>
><br>
> app (file out) A (string in1){<br>
> dummyA in1 stdout=@out;<br>
> }<br>
><br>
> app (file out) B (string in1, int[] _art){<br>
> dummyB in1 stdout=@out;<br>
> }<br>
><br>
> file outfileA[]<simple_mapper; location="outdir",<br>
> prefix="a.",suffix=".out">;<br>
> file outfileB[]<simple_mapper; location="outdir",<br>
> prefix="b.",suffix=".out">;<br>
><br>
> int art[];<br>
> foreach i in [0:3]{<br>
> outfileA[i] = A ("astring");<br>
> art[i]=i;<br>
> }<br>
><br>
> foreach j in [0:3]{<br>
> outfileB[j] = B ("bstring", art);<br>
> }<br>
><br>
> Since the art array is wholly required in app B, one would expect the first<br>
> foreach to finish befor the call to B gets invoked. This is not happening<br>
> in my simple test where I ask the executable called by A to sleep for 5 sec<br>
> and that called by B to print timestamp and quit.<br>
><br>
> I see in the resulting files that the timestamps in B precede those in A.<br>
><br>
> This looks like a bug to me. Swift is 0.94 swift-r7091 cog-r3789.<br>
><br>
> Thanks,<br>
> Hi,<br>
><br>
><br>
> I am working with APS user Hemant Sharma (in CC) on one of his<br>
> projects. Hemant wrote a Swift script which has about three foreach<br>
> invocations which he wants to run one after other.<br>
><br>
><br>
> In order to achieve this coordination, Hemant is using an int[] in one<br>
> loop which is passed as input to the app call of another loop. He<br>
> observes that the coordination is not maintained and both app calls<br>
> happen simultaneously resulting in application error.<br>
><br>
><br>
> Here is a quick reproduction I tried and I observe indeed that<br>
> coordination is not happening:<br>
><br>
> $ cat dummy.swift<br>
> type file;<br>
><br>
> app (file out) A (string in1){<br>
> dummyA in1 stdout=@out;<br>
> }<br>
><br>
> app (file out) B (string in1, int[] _art){<br>
> dummyB in1 stdout=@out;<br>
> }<br>
><br>
> file outfileA[]<simple_mapper; location="outdir",<br>
> prefix="a.",suffix=".out">;<br>
> file outfileB[]<simple_mapper; location="outdir",<br>
> prefix="b.",suffix=".out">;<br>
><br>
> int art[];<br>
> foreach i in [0:3]{<br>
> outfileA[i] = A ("astring");<br>
> art[i]=i;<br>
> }<br>
><br>
> foreach j in [0:3]{<br>
> outfileB[j] = B ("bstring", art);<br>
> }<br>
><br>
><br>
> Since the art array is wholly required in app B, one would expect the<br>
> first foreach to finish befor the call to B gets invoked. This is not<br>
> happening in my simple test where I ask the executable called by A to<br>
> sleep for 5 sec and that called by B to print timestamp and quit.<br>
><br>
><br>
> I see in the resulting files that the timestamps in B precede those in<br>
> A.<br>
><br>
><br>
> This looks like a bug to me. Swift is 0.94 swift-r7091 cog-r3789.<br>
><br>
><br>
><br>
> Thanks,<br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> Swift-user mailing list<br>
> <a href="mailto:Swift-user@ci.uchicago.edu">Swift-user@ci.uchicago.edu</a><br>
> <a href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user" target="_blank">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user</a><br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><font face="'courier new', monospace">Ketan</font><br><br>
</div>