[Swift-devel] LQCD mapping
Mihael Hategan
hategan at mcs.anl.gov
Tue May 1 09:58:17 CDT 2007
On Tue, 2007-05-01 at 14:44 +0000, Ben Clifford wrote:
>
> On Tue, 1 May 2007, Yong Zhao wrote:
>
> > does create mean creating an empty file?
>
> it doesn't create any file - it creates mappings that this mapper appears
> to not make by default (though mihael suggests that might be a bug)
>
> so that if I refer to an array element lattice[787979] it is mapped to a
> (possibly non-existing) file called prefix+"787979"+suffix
>
> if that is then used as the output variable for a procedure, then yes the
> file gets created by the procedure. but not by the mapper.
Mappers are supposed to be lazy. They don't enforce sizes. They can be
used, if requested, to populate a data structure to reflect existing
data. That's what the existing() call does. The translator is supposed
to figure if that call should be made on initialization, and signal that
using the "input" mapping parameter (which is used by the type system to
determine whether a call to existing() should be made). In a sense,
"input" is pretty much what your "create" does, but it's got a large
part of the complexities figured.
Should "input" not be passed, existing() would not be called, and the
mapper should act in a fully lazy way, but that would also mean that no
bits in the array will be marked as available, unless assigned to
separately.
>
> >
> > On Tue, 1 May 2007, Ben Clifford wrote:
> >
> > >
> > > yesterday evening I played some with Nika trying to get her LQCD workflow
> > > running some more.
> > >
> > > It involved one code change to swift:
> > >
> > > I put a 'create' option on the filesys_mapper so that one can do this:
> > >
> > > file lattice[] <filesys_mapper;prefix="lattice.",create=true>;
> > > foreach i in range {
> > > int j=i-1;
> > > lattice[i] = lqcd_exec(test_in,lattice[j]);
> > > }
> > >
> > > where lattice.* files don't exist, so that lattice[5] will map to
> > > "lattice.5". With create=false (the default) then the mapper behaves as
> > > before, which seems to be essentially an input-only mode where it creates
> > > an array based on existing files.
> > >
> > > I think this is the mapping functionality that I want, but its not clear
> > > to me whether filesys_mapper is the place for it, whether one of the other
> > > mappers already does this, or if it should go in a different place
> > > (another mapper or a new mapper). comments?
> > >
> > > --
> > > _______________________________________________
> > > Swift-devel mailing list
> > > Swift-devel at ci.uchicago.edu
> > > http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
> > >
> >
> >
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
>
More information about the Swift-devel
mailing list