[Swift-user] again about absolute and relative paths

Mihael Hategan hategan at mcs.anl.gov
Fri Dec 7 15:08:48 CST 2012


On Fri, 2012-12-07 at 14:28 -0600, Lorenzo Pesce wrote:

> 
> However, when I use absolute paths for input files, it seems to come out garbled (like the first / is cut, so that it can't find the file). 
> Am I missing something in the logic of this?

Yes. You should not make assumptions about the location of files on the
remote side based on the way they are on the swift side. Pass that
location to your executable using @filename() instead.

Now the internal details. Swift restricts files on the app execution
side to the work directory. In order to do that for absolute files and
prevent clashes (to some extent), it does something equivalent to
chroot(workdir), effectively removing the first "/" from the absolute
path. The file is staged in to the new location before the app is run.

Mihael




More information about the Swift-user mailing list