<div>Hi, Michael: </div><div><br></div>Thank you and Mihael for your help. We will try 0.94. <br><br><div class="gmail_quote">On Fri, Nov 30, 2012 at 3:21 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">Dear Hao,<br>
<br>
Mihael has diagnosed this problem as likely being caused by a Swift bug in 0.93 that was fixed many months ago in trunk.  Can you repeat your test with the current 0.94 release candidate? It at:<br>
<br>
 <a href="http://www.ci.uchicago.edu/swift/packages/swift-0.94RC1.tar.gz" target="_blank">http://www.ci.uchicago.edu/swift/packages/swift-0.94RC1.tar.gz</a><br>
<br>
Thanks, and sorry again for the delay in debugging this.<br>
<div class="im"><br>
- Mike<br>
<br>
----- Original Message -----<br>
> From: "Hao Yang" <<a href="mailto:yanghao0614@gmail.com">yanghao0614@gmail.com</a>><br>
> To: "Michael Wilde" <<a href="mailto:wilde@mcs.anl.gov">wilde@mcs.anl.gov</a>><br>
> Cc: <a href="mailto:mosastore@googlegroups.com">mosastore@googlegroups.com</a>, <a href="mailto:swift-user@ci.uchicago.edu">swift-user@ci.uchicago.edu</a><br>
</div><div class="im">> Sent: Friday, November 30, 2012 1:32:23 AM<br>
> Subject: Re: [Swift-user] assign temporary file to mapper<br>
> Hi, Michael:<br>
><br>
><br>
</div><div><div class="h5">> Please find the log file in the attachment.<br>
><br>
> In the source code we declared a temporary file array RSFile<br>
> output_chunks[] , and a single file mapper. RSFile output_data<br>
> <single_file_mapper; file=output_name> . Then we used the iterate at<br>
> the end of the source code to get output_chunks[0], ..., till<br>
> output_chunks[dim_length - 1]. The error happened when Swift tried to<br>
> execute the last line output_data = output_chunks[dim_length-1]. It<br>
> couldn't find the file output_chunks[dim_length-1], but we verified<br>
> the file was available in the _concurrent directory. So we were<br>
> wondering if it is valid to assign temporary file to file mapper.<br>
><br>
><br>
> Thank you.<br>
><br>
><br>
> On Thu, Nov 29, 2012 at 9:02 PM, Michael Wilde < <a href="mailto:wilde@mcs.anl.gov">wilde@mcs.anl.gov</a> ><br>
> wrote:<br>
><br>
><br>
> Hao, my apologies - I lost track of your problem.<br>
><br>
> Can you send your log file from this run? it should be a file with<br>
> your scriptname, then -20121120-1538-mt4hjjd6.log.<br>
><br>
> Something is inconsistent here: your output shows trace lines that are<br>
> not in the source code you sent. The log file will have the source<br>
> code that matches the run which produced there error.<br>
><br>
> I may be missing something here, but it looks like you are<br>
> concatenating two mapped temporary filenames and mapping yet another<br>
> filename to that value:<br>
><br>
> File not found:<br>
> /users/slic/tlai/work/mapReduceScripts/./_concurrent/output_chunks-33fce3ec-f16c-4430-b086-cc90f611a0a2--\<br>
> array/_concurrent/output_chunks-33fce3ec-f16c-4430-b086-cc90f611a0a2--array/elt-<br>
><br>
> But I dont see where this is happening the source code you sent.<br>
><br>
><br>
> - Mike<br>
><br>
> ----- Original Message -----<br>
> > From: "Hao Yang" < <a href="mailto:yanghao0614@gmail.com">yanghao0614@gmail.com</a> ><br>
><br>
><br>
> > To: "Michael Wilde" < <a href="mailto:wilde@mcs.anl.gov">wilde@mcs.anl.gov</a> ><br>
</div></div>> > Cc: <a href="mailto:mosastore@googlegroups.com">mosastore@googlegroups.com</a> , <a href="mailto:swift-user@ci.uchicago.edu">swift-user@ci.uchicago.edu</a><br>
<div class="HOEnZb"><div class="h5">> > Sent: Tuesday, November 20, 2012 10:33:15 PM<br>
> > Subject: Re: [Swift-user] assign temporary file to mapper<br>
> > Hi, Michael:<br>
> ><br>
> ><br>
> > The output_chunks[2] is assigned in the iterate via output_chunks[i]<br>
> > =<br>
> > appAddFiles(processed_chunks[i], output_chunks[i-1]). (I put the<br>
> > script code and the error message below).<br>
> ><br>
> ><br>
> > // swift code<br>
> > type RSFile; // rsf file<br>
> > type StringFile; // File that stores strings<br>
> ><br>
> ><br>
> > // APPs<br>
> > // getNDims: Extract last dimension from rsf file<br>
> > app (StringFile ndims) appGetNDims(RSFile input) {<br>
> > sffiledims_script @filename(input) "1" stdout=@filename(ndims);<br>
> > }<br>
> ><br>
> ><br>
> > // getDims: Extract dimension list from rsf file<br>
> > app (StringFile dims) appGetDims(RSFile input) {<br>
> > sffiledims_script @filename(input) "2" stdout=@filename(dims);<br>
> > }<br>
> ><br>
> ><br>
> > // getWindow: Window a slice from rsf file<br>
> > app (RSFile out) appSplitFile(RSFile inp, string dim, int slice) {<br>
> > sfwindow_script @filename(inp) @filename(out) dim slice;<br>
> > }<br>
> ><br>
> ><br>
> > // addFiles: adds inp1 and inp2 and returns out<br>
> > app (RSFile out) appAddFiles(RSFile inp1, RSFile inp2) {<br>
> > sfadd_script @filename(out) @filename(inp1) @filename(inp2);<br>
> > }<br>
> ><br>
> ><br>
> > // In-core variables<br>
> > string input_name; // input name of the file<br>
> > string output_name; // output name of the file<br>
> > string last_dim; // Last dimension of file (default splitting<br>
> > dimension)<br>
> > string split_dim; // Splitting dimension<br>
> > string dims_list; // string of dimensions (unsplitted)<br>
> > string dims_array[]; // Array of string of dimensions (splitted)<br>
> > int dim_length; // length of splitted dimension<br>
> ><br>
> ><br>
> > // File variables<br>
> > // Setup input and output files<br>
> > RSFile input_data <single_file_mapper; file=input_name>;<br>
> > RSFile output_data <single_file_mapper; file=output_name>;<br>
> > StringFile ndims_file; // number of dimensions of the input file<br>
> > StringFile dims_file; // dimension array of the input file<br>
> > RSFile input_chunks[]; // Splitted input<br>
> > RSFile processed_chunks[]; // data chunks after parallel processing<br>
> > RSFile output_chunks[]; // Temporary output array for reduction<br>
> ><br>
> ><br>
> > // main part<br>
> > // Define and parse input arguments<br>
> > input_name = @arg("in","in.rsf");<br>
> > output_name = @arg("out","out.rsf");<br>
> ><br>
> ><br>
> > // extract dims and setup variables<br>
> > ndims_file = appGetNDims(input_data);<br>
> > dims_file = appGetDims(input_data);<br>
> ><br>
> ><br>
> > // Define and parse split dimension and dimensions array<br>
> > last_dim = readData(ndims_file);<br>
> > split_dim = @arg("dim", last_dim);<br>
> > dims_list = readData(dims_file);<br>
> > dims_array = @strsplit(dims_list,",");<br>
> > dim_length = @toint(dims_array[@toint(split_dim)-1]);<br>
> > trace("Dim length = ", dim_length);<br>
> ><br>
> ><br>
> > // Split the files parallelly<br>
> > foreach i in [0:dim_length-1] {<br>
> > trace("Splitting ", i);<br>
> > input_chunks[i] = appSplitFile(input_data, split_dim, i+1);<br>
> > trace("Working furiously on ", @filename(input_chunks[i]));<br>
> > trace("Chunk number: ", i);<br>
> > processed_chunks[i] = input_chunks[i];<br>
> > }<br>
> ><br>
> ><br>
> > // Add all the chunks together<br>
> > iterate i {<br>
> > if( i == 0 ) {<br>
> > trace("Setting chunk 0 to ", @filename(output_chunks[0]));<br>
> > output_chunks[0] = processed_chunks[0];<br>
> > } else {<br>
> > trace("Adding ", i);<br>
> > output_chunks[i] = appAddFiles(processed_chunks[i],<br>
> > output_chunks[i-1]);<br>
> > }<br>
> > } until (i == dim_length-1);<br>
> ><br>
> ><br>
> > output_data = output_chunks[dim_length-1];<br>
> ><br>
> ><br>
> > // swift message<br>
> ><br>
> > RunID: 20121120-1538-mt4hjjd6<br>
> > Progress: time: Tue, 20 Nov 2012 15:38:03 -0800<br>
> > SwiftScript trace: Setting chunk 0 to ,<br>
> > _concurrent/output_chunks-33fce3ec-f16c-4430-b086-cc90f611a0a2--array//elt-0<br>
> > SwiftScript trace: filename of output_chunks[0] is,<br>
> > _concurrent/output_chunks-33fce3ec-f16c-4430-b086-cc90f611a0a2--array//elt-0<br>
> > SwiftScript trace: filename of processed_chunks[0] is,<br>
> > _concurrent/processed_chunks-824d746f-2a4d-48b6-8b51-e2534f1f86ca--array//elt-0<br>
> > Progress: time: Tue, 20 Nov 2012 15:38:04 -0800 Submitting:1<br>
> > Finished<br>
> > successfully:1<br>
> > SwiftScript trace: Dim length = , 3.0<br>
> > SwiftScript trace: Splitting , 1.0<br>
> ><br>
> > SwiftScript trace: Chunk number: , 1.0<br>
> > SwiftScript trace: Chunk number: , 2.0<br>
> > SwiftScript trace: Working furiously on ,<br>
> > _concurrent/input_chunks-8bfa174c-e21b-4db2-9b58-ec96de60a1cc--array//elt-1<br>
> ><br>
> > SwiftScript trace: Splitting , 0.0<br>
> > SwiftScript trace: Chunk number: , 0.0<br>
> > SwiftScript trace: Splitting , 2.0<br>
> > SwiftScript trace: Working furiously on ,<br>
> > _concurrent/input_chunks-8bfa174c-e21b-4db2-9b58-ec96de60a1cc--array//elt-2<br>
> > SwiftScript trace: Working furiously on ,<br>
> > _concurrent/input_chunks-8bfa174c-e21b-4db2-9b58-ec96de60a1cc--array//elt-0<br>
> > Progress: time: Tue, 20 Nov 2012 15:38:05 -0800 Selecting site:1<br>
> > Stage<br>
> > in:1 Finished successfully:3<br>
> > Progress: time: Tue, 20 Nov 2012 15:38:06 -0800 Checking status:1<br>
> > Finished successfully:4<br>
> > SwiftScript trace: Adding , 1.0<br>
> > SwiftScript trace: filename of output_chunks[i] is,<br>
> > _concurrent/output_chunks-33fce3ec-f16c-4430-b086-cc90f611a0a2--array//elt-1<br>
> > SwiftScript trace: filename of output_chunks[i-1] is,<br>
> > _concurrent/input_chunks-8bfa174c-e21b-4db2-9b58-ec96de60a1cc--array//elt-0<br>
> > SwiftScript trace: filename of processed_chunks[i] is,<br>
> > _concurrent/input_chunks-8bfa174c-e21b-4db2-9b58-ec96de60a1cc--array//elt-1<br>
> > SwiftScript trace: Adding , 2.0<br>
> > SwiftScript trace: filename of processed_chunks[i] is,<br>
> > _concurrent/input_chunks-8bfa174c-e21b-4db2-9b58-ec96de60a1cc--array//elt-2<br>
> > SwiftScript trace: filename of output_chunks[i] is,<br>
> > _concurrent/output_chunks-33fce3ec-f16c-4430-b086-cc90f611a0a2--array//elt-2<br>
> > SwiftScript trace: filename of output_chunks[i-1] is,<br>
> > _concurrent/output_chunks-33fce3ec-f16c-4430-b086-cc90f611a0a2--array//elt-1<br>
> > Execution failed:<br>
> > File not found:<br>
> > /users/slic/tlai/work/mapReduceScripts/./_concurrent/output_chunks-33fce3ec-f16c-4430-b086-cc90f611a0a2--array/_concurrent/output_chunks-33fce3ec-f16c-4430-b086-cc90f611a0a2--array/elt-2<br>
> ><br>
> ><br>
> > From the trace we can see filename of output_chunks[2] is<br>
> > _concurrent/output_chunks- 33fce3ec-f16c-4430-b086-<br>
> > cc90f611a0a2--array//elt-2 (we also verified the file is there after<br>
> > the execution failure).<br>
> ><br>
> ><br>
> > Thank you.<br>
> ><br>
> > On Tue, Nov 20, 2012 at 6:29 PM, Michael Wilde < <a href="mailto:wilde@mcs.anl.gov">wilde@mcs.anl.gov</a> ><br>
> > wrote:<br>
> ><br>
> ><br>
> > Hao,<br>
> ><br>
> > Are you sure you assigned a value to output_chunks[2]?<br>
> ><br>
> > Can you post the entire program, and the entire error message?<br>
> ><br>
> > Thanks,<br>
> ><br>
> > - Mike<br>
> ><br>
> ><br>
> ><br>
> > ----- Original Message -----<br>
> > > From: "Hao Yang" < <a href="mailto:yanghao0614@gmail.com">yanghao0614@gmail.com</a> ><br>
> > > To: <a href="mailto:swift-user@ci.uchicago.edu">swift-user@ci.uchicago.edu</a><br>
> > > Cc: <a href="mailto:mosastore@googlegroups.com">mosastore@googlegroups.com</a><br>
> > > Sent: Tuesday, November 20, 2012 7:22:45 PM<br>
> > > Subject: [Swift-user] assign temporary file to mapper<br>
> > > Hi, all:<br>
> > ><br>
> > ><br>
> > > I have some problem assigning temporary file to some mapper<br>
> > > variable<br>
> > > (explained in the code below).<br>
> > ><br>
> > ><br>
> > > type RSFile;<br>
> > > string output_name;<br>
> > > output_name = @arg("out","out.rsf");<br>
> > > RSFile output_data <single_file_mapper; file=output_name>;<br>
> > > RSFile output_chunks[];<br>
> > > // some calculation to compute output_chunks[0], output_chunks[1],<br>
> > > output_chunks[2]<br>
> > > // at the end<br>
> > > output_data = output_chunks[2];<br>
> > ><br>
> > ><br>
> > ><br>
> > > When I try this script, swift reports " File output_chunks[2] not<br>
> > > found " error and failed. But the output_chunks[2] is still<br>
> > > available<br>
> > > in the directory generated by swift ( _ concurrent/output_chunks-<br>
> > > ae9bd0b3-ad88-45b0-95f4- f036d2d70e58--array). Should this error<br>
> ><br>
> > > message be expected?<br>
> > ><br>
> > ><br>
> > > Thank you.<br>
> > ><br>
> > > --<br>
> > > Best Regards,<br>
> > > Hao Yang<br>
> > ><br>
> > > The University of British Columbia<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > _______________________________________________<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>
> > Michael Wilde<br>
> > Computation Institute, University of Chicago<br>
> > Mathematics and Computer Science Division<br>
> > Argonne National Laboratory<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > Best Regards,<br>
> > Hao Yang<br>
> > Networked Systems Laboratory<br>
> > Electrical and Computer Engineering<br>
> > The University of British Columbia<br>
><br>
> --<br>
> Michael Wilde<br>
> Computation Institute, University of Chicago<br>
> Mathematics and Computer Science Division<br>
> Argonne National Laboratory<br>
><br>
><br>
><br>
><br>
><br>
> --<br>
> Best Regards,<br>
> Hao Yang<br>
> Networked Systems Laboratory<br>
> Electrical and Computer Engineering<br>
> The University of British Columbia<br>
<br>
--<br>
Michael Wilde<br>
Computation Institute, University of Chicago<br>
Mathematics and Computer Science Division<br>
Argonne National Laboratory<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Best Regards, <br>Hao Yang<div>Networked Systems Laboratory</div><div>Electrical and Computer Engineering<div>The University of British Columbia<br>
<div><div><br></div></div></div></div><br>