Using "relative" path names

Hi,

For the first time I’m trying to configure a simple PROOF installation with a basic FS setup. I just followed the basic instructions, and now I can nicely upload and access files like this:

[code]xrdcp my_file root://UserName@myServer//full/path/my_file.root

f = TFile::Open( “root://UserName@myServer//full/path/my_file.root”, “READ” );[/code]

However I would find it way more elegant if I wouldn’t have to know the full path name on the server to be able to upload files to it. I’d just like to write things like:

But when I try to do this, I get the message:

I tried reading through the documentation to find out how to do this (like setting an alias that if I don’t specify a full path name starting with “/” then ROOT should assume that I want to write to “/full/path”), but didn’t find it yet. I’m certain that this functionality exists. Could someone advise me how to do it?

Cheers,
Attila

Hi Attila,

This is an xrootd issue which should be solvable using the ofs.localroot directive described at

xrootd.slac.stanford.edu/doc/prod/ofs_config.htm

Basically the directive defines a prefix always added to the path that the client sends over. In your example you should try with

ofs.localroot /full/path/

Cheers, Gerri

Hi Gerri,

Finally, after a lot of trial-and-error, I managed to do it. There are just too many degrees of freedom in such a configuration file, especially if somebody (like me) has little idea of how xrootd works…

In any case, thanks for the hint, it would’ve taken way longer without it.

Cheers,
Attila

Hi again,

Unfortunately I did find another problem.

So now when I try to open files remotely on the file server, everything works great. However when I send a PROOF job to the server itself (which is also the PROOF master) and it tries to open its output file as

TFile::GetType gets a bit “too smart” and recognises that since its running on myMachine, the specified url is a local url to it. So it tries to open a local file called /pool/temp.root. But the file should be called /full/path/pool/temp.root, so the operation fails.

So I guess I’ll have to give up on exporting a folder with the nice name /pool, and use the real /scratch/xrootd/pool directory for now… (As you can guess, /scratch is the place where I have most of my free space…)

Of course if I would have a dedicated file server to spare that is not part of the PROOF cluster then this would not surface, but I have a fairly small cluster just for testing at the moment.

Cheers,
Attila

Hi Attila,

Sorry for the late reply.

Please try by adding

xpd.putrc Path.Localroot /full/path

in the xrootd config file.

This will be used by GetType inside PROOF to localize correctly the local file.

I should automatize this, i.e. when an ofs.localroot directive is found I should generate automatically the relevant Path.Localroot env.
But for the moment this is not done.

Cheers, Gerri