HLIBpro  2.7
Installation

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

Remarks
Please note, that you do not have to use SCons to include 𝖧𝖫𝖨𝖡𝗉𝗋𝗈 into your own projects. For further instructions for such cases, please refer to Integration into own Projects.
Own programs may be added to example/SConscript. Refer to http://www.scons.org for further instructions.


Linux

𝖧𝖫𝖨𝖡𝗉𝗋𝗈 was built on Debian Linux 9 using GCC 6.3. However, other distributions should also work, but the instructions for installing necessary libraries may differ.

Remarks
Starting with GCC 5, a new C++ ABI was used which is incompatible with the old ABI used in GCC 4. For using 𝖧𝖫𝖨𝖡𝗉𝗋𝗈 with GCC 4, a distribution based on Debian 8 with GCC 4.9 was prepared (Linux-GCC4). The default distribution will lead to linking errors with GCC 4 and above!

For building of HLIBpro, Boost v1.68 and TBB v2019.2 was used. These library versions are not part of Debian 8/9 and are compiled manually. Hence, no instructions for installation are given below. The same holds for the METIS library, which was included for compatibility with other distributions not yet having packages for v5 of the library. If you do not want to install the libraries by yourself or if your Linux distribution provides different versions of those libraries, you may use the auxiliary package for HLIBpro (see below)

To install LAPACK, zlib, FFTW3, HDF5 and GSL using the standard package tools, you may run

$ aptitude install liblapack-dev zlib1g-dev libfftw3-dev libhdf5-dev libgsl-dev

Furthermore, for the internal make system, you also have to install SCons:

$ aptitude install scons

If you use a manual installation of TBB or Boost, 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. For METIS, please specify the corresponding installation directory (metis_dir).

Remarks
For users of Fedora 20: during compilation a warning will show up about a missing libbz2.so.1.0. To fix this, enter the following in the 𝖧𝖫𝖨𝖡𝗉𝗋𝗈 directory:
> ln -sf /usr/lib64/libbz2.so.1 aux/lib/libbz2.so.1.0

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.

Remarks
The last step is usually not neccessary when using the provided SCons makefiles.

Using the Auxiliary Library Package

Download the archive containing the auxiliary files and unpack it in your HLIBpro directory:

$ cd hlibpro-2.7
$ tar -xzf hlibpro-2.7-Linux-aux.tgz

Please note, that the original SConstruct file will be overwritten by this!

Afterwards, by calling scons you may compile the HLIBpro examples using the provided libraries.


MacOSX

Xcode provides libraries for LAPACK/BLAS and zlib. In addtion, TBB, Boost, FFTW, GSL 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.

Remarks
The default distribution was generated using Boost 1.68, TBB v2019.2, FFTW v3.3 and GSL v2.5 installed via Homebrew, e.g.
brew install boost tbb fftw gsl scons

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.

Remarks
An error regarding an unknown symbol *_hlib_complex* may come up during compilation. In that case, please use
$ scons debug=0 optimise=1

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

Remarks
𝖧𝖫𝖨𝖡𝗉𝗋𝗈 internally makes use of C++11 features. Therefore, Clang with libc++ was used for compilation. When using 𝖧𝖫𝖨𝖡𝗉𝗋𝗈 in your projects, make sure to add "-stdlib=libc++" during compilation and linking.


Integration into own Projects

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).


License File Management

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.

Remarks
If several license keys are available, they may all be put into one license file.