HLIBpro
2.0
|
Table of Contents |
To use the binary distribution of 𝓗𝖫𝖨𝖡𝗉𝗋𝗈, the following libraries have to be available together with 𝓗𝖫𝖨𝖡𝗉𝗋𝗈:
See below, for instruction on how to install these using system supplied commands.
Furthermore, for the internal make system of 𝓗𝖫𝖨𝖡𝗉𝗋𝗈, you will also need
Currently, 𝓗𝖫𝖨𝖡𝗉𝗋𝗈 is available for Debian and Ubuntu. Other Linux distributions should also work, but the instructions for installing necessary libraries may differ.
To install LAPACK, TBB, Boost, zlib, FFTW3 and Scotch using the standard package tools, you may run
$ aptitude install liblapack-dev libtbb-dev libboost1.48-all-dev zlib1g-dev libfftw3-dev libscotch-dev
Furthermore, for the internal make system, you also have to install SCons:
$ aptitude install scons
If you use a manual installation of TBB, Boost or Scotch, you have to modify the SConstruct file and enter the installation directories of each library, e.g. tbb_dir, boost_dir or scotch_dir, before compilation.
Now, running
$ scons
within the 𝓗𝖫𝖨𝖡𝗉𝗋𝗈 installation directory should compile all examples.
Finally, you need to add the path to the library to your environment so that you can start the example programs:
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path_to_HLIBpro>/lib
for the bash shell or
$ setenv LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:<path_to_HLIBpro>/lib"
for csh compatible shells.
To use METIS (http://glaros.dtc.umn.edu/gkhome/views/metis) with 𝓗𝖫𝖨𝖡𝗉𝗋𝗈, you have to download and install the METIS source package. Afterwards, please use hlibpro-2.0-Linux-METIS.tgz as the binary distribution.
If the internal SCons make system is used, enter the METIS installation directory defined in metis_dir in the SConstruct file.
Xcode provides libraries for LAPACK/BLAS and zlib. In addtion, TBB, Boost and SCons (if wanted) have to be installed. You may either install it by hand following the instructions at the corresponding web pages or use available package systems for MacOSX, e.g. Homebrew, MacPorts or Fink.
Due to missing default installation capabilities, support for FFTW3 and Scotch is not compiled into 𝓗𝖫𝖨𝖡𝗉𝗋𝗈 on MacOSX systems.
To use the internal make system of 𝓗𝖫𝖨𝖡𝗉𝗋𝗈, please define the installation directory of Boost in case, it is not system wide available, by changing the variable boost_dir in the file SConstruct.
Afterwards, run
$ scons
within the 𝓗𝖫𝖨𝖡𝗉𝗋𝗈 installation directory to compile all example programs.
Finally, you need to add the path to the library to your environment so that you can start the example programs:
$ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:<path_to_HLIBpro>/lib
The same has to be done for the TBB and Boost library, e.g.
$ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:<path_to_tbb>/lib $ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:<path_to_boost>/lib
To ease the integration of 𝓗𝖫𝖨𝖡𝗉𝗋𝗈 into own projects, the needed compiler flags are can be printed out by using
$ bin/hlib-config
To make it work, the installation path of 𝓗𝖫𝖨𝖡𝗉𝗋𝗈 has to be changed in the command. So, open bin/hlib-config and replace "<path_to_HLIBpro>" in the definition of prefix by the corresponding path.
Compilation options may then be printed out via
$ bin/hlib-config --cflags
and linking options via
$ bin/hlib-config --lflags
(both may also be combined).
As an example, by using hlib-config, the compilation of the example bem1d.cc may also be performed via
$ g++ -o examples/bem1d examples/bem1d.cc `bin/hlib-config --cflags --lflags`
(assuming a Unix system).
The license file hlibpro.lic must be placed either in the directory where the final programs will be executed, e.g. in the examples/ subdirectory for the supplied examples, of in the directory pointed to by the environment variable HLIBPRO_LIC_PATH
On Unix systems that can be done via
$ export HLIBPRO_LIC_PATH=<path_to_HLIBpro.lic>
for the bash shell or
$ setenv HLIBPRO_LIC_PATH "<path_to_HLIBpro.lic>"
for csh compatible shells.