[Swift-user] Output Files, ReadData and Order of Execution

Mihael Hategan hategan at mcs.anl.gov
Sat Sep 1 13:57:29 CDT 2012


Can you post the entire script?

On Sat, 2012-09-01 at 12:29 -0500, Carolyn Phillips wrote:
> Yes, I tried that
> 
>         unlabeleddata pl = np.points;
>     	string parameters[] =readData(pl);
> 
> 
> and I got
> 
> Execution failed:
> 	mypoints..dat (No such file or directory)
> 
> On Aug 31, 2012, at 8:27 PM, Mihael Hategan <hategan at mcs.anl.gov> wrote:
> 
> > On Fri, 2012-08-31 at 20:11 -0500, Carolyn Phillips wrote:
> >> How would this line work for what I have below?
> >> 
> >>>> string parameters[] =readData(np.points);
> >> 
> > 
> > unlabeleddata tmp = np.points;
> > string parameters[] = readData(tmp);
> > 
> >> 
> >> 
> >> 
> >> On Aug 31, 2012, at 7:49 PM, Mihael Hategan <hategan at mcs.anl.gov> wrote:
> >> 
> >>> Another bug.
> >>> 
> >>> I committed a fix. In the mean time, the solution is:
> >>> 
> >>> 
> >>> errorlog fe = np.errorlog;
> >>> 
> >>> int error = readData(fe);
> >>> 
> >>> On Fri, 2012-08-31 at 19:29 -0500, Carolyn Phillips wrote:
> >>>> Hi Mihael,
> >>>> 
> >>>> the reason I added the "@" was because
> >>>> 
> >>>> now this (similar) line
> >>>> 
> >>>>   if(checkforerror==0) {
> >>>>       string parameters[] =readData(np.points);
> >>>>      }
> >>>> 
> >>>> gives me this:
> >>>> 
> >>>> Execution failed:
> >>>> 	mypoints..dat (No such file or directory)
> >>>> 
> >>>> as in now its not getting the name of the file correct
> >>>> 
> >>>> On Aug 31, 2012, at 7:17 PM, Mihael Hategan <hategan at mcs.anl.gov> wrote:
> >>>> 
> >>>>> @np.error means the file name of np.error which is known statically. So
> >>>>> readData(@np.error) can run as soon as the script starts.
> >>>>> 
> >>>>> You probably want to say readData(np.error).
> >>>>> 
> >>>>> Mihael
> >>>>> 
> >>>>> 
> >>>>> On Fri, 2012-08-31 at 18:55 -0500, Carolyn Phillips wrote:
> >>>>>> So I execute an atomic procedure to generate a datafile, and then next
> >>>>>> I want to do something with that data file.  However, my program is
> >>>>>> trying to do something with the datafile before it has been written
> >>>>>> to.  So something with order of execution is not working.  I think the
> >>>>>> problem is that the name of my file exists, but the file itself does
> >>>>>> not yet, but execution proceeds anyway!
> >>>>>> 
> >>>>>> Here are my lines
> >>>>>> 
> >>>>>> type pointfile {
> >>>>>> unlabeleddata points;
> >>>>>> errorlog error;
> >>>>>> }
> >>>>>> 
> >>>>>>  # Generate Parameters
> >>>>>>  pointfile np <simple_mapper;prefix="mypoints.",suffix=".dat">; 
> >>>>>>  np = generatepoints(config,labeledpoints, "uniform", 50);
> >>>>>> 
> >>>>>>  int checkforerror = readData(@np.error);
> >>>>>> 
> >>>>>> This gives an error :
> >>>>>> mypoints.error.dat (No such file or directory)
> >>>>>> 
> >>>>>> If I comment out the last line.. all the files show up in the directory.  (e.g. mypoints.points.dat and mypoints.error.dat) )  and if forget to remove the .dat files from a prior run, it also runs fine!
> >>>>>> 
> >>>>>> How do you fix a problem like that?
> >>>>>> 
> >>>>>> _______________________________________________
> >>>>>> Swift-user mailing list
> >>>>>> Swift-user at ci.uchicago.edu
> >>>>>> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user
> >>>>> 
> >>>>> 
> >>>> 
> >>> 
> >>> 
> >> 
> > 
> > 
> 





More information about the Swift-user mailing list