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
sudo apt install libyaml-cpp-dev
export CURRENT_HOME=$PWD
git clone --depth 1 --branch yaml-cpp-0.6.3 https://github.com/jbeder/yaml-cpp.git
mkdir ${CURRENT_HOME}/build-yaml-cpp && cd ${CURRENT_HOME}/build-yaml-cpp
cmake ../yaml-cpp/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${CURRENT_HOME}/install-yaml-cpp -DYAML_BUILD_SHARED_LIBS=ON -DYAML_CPP_BUILD_TESTS=OFF
make install -j 4
cd ${CURRENT_HOME}
export PATH_TO_YAML=$PWD/install-yaml-cpp
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
Please, select the correct compute capability for your GPU
for DCMAKE_CUDA_ARCHITECTURES
instead of 86 in this example.
export CURRENT_HOME=$PWD
git clone --branch v1.0.4 https://github.com/Collab4exaNBody/onika.git
git clone --branch v2.0.4 https://github.com/Collab4exaNBody/exaNBody.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=ON -DCMAKE_CUDA_ARCHITECTURES=86
make install -j 10
export onika_DIR=${CURRENT_HOME}/install-onika
rm -rf ${CURRENT_HOME}/build-onika
Please, note that you need copy on topaze onika and exaNBody repository. You can load the YAML
module such as module load yaml-cpp/
and add this option to the cmake
command: -DCMAKE_PREFIX_PATH=/ccc/products/yaml-cpp-0.6.3/system/default/
module load gnu/13.2.0 cuda/12.4 mpi/openmpi/4.1.6 cmake/3.29.6
cd $CCCSCRATCHDIR
export CURRENT_HOME=$PWD
// copy onika v1.0.4
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=ON -DCMAKE_CUDA_ARCHITECTURES=80
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