Skip to content

Commit

Permalink
Scripts for building ADIOS2 with CUDA support
Browse files Browse the repository at this point in the history
  • Loading branch information
anagainaru committed Apr 8, 2023
1 parent 0419843 commit 4773889
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
35 changes: 35 additions & 0 deletions scripts/build_scripts/build-adios2-cuda-perlmutter.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

module load cudatoolkit/11.7
module load gcc/11.2.0
module load cmake/3.24.3
module refresh

######## User Configurations ########
ADIOS2_HOME=$(pwd)
BUILD_DIR=${ADIOS2_HOME}/build-cuda-perlmutter
INSTALL_DIR=${ADIOS2_HOME}/install-cuda-perlmutter

num_build_procs=4

######## ADIOS2 ########
mkdir -p "${BUILD_DIR}"
rm -f "${BUILD_DIR}/CMakeCache.txt"
rm -rf "${BUILD_DIR}/CMakeFiles"

ARGS_ADIOS=(
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
-D BUILD_TESTING=OFF
-D ADIOS2_BUILD_EXAMPLES=OFF
-D CMAKE_CXX_COMPILER=g++
-D CMAKE_C_COMPILER=gcc

-D ADIOS2_USE_CUDA=ON

-D CMAKE_POSITION_INDEPENDENT_CODE=TRUE
-D BUILD_SHARED_LIBS=ON
-D ADIOS2_USE_Fortran=OFF
)
cmake "${ARGS_ADIOS[@]}" -S "${ADIOS2_HOME}" -B "${BUILD_DIR}"
cmake --build "${BUILD_DIR}" -j${num_build_procs}
cmake --install "${BUILD_DIR}"
34 changes: 34 additions & 0 deletions scripts/build_scripts/build-adios2-cuda-summit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

module load gcc/10.2
module load cuda/11.5
module load cmake/3.23
module refresh

######## User Configurations ########
ADIOS2_HOME=$(pwd)
BUILD_DIR=${ADIOS2_HOME}/build-cuda-summit
INSTALL_DIR=${ADIOS2_HOME}/install-cuda-summit

num_build_procs=4

######## ADIOS2 ########
mkdir -p "${BUILD_DIR}"
rm -f "${BUILD_DIR}/CMakeCache.txt"
rm -rf "${BUILD_DIR}/CMakeFiles"

ARGS_ADIOS=(
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
-D BUILD_TESTING=OFF
-D ADIOS2_BUILD_EXAMPLES=OFF
-D CMAKE_CXX_COMPILER=g++
-D CMAKE_C_COMPILER=gcc

-D ADIOS2_USE_CUDA=ON

-D CMAKE_POSITION_INDEPENDENT_CODE=TRUE
-D BUILD_SHARED_LIBS=ON
)
cmake "${ARGS_ADIOS[@]}" -S "${ADIOS2_HOME}" -B "${BUILD_DIR}"
cmake --build "${BUILD_DIR}" -j${num_build_procs}
cmake --install "${BUILD_DIR}"

0 comments on commit 4773889

Please sign in to comment.