[Swift-user] __root__ in filename

Ketan Maheshwari ketan at mcs.anl.gov
Sat Dec 13 17:59:50 CST 2014


On Sat, Dec 13, 2014 at 3:54 PM, Hategan-Marandiuc, Philip M. <
hategan at mcs.anl.gov> wrote:
>
> Oh, so I think Mike was saying an entirely different thing. You don't
> use two separate filesys mappers. That won't work.
>

Right. We assumed this should work. And Mike tested this with a small
dataset. Later on we found that it was working by chance and not by design.
The previous message was to update the discussion with this finding.


>
> You use one filesys mapper for the initial data and then a structured
> regexp mapper, which preserves the order. That has to work, and it is a
> feature supported since swift version zero.
>
> In other news, filename(), if not invoked from an app body, should now
> avoid doing a remote pathname expansion, so your initial scheme should
> work. However, I would still recommend Mike's solution.
>

Thanks! I am using the structured regexp mapper. Seems to be sufficient for
the needs of this app.


>
> Mihael
>
> On Fri, 2014-12-12 at 16:55 -0600, Ketan Maheshwari wrote:
> > >
> > > The simplest approach is to just map one array to each file suffix. The
> > > filesys mapper will return the files in the same lexicographic order
> for
> > > each pattern:
> > >
> > > $ cat ./regexpmap3.swift
> > >
> > > type file;
> > >
> > > file data[]  <filesys_mapper; prefix="f", suffix=".dat">;
> > > file image[] <filesys_mapper; prefix="f", suffix=".img">;
> > >
> > > foreach j, i in data {
> > >    tracef(" data[%i] = %s\nimage[%i] = %s\n",
> > >           i, filename(data[i]),
> > >           i, filename(image[i]));
> > > }
> > >
> > > $ swift ./regexpmap3.swift
> > > Swift 0.95 RC5 swift-r7605 cog-r3874
> > > RunID: run078
> > > Progress: Wed, 10 Dec 2014 22:10:56+0000
> > >   data[2] = f3.dat
> > > image[2] = f3.img
> > >   data[3] = f4.dat
> > > image[3] = f4.img
> > >   data[0] = f1.dat
> > > image[0] = f1.img
> > >   data[1] = f2.dat
> > > image[1] = f2.img
> > > Final status:Wed, 10 Dec 2014 22:10:56+0000
> > >
> > >
> > After some more experiments it was determined that this does not hold
> true.
> > That is, independent filesys_mappers on a given directory will not pick
> the
> > files in the same order resulting in irregular combinations in the
> > resulting tuple.
> > _______________________________________________
> > Swift-user mailing list
> > Swift-user at ci.uchicago.edu
> > https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20141213/040e0199/attachment.html>


More information about the Swift-user mailing list