Installation

System Requirements

  • Modern C++ compiler (supports C++ standard 17).

  • CMake (version >= 3.9).

The library is tested to work on a GNU-compliant compiling system, but have not tested on other compilers. Feel free to contact us if you have any problem.

Depending on the modules you want to install, other libraries may be necessary. See the Options below.

How to Install

  1. Clone or download the Github repository (unzip it if compressed), then enter the root directory of it.

  2. Execute the following shell commands:

    mkdir build && cd build
    cmake ..
    make
    make install
    

    This configures, builds the library in the build/ directory, and install it into the default system location. To test the installation, use

    ctest -VV
    

Note that

  • To specify your own installation location, use cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install. If successful, two folders named lib and include are generated, which contain the library and header files, respectively. You may add them into the environment lists (e.g., CPLUS_INCLUDE_PATH, LIBRARY_PATH and LD_LIBRARY_PATH).

  • To compile the library parallelly, use make -j number-of-processes.

  • For a CMake version that is recent enough, use cmake --build . to compile and use cmake --build . --target install to install. They are equivalent to make and make install.

Options

Other options can be specified by using -D when invoking cmake. For example

cmake .. -Denable-mpi=ON -DCMAKE_CXX_COMPILER=g++

Allowed options are listed below.

HIPP supports a set of optional modules for MPI, IO, etc.

Module

CMake Option

Description

System Requirement

MPI

-Denable-mpi=ON

Message Passing Interface

MPI environment
(standard >= 3.0)

IO

-Denable-hdf5=ON

IO library

HDF5 C library
(version >=1.8.0)

SIMD

-Denable-simd=ON

Template SIMD library

x86 Arch
(supporting SIMD)

NUMERICAL

-Denable-gsl=ON

The scientific library

GSL (version >=2.6)

ALGORITHM

Automatically
installed

The algorithms

Note that

  • The options for modules can be turned on simultaneously.

  • GSL (GNU scientific libraries) must be installed when enable-gsl is turned on. By default, the library in the system environmental list (e.g., CPLUS_INCLUDE_PATH and LIBRARY_PATH). You may override this by -DGSL_ROOT_DIR=/path/to/gsl, which must include the lib and include/gsl subdirectories.

  • HDF5 must be installed when enable-hdf5 is turned on. CMake uses the commands like h5cc to detect the information of HDF5 library. You may add the bin directory of HDF5 to your system environmental list (e.g., PATH).

Other options that can be specified by -D in the invode of cmake are

Option

Description

CMAKE_C_COMPILER=/path/to/compiler

The C compiler used to compile third-party libraries.
(default: detected by CMake)

CMAKE_CXX_COMPILER=/path/to/compiler

The C++ compiler (must support standard 17).
(default: detected by CMake)

MPI_CXX_COMPILER=/path/to/compiler

The MPI compiler wrapper.
(default: detected by CMake)

CMAKE_CXX_FLAGS="flag1 flag2 ..."

Compiling and linking flags.
(default: “-O3 -Wall”)

BUILD_TESTING=ON|OFF

Whether to build test cases.
(default: ON)