[Swift-user] __root__ in filename

Mihael Hategan hategan at mcs.anl.gov
Sat Dec 13 15:54:43 CST 2014


Oh, so I think Mike was saying an entirely different thing. You don't
use two separate filesys mappers. That won't work.

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.

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





More information about the Swift-user mailing list