2. Installation Guidelines

HippoLBM provides flexible installation methods to meet various user and developer needs. For user usage, the Spack package manager offers a straightforward installation process, ideal for user-only. However, for those who intend to develop or customize HippoLBM, CMake is recommended, as it supports both CPU and GPU configurations (GPU support is not available with Spack).

Choose the method below that best suits your setup and follow the instructions for a smooth installation experience.

2.1. Installation With CMake

2.1.1. Minimal Requirements

The first step involves the installation of yaml-cpp, which can be achieved using either the spack package manager or cmake:

spack install yaml-cpp@0.6.3
spack load yaml-cpp@0.6.3

Please ensure to remove yaml-cpp and build-yaml-cpp. When installing Onika, and hippoLBM, remember to add the following to your cmake command: -DCMAKE_PREFIX_PATH=${PATH_TO_YAML}.

To proceed with the installation, your system must meet the minimum prerequisites (MPI and Onika). The next step involves the installation of Onika:

export CURRENT_HOME=$PWD
git clone --branch v1.0.4 https://github.com/Collab4exaNBody/onika.git
mkdir ${CURRENT_HOME}/build-onika && cd ${CURRENT_HOME}/build-onika
cmake ${CURRENT_HOME}/onika -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${CURRENT_HOME}/install-onika -DONIKA_BUILD_CUDA=OFF
make install -j 10
export onika_DIR=${CURRENT_HOME}/install-onika
rm -rf ${CURRENT_HOME}/build-onika

2.1.2. HippoLBM Installation

To install HippoLBM, follow these steps:

Set the exaNBody_DIR environment variable to the installation path. Clone the HippoLBM repository using the command:

git clone https://github.com/Collab4exaNBody/hippoLBM.git

Create a directory named build-hippoLBM and navigate into it:

mkdir build-hippoLBM && cd build-hippoLBM

Run CMake to configure the HippoLBM build:

cmake ../hippoLBM -DCMAKE_BUILD_TYPE=Release
make -j 4
source bin/setup-env.sh

2.1.3. Launch examples / ctest

A set of minimal test cases can be run using the following command (non-regression test) in your build repository:

ctest

or

./hippoLBM ../hippoLBM/example/lbm_poiseuille.msp

You can also add hippoLBM to your bashrc by adding an alias (please, replace YOURDIR by your build directory):

vi ~/.bashrc
source ~/YOURDIR/build/bin/hippoLBM
alias hippoLBM='~/YOURDIR/build/hippoLBM'

Or just on your local environment:

alias hippoLBM=$PWD/hippoLBM

2.1.4. Installing Spack

git clone --depth=2 --branch=v0.23.0 https://github.com/spack/spack.git
export SPACK_ROOT=$PWD/spack
source ${SPACK_ROOT}/share/spack/setup-env.sh

2.1.5. Installing HippoLBM

First get the spack repository in hippoLBM directory and add it to spack. It contains two packages: onika and hippolbm:

git clone https://github.com/Collab4exaNBody/spack-repos.git
spack repo add spack-repos

Second install HippoLBM (this command will install cmake, yaml-cpp, and onika).

spack install hippolbm