Skip to content

Instantly share code, notes, and snippets.

@dineshadepu
Last active October 18, 2023 11:22
Show Gist options
  • Save dineshadepu/4313d6a148f7188965b951406e9fb83f to your computer and use it in GitHub Desktop.
Save dineshadepu/4313d6a148f7188965b951406e9fb83f to your computer and use it in GitHub Desktop.
cabana gpu installation instructions

Kokkos installation

add the following to the bashrc file

  1. Add the following line to the bashrc

export KOKKOS_INSTALL_DIR=/home/dinesh/post_doc/softwares/kokkos/build/install

  1. Execute the following in the terminal
    cmake \
      -D CMAKE_BUILD_TYPE="Release" \
      -D CMAKE_INSTALL_PREFIX=$KOKKOS_INSTALL_DIR \
      -D Kokkos_ENABLE_SERIAL=ON \
      -D Kokkos_ENABLE_OPENMP=ON \
      -D Kokkos_ENABLE_CUDA=ON \
      -D Kokkos_ENABLE_CUDA_LAMBDA=ON \
      -D Kokkos_ARCH_AMPERE86=ON \
      \
      .. ;


make install
cd ../.. # Go back to top level dir

Silo installation

  1. add to bashrc

export SILO_INSTALL_DIR=/home/dinesh/post_doc/softwares/Silo

  1. To install follow

https://github.com/LLNL/Silo/blob/main/INSTALL

4a) ./configure 4b) make 4c) make install

Install Hdf5

Follow this

https://accserv.lepp.cornell.edu/svn/packages/hdf5/release_docs/INSTALL_parallel

Download the source from (https://portal.hdfgroup.org/display/support/Downloads)

Add the following to bashrc

export HDF_INSTALL_DIR=/home/dinesh/post_doc/softwares/hdf5/

  1. CC=/usr/bin/mpicc ./configure --enable-parallel --prefix=/home/dinesh/post_doc/softwares/hdf5/install
  2. make
  3. make install

Cabana installation

add the following to the bashrc file

  1. Add the following line to the bashrc

export CABANA_INSTALL_DIR=/home/dinesh/post_doc/softwares/Cabana/build/install

  1. Execute the following in the terminal
    mkdir build
    cd build
    cmake \
	-D CMAKE_BUILD_TYPE="Release" \
     -D CMAKE_PREFIX_PATH="$KOKKOS_INSTALL_DIR;$SILO_INSTALL_DIR;$SILO_INCLUDE_DIR;$SILO_LIBRARY;$HDF_INSTALL_DIR"\
     -D CMAKE_INSTALL_PREFIX=$CABANA_INSTALL_DIR \
     -D CMAKE_CXX_COMPILER=$KOKKOS_SRC_DIR/bin/nvcc_wrapper \
     -D Cabana_REQUIRE_CUDA=ON \
     -D Cabana_REQUIRE_MPI=ON \
	 -D Cabana_ENABLE_EXAMPLES=ON \
     -D Cabana_ENABLE_TESTING=OFF \
     -D Cabana_REQUIRE_SILO=ON \
     -D Cabana_REQUIRE_HDF5=ON \
     -D Cabana_ENABLE_PERFORMANCE_TESTING=OFF \
     -D Cabana_ENABLE_CAJITA=ON \
     .. ;
    make install

Rigid body

export CABANA_INSTALL_DIR=/home/dinesh/post_doc/softwares/Cabana/build/install

cmake \
    -D CMAKE_PREFIX_PATH="$CABANA_INSTALL_DIR;$KOKKOS_INSTALL_DIR;$SILO_INSTALL_DIR;$SILO_INCLUDE_DIR;$SILO_LIBRARY;$HDF_INSTALL_DIR"\
    -D CMAKE_INSTALL_PREFIX=install \
    .. ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment