-
Notifications
You must be signed in to change notification settings - Fork 14
Build instructions
The following shows how to build, configure, and test CabanaMD.
CabanaMD has the following dependencies:
Dependency | Version | Required | Details |
---|---|---|---|
CMake | 3.11+ | Yes | Build system |
MPI | GPU Aware if CUDA Enabled | Yes | Message Passing Interface |
Kokkos | 3.1.0 | Yes | Provides portable on-node parallelism |
Cabana | master | Yes | Performance portable particle algorithms |
CUDA | 9+ | No | Programming model for NVIDIA GPUs |
HIP | 3.5+ | No | Programming model for AMD GPUs |
ArborX | master | No | Performance portable geometric search |
libnnp | 1.0.0 | No | Neural network potential utilities |
Build Kokkos, followed by Cabana: https://github.com/ECP-copa/Cabana/wiki/Build-Instructions
Build instructions are available for both CPU and GPU. Note that Cabana with MPI is required.
After building Kokkos and Cabana for CPU:
# Change directories as needed
export KOKKOS_DIR=$HOME/kokkos
export CABANA_DIR=$HOME/Cabana
cd ./CabanaMD
export CBNMD_INSTALL_DIR=`pwd`/build/install
mkdir build
cd build
pwd
cmake \
-D CMAKE_PREFIX_PATH="$CABANA_DIR" \
-D CMAKE_INSTALL_PREFIX=$CBNMD_INSTALL_DIR \
-D CabanaMD_VECTORLENGTH=1 \
\
.. ;
make install
cd ../../
CabanaMD will build for all Kokkos enabled backends.
The vector length flag sets the Cabana::AoSoA
vector length for all particle properties.
After building Kokkos and Cabana for GPU: https://github.com/ECP-copa/Cabana/wiki/Build-Instructions#GPU-Build
the GPU build is identical to that above except the options passed to CMake:
cmake \
-D CMAKE_CXX_COMPILER=$KOKKOS_SRC_DIR/bin/nvcc_wrapper \
-D CMAKE_PREFIX_PATH="$CABANA_DIR" \
-D CMAKE_INSTALL_PREFIX=$CBNMD_INSTALL_DIR \
-D CabanaMD_VECTORLENGTH=32 \
\
.. ;
If using the optional neural network potential, additional CMake flags for the location of the libnnp library (https://github.com/CompPhysVienna/n2p2) and enabling the potential are needed (with additional optional vector length setting and maximum symmetry function preallocation setting):
-D N2P2_DIR=$N2P2_DIR \
-D CabanaMD_ENABLE_NNP=ON \
-D CabanaMD_VECTORLENGTH_NNP=1 \
-D CabanaMD_MAXSYMMFUNC_NNP=30 \
If using the optional ArborX library (https://github.com/arborx/ArborX), it must be enabled in the Cabana build.
Once configured, build and install CabanaMD with:
make -j $BUILD_NUM_THREADS
make install
Ensure installation by checking the installed libraries an headers in CABANAMD_INSTALL_DIR. If tests are enable you can run the CabanaMD unit test suite with:
ctest