[Swift-user] Question about output files

David Kelly davidk at ci.uchicago.edu
Sat Mar 24 11:30:44 CDT 2012


Lorenzo,

What I would do in this case is have the tc app be a small wrapper shell script. The wrapper would execute the real app and then create a tar file containing the results. Then the only file that you need to stage out is the tar file. This is what I typically do when there are a large number of outputs, or when the output filenames are not known ahead of time.

David

----- Original Message -----
> From: "Lorenzo Pesce" <lpesce at uchicago.edu>
> To: "David Kelly" <davidk at ci.uchicago.edu>
> Cc: swift-user at ci.uchicago.edu
> Sent: Saturday, March 24, 2012 10:18:13 AM
> Subject: Re: [Swift-user] Question about output files
> Worked perfect. Thanks a million.
> 
> I have another question. In my tc file I will have a number of
> alternative definitions for the function runDemoReal and sometimes the
> name of the files to be written back will change with it.
> Is there a way to have that be part of the tc file itself without
> having to be changed in the swift script?
> 
> 
> 
> On Mar 24, 2012, at 1:12 AM, David Kelly wrote:
> 
> > Lorenzo,
> >
> > The result files will have to be defined in your swift script to get
> > them back from the work directory. There are a few different ways to
> > go about this.
> >
> > Here is one simple example. For this example, I'm going to assume
> > that each app call creates one result file, and that the value of
> > "s" determines the filename.
> >
> > app (file outdata, file result) demoreal (string mcr, int chn, int
> > ht, string datafile)
> > {
> >   runDemoReal mcr chn ht datafile stdout=@outdata;
> > }
> > .
> > .
> > .
> > foreach s, i in ht {
> >  int chn=1;
> >  file result <single_file_mapper; file=@strcat("result_neuron_", s,
> >  "_ht_00.mat)>;
> >  (LogDemoReal[s], result) = demoreal (MCRPath, chn, s, spikefile);
> > }
> >
> > David
> >
> > ----- Original Message -----
> >> From: "Lorenzo Pesce" <lpesce at uchicago.edu>
> >> To: swift-user at ci.uchicago.edu
> >> Sent: Friday, March 23, 2012 7:30:12 PM
> >> Subject: [Swift-user] Question about output files
> >> Hi --
> >>
> >> I am writing a script to run a parameter sweep on Beagle (Cray
> >> XE6).
> >>
> >> I am interested in the output files they write, but somehow I seem
> >> to
> >> be unable to locate them. The calculations seem to proceed fine
> >> according to the log files (stdout), but I can't find the mat files
> >> that should contain the actual results.
> >> The should be files like this one result_neuron_##_ht_##.mat
> >>
> >> This is the script. Thanks a lot!
> >>
> >> // file to run the Margic square example from the matlab web site
> >> type file;
> >>
> >> string MCRPath = "/soft/matlab/7.13";
> >> string spikefile = "X.mat";
> >>
> >> app (file outdata) demoreal (string mcr, int chn, int ht, string
> >> datafile)
> >> {
> >> runDemoReal mcr chn ht datafile stdout=@outdata;
> >> }
> >>
> >> int ht[] = [3, 6, 9, 12, 15, 18, 21, 24];
> >>
> >> file LogDemoReal[] <simple_mapper;
> >> prefix="demo_real",suffix=".log">;
> >>
> >> foreach s, i in ht {
> >> int chn=1;
> >> LogDemoReal[s] = demoreal (MCRPath, chn, s, spikefile);
> >> }
> >>
> >>
> >>
> >> _______________________________________________
> >> 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