![]() |
Object-oriented Scientific Computing Library: Version 0.910
|
The rules for installation are generally the same as that for other GNU libraries. The file INSTALL
has some details on this procedure. Generally, you should be able to run ./configure
and then type make
and make
install
. More information on the configure
command can also be obtained from ./configure --help
. O2scl requires the GSL library. If the configure
script cannot find them, you may have to specify their location in the CPPFLAGS
and LDFLAGS
environment variables (./configure --help
shows some information on this). The documentation is included in the distribution and automatically installed by make
install
.
After make
install
, you may test the library with make
o2scl-test
. At the end, the phrase All O2scl tests passed
indicates that the testing was successful. You may also run make
o2scl-test
in the individual subdirectories of the src directory to individually test the classes and functions in that part of O2scl . Note that make check
will not work.
This library requires GSL and is designed to work with GSL versions 1.15 or greater, which can be obtained from http://www.gnu.org/software/gsl . Some classes may work with older versions of GSL, but this cannot be guaranteed. A CBLAS library is also required, and ./configure
will look for libcblas
first, and if not found then it will look for libgslcblas
. If neither is present, then you may have to manually specify a CBLAS library using the LIBS
and LDFLAGS
environment variables.
This library also performs file I/O using the HDF5 (not HDF4) library, which can be obtained from http://www.hdfgroup.org . To compile O2scl without HDF support, use the argument --disable-hdf
to configure
during installation. If HDF5 is not located in a typical location for your system, in order to compile O2scl with HDF support you may have to specify the location of the HDF header files and libraries with the -I
and -L
flags. Some O2scl functions use the high-level HDF routines found in the hdf5_hl
library, but this library is usually in the same location as the base hdf5 library.
Range-checking for vectors and matrices is turned on by default. You can disable range-checking by defining -DO2SCL_NO_RANGE_CHECK, e.g.
CPPFLAGS="-DO2SCL_NO_RANGE_CHECK" ./configure
The separate libraries O2scl_eos and O2scl_part are installed by default. To disable the installation of these libraries and their associated documentation, run ./configure
with the flags --disable-eoslib
or --disable-partlib
. Note that O2scl_eos depends on O2scl_part so using --disable-partlib
without --disable-eoslib
will not work. Note also that both O2scl_part and O2scl_eos require HDF support.
There are several warning flags that are useful when configuring and compiling with O2scl . See the GSL documentation for an excellent discussion, and also see the generic installation documentation in the file INSTALL
in the O2scl top-level directory. For running configure
, for example, if you do not have privileges to write to /usr/local
,
CPPFLAGS="-O3 -I/home/asteiner/install/include" \ LDFLAGS="-L/home/asteiner/install/lib" ./configure -C \ --prefix=/home/asteiner/install
In this example, specifying -I/home/asteiner/install/include
and -L/home/asteiner/install/lib
above ensures that the GSL libraries can be found (this is where they are installed on my machine). The --prefix=/home/asteiner/install
argument to ./configure
ensures that O2scl is installed there as well.
For those users wanting to compile O2scl under Xcode on a Mac, some advice for doing this has been posted to the o2scl-help
mailing list.
The O2scl documentation is generated with Doxygen . In principle, the documentation can be regenerated by the end-user, but this is not supported and requires several external applications not included in the distribution.
Un-installation: While there is no explicit "uninstall" makefile target, there are only a couple places to check. Installation creates directories named o2scl
in the include, doc and shared files directory (which default to /usr/local/include
, /usr/local/doc
, and /usr/local/share
) which can be removed. Finally, all of the libraries are named with the prefix libo2scl
and are created by default in /usr/local/lib. As configured with the settings above, the files are in /home/asteiner/install/include/o2scl
, /home/asteiner/install/lib
, /home/asteiner/install/share/o2scl
, and /home/asteiner/install/doc/o2scl
.
Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).