-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Venado build #1782
base: develop
Are you sure you want to change the base?
Venado build #1782
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
############################################################################### | ||
# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC | ||
# and RAJA project contributors. See the RAJA/LICENSE file for details. | ||
# | ||
# SPDX-License-Identifier: (BSD-3-Clause) | ||
############################################################################### | ||
|
||
set(RAJA_COMPILER "RAJA_COMPILER_GCC" CACHE STRING "") | ||
|
||
set(ENABLE_CUDA ON CACHE BOOL "") | ||
|
||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -funroll-loops -finline-functions" CACHE STRING "") | ||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -march=native -funroll-loops -finline-functions" CACHE STRING "") | ||
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g" CACHE STRING "") | ||
|
||
set(HOST_OPT_FLAGS "-Xcompiler -O3 -Xcompiler -fopenmp") | ||
|
||
set(RAJA_DATA_ALIGN 64 CACHE STRING "") | ||
|
||
set(RAJA_HOST_CONFIG_LOADED On CACHE BOOL "") | ||
|
||
set(ENABLE_FORTRAN OFF CACHE BOOL "") | ||
|
||
set(CMAKE_C_COMPILER "${GCC_HOME}/bin/gcc" CACHE PATH "") | ||
set(CMAKE_CXX_COMPILER "${GCC_HOME}/bin/g++" CACHE PATH "") | ||
set(BLT_CXX_STD "c++17" CACHE STRING "") | ||
|
||
#------------------------------------------------------------------------------ | ||
# CUDA support | ||
#------------------------------------------------------------------------------ | ||
set(CMAKE_CUDA_COMPILER "${CUDA_TOOLKIT_ROOT_DIR}/bin/nvcc" CACHE PATH "") | ||
set(CMAKE_CUDA_HOST_COMPILER "${CMAKE_CXX_COMPILER}" CACHE PATH "") | ||
Comment on lines
+24
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably best to move these things into the script |
||
|
||
set(CMAKE_CUDA_FLAGS "-restrict --expt-extended-lambda -G" CACHE STRING "") | ||
set(CMAKE_CUDA_FLAGS_RELEASE "-O3 ${HOST_OPT_FLAGS}" CACHE STRING "") | ||
set(CMAKE_CUDA_FLAGS_DEBUG "-g -G -O0" CACHE STRING "") | ||
set(CMAKE_CUDA_FLAGS_RELWITHDEBINFO "-g -lineinfo -O3 ${HOST_OPT_FLAGS}" CACHE STRING "") | ||
|
||
set(CUDA_SEPARABLE_COMPILATION ON CACHE BOOL "" ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And this one |
||
|
||
# nvcc does not like gtest's 'pthreads' flag | ||
set(gtest_disable_pthreads ON CACHE BOOL "") |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/usr/bin/env bash | ||
|
||
############################################################################### | ||
# Copyright (c) 2016-24, Lawrence Livermore National Security, LLC | ||
# and RAJA project contributors. See the RAJA/LICENSE file for details. | ||
# | ||
# SPDX-License-Identifier: (BSD-3-Clause) | ||
############################################################################### | ||
|
||
if [[ $# -lt 3 ]]; then | ||
echo | ||
echo "You must pass 3 arguments to the script (in this order): " | ||
echo " 1) compiler version number for nvcc" | ||
echo " 2) CUDA compute architecture (number only, not 'sm_90' for example)" | ||
echo " 3) compiler version number for gcc" | ||
echo | ||
echo "For example: " | ||
echo " cray_nvcc_gcc.sh 12.5 90 12.3.0" | ||
exit | ||
fi | ||
|
||
COMP_NVCC_VER=$1 | ||
COMP_ARCH=$2 | ||
COMP_GCC_VER=$3 | ||
MrBurmark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
shift 3 | ||
|
||
BUILD_SUFFIX=lanl_cray-nvcc${COMP_NVCC_VER}-${COMP_ARCH}-gcc${COMP_GCC_VER} | ||
|
||
echo | ||
echo "Creating build directory build_${BUILD_SUFFIX} and generating configuration in it" | ||
echo "Configuration extra arguments:" | ||
echo " $@" | ||
echo | ||
|
||
rm -rf build_${BUILD_SUFFIX} >/dev/null | ||
mkdir build_${BUILD_SUFFIX} && cd build_${BUILD_SUFFIX} | ||
|
||
cmake \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DGCC_HOME=/usr/projects/hpcsoft/tce/24-07/cos3-aarch64-cc90/compilers/gcc/${COMP_GCC_VER} \ | ||
-DCMAKE_CUDA_ARCHITECTURES=${COMP_ARCH} \ | ||
-DCUDA_TOOLKIT_ROOT_DIR=/opt/nvidia/hpc_sdk/Linux_aarch64/24.7/cuda/${COMP_NVCC_VER} \ | ||
-C ../host-configs/lanl-builds/cray/nvcc_gcc_X.cmake \ | ||
-DENABLE_BENCHMARKS=On \ | ||
-DCMAKE_INSTALL_PREFIX=../install_${BUILD_SUFFIX} \ | ||
"$@" \ | ||
.. | ||
|
||
echo | ||
echo "***********************************************************************" | ||
echo | ||
echo "cd into directory build_${BUILD_SUFFIX} and run make to build RAJA" | ||
echo | ||
echo " Please note that you have to disable CUDA GPU hooks when you run" | ||
echo " the RAJA tests; for example," | ||
echo | ||
echo " make test" | ||
Comment on lines
+54
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was there supposed to be something else in the example here apart from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably. Our other nvcc scripts have something like this: https://github.com/LLNL/RAJA/blob/develop/scripts/lc-builds/blueos_nvcc_gcc.sh#L63 |
||
echo | ||
echo "***********************************************************************" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and this one line