...
The script xrdprel should be used to run a command using the xrootd preload library. The script sets the proper environment variables (LD_LIBRARY_PATH, LD_PRELOAD) and then executes the provided command. The LD_PRELOAD variable instructs the loader to load an additional library in this case the xrootd preload library. Certain function calls (e.g.: open, close, read, fopen, fclose, fread, ...) are called from the preload library which if
a file is a xrootd file will subsequently use the xrootd tools to access the file. If a file is not and xrootd file the call will be redirected to the corresponding system call.
The usage is:
Code Block | ||
---|---|---|
| ||
xrdprel [-g] [-h] _command_ _args_
_command_ and _args_ are the user command and and its arguments
-h: prints a help
-g: use a virtual mountpoint, which means file names starting with /glast/ are assumed to be
xrootd files.
|
...
/afs/slac.stanford.edu/g/glast/applications/xrootd/<REL>PROD/bin
where <REL> is either PROD, DEV or TEST. Currently DEV and TEST have the most functional preload library.
Warning | ||
---|---|---|
| ||
For reading fits files use DEV or TEST |
...
| |
Listing a directory with xrdprel (e.g.: xrdprel -g ls /glast/) will fail as the command is handled by the redirector which has no direct access to the data file systems. Issuing the command against a data server (e.g.: xrdprel ls root://wain084//glast/) will work but only show the listing from that single server. To get a listing from all servers use the xrdls command. |
xrdprel ls -l
Would run ls against a file in xrootd.
...
This has the same effect as the previous example. The filename name /glast/admin/mon_all.tst will automatically resolve to root://glast-rdr//glast/admin/mon_all.tst
...
The -g option and /glast/... file names must be used with fitsio tools.
The main issue is loading the proper preload library. A 32 bit binary needs the 32 bit preload lib whereas a 64 bit compilied executable needs a 64 bit version. Right now by default always the 32bit preload library is used, which will cause a failure if running a 64 bit application on a 64 bit OS. The application will still run but the preload library will not be loaded.
...