<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'><font face="times new roman, new york, times, serif" size="3">When I try to use file-direct:// with no modifications I get this:</font><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">Progress: time: Thu, 16 May 2013 19:04:23 +0000</div><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">Execution failed:</div><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><span class="Apple-tab-span" style="white-space:pre"> </span>java.lang.RuntimeException: java.lang.RuntimeException: Could not instantiate file resource</div><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">Caused by:</div><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><span class="Apple-tab-span" style="white-space:pre"> </span>No 'file-direct' provider or alias found. Available providers: [cobalt, ssh-cl, gsiftp, coaster, webdav, slurm, dcache, ssh, gt2, condor, http, coaster-persistent, pbs, ftp, lsf, gsiftp-old, local, sge]. Aliases: condor <-> condorlocal; cobalt <-> cobaltlocal; gsiftp <-> gridftp; pbs <-> pbslocal; gsiftp-old <-> gridftp-old; local <-> file; </div><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">So I see in that message that local <-> file are aliases. I wasn't sure exactly where those were defined, but I think I found it in modules/provider-local/resources/cog-provider.properties. I added this line:</div><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div><font face="times new roman, new york, times, serif">alias=file-direct:local</font></div><div><font face="times new roman, new york, times, serif"><br></font></div><div><font face="times new roman, new york, times, serif">Then I rebuilt, and it seems to be getting to the wrapper now. Thanks.</font></div><div><font face="times new roman, new york, times, serif"><br></font></div><div><font face="times new roman, new york, times, serif">David</font></div><br><hr id="zwchr" style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><blockquote style="color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-size: 12pt; border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; font-weight: normal; font-style: normal; text-decoration: none;"><b>From: </b>"Michael Wilde" <wilde@mcs.anl.gov><br><b>To: </b>"David Kelly" <davidk@ci.uchicago.edu><br><b>Cc: </b>"Swift Devel" <swift-devel@ci.uchicago.edu>, "Mihael Hategan" <hategan@mcs.anl.gov><br><b>Sent: </b>Thursday, May 16, 2013 2:00:54 PM<br><b>Subject: </b>Re: [Swift-devel] Wrapper staging<br><br>Doesn't "file://" already map to the "local" data provider? If so, can you simply replicate that entry in the provider alias list to create additional aliases to "local" as you suggest below, David?<br><br>- Mike<br><br>----- Original Message -----<br>> From: "David Kelly" <davidk@ci.uchicago.edu><br>> To: "Mihael Hategan" <hategan@mcs.anl.gov><br>> Cc: "Swift Devel" <swift-devel@ci.uchicago.edu><br>> Sent: Thursday, May 16, 2013 1:42:41 PM<br>> Subject: Re: [Swift-devel] Wrapper staging<br>> <br>> <br>> <br>> I'd like to find a way to define different staging methods on a<br>> file-by-file basis. In some cases it would make sense to use dd to<br>> copy a file to the work directory. In other situations it may be<br>> better to create a symlink pointing to what you need.<br>> <br>> <br>> I'm thinking of something along these lines (names will probably get<br>> changed):<br>> <br>> <br>> file data<br>> <"file-direct:///home/davidkelly999/staging/dd-absolute/data.txt">;<br>> // Will stage the data to the work directory<br>> <br>> <br>> file data2<br>> <"file-indirect:///home/davidkelly999/staging/dd-absolute/data2.txt">;<br>> // Will create a symlink<br>> <br>> <br>> Then based on the prefix you define, _swiftwrap.wrapperstaging can<br>> know exactly how to stage the file.<br>> <br>> <br>> Is it possible to create data provider aliases, making file-direct://<br>> and file-indirect:// work exactly like file:// until it gets passed<br>> to the wrapper?<br>> <br>> <br>> Thanks,<br>> David<br>> <br>> <br>> <br>> <br>> From: "Mihael Hategan" <hategan@mcs.anl.gov><br>> To: "David Kelly" <davidk@ci.uchicago.edu><br>> Cc: "Swift Devel" <swift-devel@ci.uchicago.edu><br>> Sent: Wednesday, May 8, 2013 12:46:45 PM<br>> Subject: Re: Wrapper staging<br>> <br>> I'm a bit busy today and this week, so I might not get to fixing<br>> these<br>> until the weekend, but I'll try to answer some of your questions.<br>> <br>> On Wed, 2013-05-08 at 10:53 -0500, David Kelly wrote:<br>> > Hello,<br>> > <br>> > <br>> > Just a few random questions about wrapper staging:<br>> > <br>> > <br>> > How can I make gsiftp:// URIs get sent to<br>> > _swiftwrap.wrapperstaging? I<br>> > have wrapper staging enabled, but Swift is trying to connect to the<br>> > server and retrieve the file, rather than just passing the URI to<br>> > the<br>> > wrapper script.<br>> <br>> With wrapper staging enabled, swift should not try to *transfer*<br>> files,<br>> but mappers might connect to the server to figure out what files are<br>> there (i.e. to complete calls to Mapper.existing()).<br>> <br>> > <br>> > What does the property wrapper.staging.local.server do?<br>> <br>> It specifies what url prefix to pass to the wrapper for local files<br>> (i.e. accessible directly by swift).<br>> <br>> > <br>> > <br>> > From within _swiftwrap.wrapperstaging, how can I know the current<br>> > working directory of the user? I think I need this information to<br>> > handle relative path names.<br>> <br>> The wrapper should get a -urlprefix argument containing the CWD. The<br>> value of that arg is constructed as: ${wrapper.staging.local.server}<br>> +<br>> ${CWD}.<br>> <br>> > <br>> > <br>> > I believe in trunk, filenames passed as arguments to Swift apps<br>> > being<br>> > prepended with "__root__". What does this mean, and should<br>> > swiftwrap<br>> > strip this out?<br>> <br>> No. There is a mapping from local file names to remote file names. It<br>> used to be that absolute files are mapped simply by removing the<br>> leading<br>> slash. So "/dir/file" on the swift side would become "dir/file" on<br>> the<br>> remote side. But then if there was a local "dir/file", it would also<br>> be<br>> "dir/file" on the remote side, causing a conflict.<br>> <br>> At some point in trunk, I changed that (and also the handling of<br>> "/../")<br>> in response to a bug that, I believe, Ketan submitted. The change<br>> involved mapping a leading slash to "__root__" and parent dir<br>> references<br>> to "__parent__". They have no special meaning as far as the wrapper<br>> or<br>> the application is concerned. They get the proper path through<br>> @filename<br>> and the likes, and swift stages the files in the places pointed by<br>> @filename.<br>> <br>> Mihael<br>> <br>> <br>> <br>> _______________________________________________<br>> Swift-devel mailing list<br>> Swift-devel@ci.uchicago.edu<br>> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel<br>> <br></blockquote><br></div></div></body></html>