Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:rfstream_a_c_library_for_accessing_rfio_files [2016/12/16 10:16] (current)
Line 1: Line 1:
 +Last modified: Jul 08, 2005 by Schwarz\\
 +\\
 +
 +====== rfstream: a C++ library for accessing RFIO files ======
 +
 +\\
 +\\
 +
 +=====  Introduction ​ =====
 +
 +The Remote File Stream (rfstream) package is a library of C++ classes which extend the possibilities of the C++ I/O standard library for performing input/​output on remote files.\\
 +\\
 +Its main purpose is to allow standard C++ programs to access files stored in the mass storage facilities supported by the IN2P3 Computing Center. Currently, access to three kinds of files is supported: staged files (see xtageread(1)/​xtagewrite(1)),​ files managed by HPSS and "​semiper"​ files.\\
 +\\
 +The underlying method for accessing staged and HPSS-managed files is CERN's Remote File I/O - rfio but this is absolutely transparent to your program. As soon as other remote file access methods will be introduced, they will be supported by this library with almost no impact to your source code (compilation and linking will still be needed).
 +=====  Features ​ =====
 +
 +  * Binary and formatted input/​output
 +  * Repositioning on remote files for random access
 +  * All the standard open modes are supported (in, out, ate, app, trunc, ...)
 +
 +=====  Supported Platforms and compilers ​ =====
 +
 +The following table shows the C++ compilers on which this library is supported. Although some of them are not yet fully compliant to the recent C++ standard, the Remote File Stream library is designed so that you as a user have not to handle these differences:​ the appropriate classes will be automatically used according to the platform and compiler used.\\
 +
 +  Fig. 1 : Platforms supported ​
 +\\
 +
 +^OS                ^GNU g++^IBM xlC^Sun CC^
 +|Scientific Linux 3|3.2.3 ​ |N/A    |N/A   |
 +|AIX 5.1           ​|3.2 ​   |6      |N/A   |
 +|Solaris 9         ​|3.3.1 ​ |N/A    |5.6   |
 +
 +=====  How to compile and link  =====
 +
 +In order to use this library you have to modify the source code to:
 +  * include the file "​rfstream"​ in all source files needing access to a remote file
 +  * use the classes rifstream, rofstream and rfstream instead of the C++ standard classes ifstream, ofstream and fstream, respectively.
 +  * link with the appropiate library (more on this later)
 +
 +For instance, if your C++ source file is called CopyFile.cpp you may use the following command to compile/​link with the GNU C++ compiler:
 +
 +  *Linux
 +<​code>​
 +g++ -D_LARGEFILE64_SOURCE -o CopyFile CopyFile.cpp -I/​usr/​local/​include -L/​usr/​local/​lib -lrfstream_g++ -lshift -lpthread
 +</​code>​
 +AIX 5.1
 +<​code>​
 +xlC -o CopyFile CopyFile.cpp -I/​usr/​local/​include -L/​usr/​local/​lib -lrfstream_xlC -lshift -lnsl -lpthreads
 +</​code>​
 +  *SunOS
 +<​code>​
 +CC -o CopyFile CopyFile.cpp -I/​usr/​local/​include -L/​usr/​local/​lib -lrfstream_CC -lshift -lnsl -lsocket
 +</​code>​
 +
 +=====  Staging mode  =====
 +
 +In order to improve the performance when reading files from HPSS, it is possible to force a staging ("​rfcp"​) first and then access the file locally ("​open()"​). But this method requires enough local disk to copy the entire file.\\
 +In order to activate the pre-staging mode, one should use the **RFSMODE** environment variable:
 +<​code>​
 +sh : export RFSMODE=RFCP
 +csh : setenv RFSMODE RFCP
 +</​code>​
 +=====  Limitations ​ =====
 +
 +By the time being, the package is limited in two ways:
 +  * No multi-threading support (due to the lack of multi-threading support of the RFIO's client API)
 +  * No support for files bigger than 2 GigaBytes
 +
 +=====  Authors ​ =====
 +
 +RFSTREAM was developped by Fabio Hernandez and is now maintained by Lionel Schwarz.
 +
  
  • en/rfstream_a_c_library_for_accessing_rfio_files.txt
  • Last modified: 2016/12/16 10:16
  • (external edit)