<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">oh! that's good! thanks. -- mark<div><br><div><div>On Nov 22, 2011, at 2:13 PM, Michael Wilde wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Replace your prior implementation of bar() with this, and you then have a reall array solution (workaround) until the @filenames() bug is fixed:<br><br>app ( file result ) barapp ( file files[], string s[])<br>{<br> ls "-lt" s stdout=@result;<br>}<br><br>(file result) bar (file files[] )<br>{<br> string s[];<br> foreach f, i in files {<br> s[i] = @filename(f);<br> }<br> result = barapp( files, s );<br>}<br><br>- Mike<br><br>----- Original Message -----<br><blockquote type="cite">From: "Mark Hereld" <<a href="mailto:hereld@mcs.anl.gov">hereld@mcs.anl.gov</a>><br></blockquote><blockquote type="cite">To: "Michael Wilde" <<a href="mailto:wilde@mcs.anl.gov">wilde@mcs.anl.gov</a>><br></blockquote><blockquote type="cite">Cc: "swift-devel" <<a href="mailto:swift-devel@ci.uchicago.edu">swift-devel@ci.uchicago.edu</a>>, "Thomas D. Uram" <<a href="mailto:turam@mcs.anl.gov">turam@mcs.anl.gov</a>><br></blockquote><blockquote type="cite">Sent: Tuesday, November 22, 2011 1:07:32 PM<br></blockquote><blockquote type="cite">Subject: Re: arrays of files<br></blockquote><blockquote type="cite">thanks mike! only interested in the array solution. collecting<br></blockquote><blockquote type="cite">generic patterns that can be easily reused for wide number of<br></blockquote><blockquote type="cite">situations. gpsi. -- mark<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Nov 22, 2011, at 12:05 PM, Michael Wilde wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Yup, thanks, Mark - its a bug.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">if you change the body of bar to read:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">ls "-lt" @filename(files[0]) @filename(files[1]) stdout=@result;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">instead of:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">ls "-lt" @filenames(files) stdout=@result;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">then it works.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I'll file a bugzilla ticket on this. David, can you add to the test<br></blockquote><blockquote type="cite">suite? Mihael, can you fix it?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">- Mike<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">----- Original Message -----<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">From: "Mark Hereld" < <a href="mailto:hereld@mcs.anl.gov">hereld@mcs.anl.gov</a> ><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">To: "Michael Wilde" < <a href="mailto:wilde@mcs.anl.gov">wilde@mcs.anl.gov</a> ><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Cc: "Thomas D. Uram" < <a href="mailto:turam@mcs.anl.gov">turam@mcs.anl.gov</a> ><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Sent: Tuesday, November 22, 2011 11:48:17 AM<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Subject: arrays of files<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Mike,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">this swift seems to compile without complaint but breaks down<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">with a null pointer at the last line (invocation of "bar"). i think<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">i'm<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">confused about arrays of file objects. ideas?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">type file; app ( file result ) foo ( string args[] ) { ls "-lt" args<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">stdout=@result; } app ( file result ) bar ( file files[] ) { ls "-lt"<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">@filenames(files) stdout=@result; } file out <"dirlisting.txt">; out =<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">foo([".",".."]); file out2 <"nother.txt">; out2 = foo(["/"]); file<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">out3 <"proof.txt">; out3 = bar([out,out2]);<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-------------------------------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Mark Hereld < <a href="mailto:hereld@mcs.anl.gov">hereld@mcs.anl.gov</a> ><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Senior Fellow - Computation Institute<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Experimental Systems Engineer - Mathematics and Computer Science<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Visualization and Analysis Lead - Argonne Leadership Computing<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Facility<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Argonne National Laboratory<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The University of Chicago<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Cell: 630.327.2088<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Voice: 630.252.4170<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">--<br></blockquote><blockquote type="cite">Michael Wilde<br></blockquote><blockquote type="cite">Computation Institute, University of Chicago<br></blockquote><blockquote type="cite">Mathematics and Computer Science Division<br></blockquote><blockquote type="cite">Argonne National Laboratory<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-------------------------------------------------------<br></blockquote><blockquote type="cite">Mark Hereld < <a href="mailto:hereld@mcs.anl.gov">hereld@mcs.anl.gov</a> ><br></blockquote><blockquote type="cite">Senior Fellow - Computation Institute<br></blockquote><blockquote type="cite">Experimental Systems Engineer - Mathematics and Computer Science<br></blockquote><blockquote type="cite">Visualization and Analysis Lead - Argonne Leadership Computing<br></blockquote><blockquote type="cite">Facility<br></blockquote><blockquote type="cite">Argonne National Laboratory<br></blockquote><blockquote type="cite">The University of Chicago<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Cell: 630.327.2088<br></blockquote><blockquote type="cite">Voice: 630.252.4170<br></blockquote><br>-- <br>Michael Wilde<br>Computation Institute, University of Chicago<br>Mathematics and Computer Science Division<br>Argonne National Laboratory<br><br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="font-size: medium; "><div style="font-size: 12px; ">-------------------------------------------------------</div><div style="font-size: 12px; ">Mark Hereld <<a href="mailto:hereld@mcs.anl.gov">hereld@mcs.anl.gov</a>></div><div style="font-size: 12px; ">Senior Fellow - Computation Institute </div><div style="font-size: 12px; ">Experimental Systems Engineer - Mathematics and Computer Science</div><div style="font-size: 12px; ">Visualization and Analysis Lead - Argonne Leadership Computing Facility</div></div><div style="font-size: medium; "><span class="Apple-style-span" style="font-size: 12px; ">Argonne National Laboratory</span></div><div>The University of Chicago</div><div><br></div><div>Cell: 630.327.2088</div><div>Voice: 630.252.4170</div></div></span></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>