diff --git a/host-configs/lc-builds/toss4/icpc-classic_X.cmake b/host-configs/lc-builds/toss4/icpc-classic_X.cmake deleted file mode 100755 index 26b3e972ee..0000000000 --- a/host-configs/lc-builds/toss4/icpc-classic_X.cmake +++ /dev/null @@ -1,18 +0,0 @@ -############################################################################### -# Copyright (c) Lawrence Livermore National Security, LLC and other -# RAJA Project Developers. See top-level LICENSE and COPYRIGHT -# files for dates and other details. No copyright assignment is required -# to contribute to RAJA. -# -# SPDX-License-Identifier: (BSD-3-Clause) -############################################################################### - -set(RAJA_COMPILER "RAJA_COMPILER_ICC" CACHE STRING "") - -set(COMMON_FLAGS "-gxx-name=/usr/tce/packages/gcc/gcc-10.3.1/bin/g++") - -set(CMAKE_CXX_FLAGS_RELEASE "${COMMON_FLAGS} -O3 -march=native -ansi-alias -diag-disable cpu-dispatch" CACHE STRING "") -set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${COMMON_FLAGS} -O3 -g -march=native -ansi-alias -diag-disable cpu-dispatch" CACHE STRING "") -set(CMAKE_CXX_FLAGS_DEBUG "${COMMON_FLAGS} -O0 -g" CACHE STRING "") - -set(RAJA_HOST_CONFIG_LOADED On CACHE BOOL "") diff --git a/host-configs/lc-builds/toss4/icpc_X.cmake b/host-configs/lc-builds/toss4/icpc_X.cmake deleted file mode 100755 index a98d0d9392..0000000000 --- a/host-configs/lc-builds/toss4/icpc_X.cmake +++ /dev/null @@ -1,16 +0,0 @@ -############################################################################### -# Copyright (c) Lawrence Livermore National Security, LLC and other -# RAJA Project Developers. See top-level LICENSE and COPYRIGHT -# files for dates and other details. No copyright assignment is required -# to contribute to RAJA. -# -# SPDX-License-Identifier: (BSD-3-Clause) -############################################################################### - -set(RAJA_COMPILER "RAJA_COMPILER_ICC" CACHE STRING "") - -set(CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -ansi-alias -diag-disable cpu-dispatch" CACHE STRING "") -set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -march=native -ansi-alias -diag-disable cpu-dispatch" CACHE STRING "") -set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g" CACHE STRING "") - -set(RAJA_HOST_CONFIG_LOADED On CACHE BOOL "") diff --git a/scripts/lc-builds/corona_sycl.sh b/scripts/lc-builds/corona_sycl.sh index 89fc518374..29108e1c05 100755 --- a/scripts/lc-builds/corona_sycl.sh +++ b/scripts/lc-builds/corona_sycl.sh @@ -9,18 +9,30 @@ # SPDX-License-Identifier: (BSD-3-Clause) ############################################################################### -if [[ $# -lt 1 ]]; then - echo - echo "You must pass 1 argument to the script: " - echo " 1) SYCL compiler installation path" +# Default CMake version if not provided +DEFAULT_CMAKE_VER=3.25.2 + +# Require compiler version +if [ "$1" == "" ]; then echo - echo "For example: " - echo " corona_sycl.sh /usr/workspace/raja-dev/clang_sycl_16b7bcb09915_hip_gcc10.3.1_rocm6.4.3" - exit + echo "You must pass a SYCL compiler path to script. For example," + echo " corona_sycl.sh /usr/workspace/raja-dev/clang_sycl_16b7bcb09915_hip_gcc10.3.1_rocm6.4.3 [3.27.4]" + echo "An optional second argument can be given to set the CMake version to load." + echo "If no CMake version is provided, version ${DEFAULT_CMAKE_VER} will be used." + exit 1 fi SYCL_PATH=$1 -shift 1 + +# Detect optional second positional argument as a CMake version if it looks like N.M or N.M.P +# Otherwise, treat it as a normal CMake argument. +if [ -n "$2" ] && [[ "$2" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + CMAKE_VER=$2 + shift 2 +else + CMAKE_VER=$DEFAULT_CMAKE_VER + shift 1 +fi BUILD_SUFFIX=corona-sycl : ${BUILD_TYPE:=RelWithDebInfo} @@ -28,6 +40,7 @@ RAJA_HOSTCONFIG=../host-configs/lc-builds/toss4/corona_sycl.cmake echo echo "Creating build directory build_${BUILD_SUFFIX} and generating configuration in it" +echo "Using CMake version: ${CMAKE_VER}" echo "Configuration extra arguments:" echo " $@" echo @@ -40,7 +53,7 @@ DATE=$(printf '%(%Y-%m-%d)T\n' -1) export PATH=${SYCL_PATH}/bin:$PATH export LD_LIBRARY_PATH=${SYCL_PATH}/lib:${SYCL_PATH}/lib64:$LD_LIBRARY_PATH -module load cmake/3.23.1 +module load cmake/${CMAKE_VER} cmake \ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ diff --git a/scripts/lc-builds/toss4_amdclang.sh b/scripts/lc-builds/toss4_amdclang.sh index e565ce32d1..9739645cf7 100755 --- a/scripts/lc-builds/toss4_amdclang.sh +++ b/scripts/lc-builds/toss4_amdclang.sh @@ -9,21 +9,34 @@ # SPDX-License-Identifier: (BSD-3-Clause) ############################################################################### +# Default CMake version if not provided +DEFAULT_CMAKE_VER=3.24.2 + if [[ $# -lt 2 ]]; then echo echo "You must pass 2 or more arguments to the script (in the following order): " echo " 1) compiler version number" echo " 2) HIP compute architecture" - echo " 3...) optional arguments to cmake" + echo " 3) optional CMake version to load." echo echo "For example: " - echo " toss4_amdclang.sh 4.1.0 gfx906" - exit + echo " toss4_amdclang.sh 4.1.0 gfx906 [3.27.4]" + echo "If no CMake version is provided, version ${DEFAULT_CMAKE_VER} will be used." + exit 1 fi COMP_VER=$1 COMP_ARCH=$2 -shift 2 + +# Detect optional third positional argument as a CMake version if it looks like N.M or N.M.P +# Otherwise, treat it as a normal CMake argument. +if [ -n "$3" ] && [[ "$3" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + CMAKE_VER=$3 + shift 3 +else + CMAKE_VER=$DEFAULT_CMAKE_VER + shift 2 +fi HOSTCONFIG="hip_3_X" @@ -42,6 +55,7 @@ BUILD_SUFFIX=lc_toss4-amdclang-${COMP_VER}-${COMP_ARCH} echo echo "Creating build directory build_${BUILD_SUFFIX} and generating configuration in it" +echo "Using CMake version: ${CMAKE_VER}" echo "Configuration extra arguments:" echo " $@" echo @@ -53,7 +67,7 @@ rm -rf build_${BUILD_SUFFIX} >/dev/null mkdir build_${BUILD_SUFFIX} && cd build_${BUILD_SUFFIX} -module load cmake/3.24.2 +module load cmake/${CMAKE_VER} # unload rocm to avoid configuration problems where the loaded rocm and COMP_VER # are inconsistent causing the rocprim from the module to be used unexpectedly diff --git a/scripts/lc-builds/toss4_amdclang_asan.sh b/scripts/lc-builds/toss4_amdclang_asan.sh index f2da601277..b25a02922f 100755 --- a/scripts/lc-builds/toss4_amdclang_asan.sh +++ b/scripts/lc-builds/toss4_amdclang_asan.sh @@ -9,21 +9,34 @@ # SPDX-License-Identifier: (BSD-3-Clause) ############################################################################### +# Default CMake version if not provided +DEFAULT_CMAKE_VER=3.24.2 + if [[ $# -lt 2 ]]; then echo - echo "You must pass 2 or more arguments to the script (in this order): " + echo "You must pass 2 or more arguments to the script (in the following order): " echo " 1) compiler version number" echo " 2) HIP compute architecture" - echo " 3...) optional arguments to cmake" + echo " 3) optional CMake version to load." echo echo "For example: " - echo " toss4_amdclang_asan.sh 5.7.0 gfx90a" - exit + echo " toss4_amdclang.sh 4.1.0 gfx906 [3.27.4]" + echo "If no CMake version is provided, version ${DEFAULT_CMAKE_VER} will be used." + exit 1 fi COMP_VER=$1 COMP_ARCH=$2 -shift 2 + +# Detect optional third positional argument as a CMake version if it looks like N.M or N.M.P +# Otherwise, treat it as a normal CMake argument. +if [ -n "$3" ] && [[ "$3" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + CMAKE_VER=$3 + shift 3 +else + CMAKE_VER=$DEFAULT_CMAKE_VER + shift 2 +fi HOSTCONFIG="hip_3_X" @@ -42,6 +55,7 @@ BUILD_SUFFIX=lc_toss4-amdclang-${COMP_VER}-${COMP_ARCH}-asan echo echo "Creating build directory build_${BUILD_SUFFIX} and generating configuration in it" +echo "Using CMake version: ${CMAKE_VER}" echo "Configuration extra arguments:" echo " $@" echo @@ -56,7 +70,7 @@ rm -rf build_${BUILD_SUFFIX} >/dev/null mkdir build_${BUILD_SUFFIX} && cd build_${BUILD_SUFFIX} -module load cmake/3.24.2 +module load cmake/${CMAKE_VER} # unload rocm to avoid configuration problems where the loaded rocm and COMP_VER # are inconsistent causing the rocprim from the module to be used unexpectedly diff --git a/scripts/lc-builds/toss4_cce_hip.sh b/scripts/lc-builds/toss4_cce_hip.sh index 17508ee4ca..4ad107e1d4 100755 --- a/scripts/lc-builds/toss4_cce_hip.sh +++ b/scripts/lc-builds/toss4_cce_hip.sh @@ -9,23 +9,36 @@ # SPDX-License-Identifier: (BSD-3-Clause) ############################################################################### +# Default CMake version if not provided +DEFAULT_CMAKE_VER=3.24.2 + if [[ $# -lt 3 ]]; then echo echo "You must pass 3 or more arguments to the script (in this order): " echo " 1) compiler version number" echo " 2) HIP version" echo " 3) HIP compute architecture" - echo " 4...) optional arguments to cmake" + echo " 4) optional CMake version to load." echo echo "For example: " - echo " toss4_cce_hip.sh 14.0.3 5.2.3 gfx90a" - exit + echo " toss4_cce_hip.sh 14.0.3 5.2.3 gfx90a [3.27.4]" + echo "If no CMake version is provided, version ${DEFAULT_CMAKE_VER} will be used." + exit 1 fi COMP_VER=$1 HIP_VER=$2 HIP_ARCH=$3 -shift 3 + +# Detect optional fourth positional argument as a CMake version if it looks like N.M or N.M.P +# Otherwise, treat it as a normal CMake argument. +if [ -n "$4" ] && [[ "$4" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + CMAKE_VER=$4 + shift 4 +else + CMAKE_VER=$DEFAULT_CMAKE_VER + shift 3 +fi HOSTCONFIG="hip_3_X" @@ -33,6 +46,7 @@ BUILD_SUFFIX=lc_toss4-cce-${COMP_VER}-hip-${HIP_VER}-${HIP_ARCH} echo echo "Creating build directory build_${BUILD_SUFFIX} and generating configuration in it" +echo "Using CMake version: ${CMAKE_VER}" echo "Configuration extra arguments:" echo " $@" echo @@ -44,7 +58,7 @@ rm -rf build_${BUILD_SUFFIX} >/dev/null mkdir build_${BUILD_SUFFIX} && cd build_${BUILD_SUFFIX} -module load cmake/3.24.2 +module load cmake/${CMAKE_VER} cmake \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/scripts/lc-builds/toss4_cce_omptarget.sh b/scripts/lc-builds/toss4_cce_omptarget.sh index 6fad090854..69e5d70390 100755 --- a/scripts/lc-builds/toss4_cce_omptarget.sh +++ b/scripts/lc-builds/toss4_cce_omptarget.sh @@ -9,21 +9,34 @@ # SPDX-License-Identifier: (BSD-3-Clause) ############################################################################### +# Default CMake version if not provided +DEFAULT_CMAKE_VER=3.24.2 + if [[ $# -lt 2 ]]; then echo - echo "You must pass 3 or more arguments to the script (in this order): " + echo "You must pass 2 or more arguments to the script (in this order): " echo " 1) compiler version number" echo " 2) HIP compute architecture" - echo " 3...) optional arguments to cmake" + echo " 3) optional CMake version to load." echo echo "For example: " - echo " toss4_cce_omptarget.sh 20.0.0-magic gfx942" - exit + echo " toss4_cce_omptarget.sh 20.0.0-magic gfx942 [3.27.4]" + echo "If no CMake version is provided, version ${DEFAULT_CMAKE_VER} will be used." + exit 1" fi COMP_VER=$1 HIP_ARCH=$2 -shift 2 + +# Detect optional third positional argument as a CMake version if it looks like N.M or N.M.P +# Otherwise, treat it as a normal CMake argument. +if [ -n "$3" ] && [[ "$3" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + CMAKE_VER=$3 + shift 3 +else + CMAKE_VER=$DEFAULT_CMAKE_VER + shift 2 +fi HOSTCONFIG="cce_omptarget_X" @@ -31,6 +44,7 @@ BUILD_SUFFIX=lc_toss4-cce-${COMP_VER}-${HIP_ARCH}-omptarget echo echo "Creating build directory build_${BUILD_SUFFIX} and generating configuration in it" +echo "Using CMake version: ${CMAKE_VER}" echo "Configuration extra arguments:" echo " $@" echo @@ -39,7 +53,7 @@ rm -rf build_${BUILD_SUFFIX} >/dev/null mkdir build_${BUILD_SUFFIX} && cd build_${BUILD_SUFFIX} -module load cmake/3.24.2 +module load cmake/${CMAKE_VER} cmake \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/scripts/lc-builds/toss4_clang-format.sh b/scripts/lc-builds/toss4_clang-format.sh index eb92cf53d5..a0dc77b3e4 100755 --- a/scripts/lc-builds/toss4_clang-format.sh +++ b/scripts/lc-builds/toss4_clang-format.sh @@ -9,23 +9,35 @@ # SPDX-License-Identifier: (BSD-3-Clause) ############################################################################### +# Default CMake version if not provided +DEFAULT_CMAKE_VER=3.25.2 + if [ "$1" == "" ]; then echo echo "You must pass a compiler version number to script. For example," - echo " toss4_clang.sh 14.0.6" - echo - echo "The compiler MAJOR VERSION must be 14, or CMake will complain" - echo "and you will not be able to run 'make style' to format the code." - exit + echo " toss4_clang.sh 14.0.6 [3.27.4]" + echo "An optional second argument can be given to set the CMake version to load." + echo "If no CMake version is provided, version ${DEFAULT_CMAKE_VER} will be used." + exit 1 fi COMP_VER=$1 -shift 1 + +# Detect optional second positional argument as a CMake version if it looks like N.M or N.M.P +# Otherwise, treat it as a normal CMake argument. +if [ -n "$2" ] && [[ "$2" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + CMAKE_VER=$2 + shift 2 +else + CMAKE_VER=$DEFAULT_CMAKE_VER + shift 1 +fi BUILD_SUFFIX=lc_toss4-clang-${COMP_VER} echo echo "Creating build directory build_${BUILD_SUFFIX} and generating configuration in it" +echo "Using CMake version: ${CMAKE_VER}" echo "Configuration extra arguments:" echo " $@" echo @@ -33,7 +45,7 @@ echo rm -rf build_${BUILD_SUFFIX} 2>/dev/null mkdir build_${BUILD_SUFFIX} && cd build_${BUILD_SUFFIX} -module load cmake/3.23.1 +module load cmake/${CMAKE_VER} cmake \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/scripts/lc-builds/toss4_clang.sh b/scripts/lc-builds/toss4_clang.sh index d16fbe8633..f01a8f6f1a 100755 --- a/scripts/lc-builds/toss4_clang.sh +++ b/scripts/lc-builds/toss4_clang.sh @@ -9,20 +9,35 @@ # SPDX-License-Identifier: (BSD-3-Clause) ############################################################################### +# Default CMake version if not provided +DEFAULT_CMAKE_VER=3.25.2 + if [ "$1" == "" ]; then echo - echo "You must pass a compiler version number to script. For example," - echo " toss4_clang.sh 10.3.1" - exit + echo "You must pass a compiler version number to the script. For example," + echo " toss4_clang.sh 14.0.6 [3.27.4]" + echo "An optional second argument can be given to set the CMake version to load." + echo "If no CMake version is provided, version ${DEFAULT_CMAKE_VER} will be used." + exit 1 fi COMP_VER=$1 -shift 1 + +# Detect optional second positional argument as a CMake version if it looks like N.M or N.M.P +# Otherwise, treat it as a normal CMake argument. +if [ -n "$2" ] && [[ "$2" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + CMAKE_VER=$2 + shift 2 +else + CMAKE_VER=$DEFAULT_CMAKE_VER + shift 1 +fi BUILD_SUFFIX=lc_toss4-clang-${COMP_VER} echo echo "Creating build directory build_${BUILD_SUFFIX} and generating configuration in it" +echo "Using CMake version: ${CMAKE_VER}" echo "Configuration extra arguments:" echo " $@" echo @@ -30,7 +45,7 @@ echo rm -rf build_${BUILD_SUFFIX} 2>/dev/null mkdir build_${BUILD_SUFFIX} && cd build_${BUILD_SUFFIX} -module load cmake/3.23.1 +module load cmake/${CMAKE_VER} cmake \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/scripts/lc-builds/toss4_clang_san.sh b/scripts/lc-builds/toss4_clang_san.sh index be4404437f..05794e9d92 100755 --- a/scripts/lc-builds/toss4_clang_san.sh +++ b/scripts/lc-builds/toss4_clang_san.sh @@ -9,20 +9,34 @@ # SPDX-License-Identifier: (BSD-3-Clause) ############################################################################### -if [ "$1" == "" ]; then +# Default CMake version if not provided +DEFAULT_CMAKE_VER=3.25.2 + +if [[ $# -lt 2 ]]; then echo - echo "You must pass 2 arguments to the script (in this order): " - echo " 1) compiler version number for clang" - echo " 2) sanitizer version (one of 2 options: asan, or ubsan)" + echo "You must pass 2 or more arguments to the script (in the following order): " + echo " 1) compiler version number" + echo " 2) HIP compute architecture" + echo " 3) optional CMake version to load." echo echo "For example: " - echo " toss4_clang.sh 14.0.6-magic asan" - exit + echo " toss4_clang.sh 14.0.6-magic asan [3.27.4]" + echo "If no CMake version is provided, version ${DEFAULT_CMAKE_VER} will be used." + exit 1 fi COMP_VER=$1 SAN_VER=$2 -shift 2 + +# Detect optional third positional argument as a CMake version if it looks like N.M or N.M.P +# Otherwise, treat it as a normal CMake argument. +if [ -n "$3" ] && [[ "$3" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + CMAKE_VER=$3 + shift 3 +else + CMAKE_VER=$DEFAULT_CMAKE_VER + shift 2 +fi if [[ ( ${SAN_VER} != "asan" ) && ( ${SAN_VER} != "ubsan" ) ]] ; then echo "Sanitizer version must be \"asan\" or \"ubsan\". Exiting!" ; exit @@ -32,6 +46,7 @@ BUILD_SUFFIX=lc_toss4-clang-${COMP_VER}-${SAN_VER} echo echo "Creating build directory build_${BUILD_SUFFIX} and generating configuration in it" +echo "Using CMake version: ${CMAKE_VER}" echo "Configuration extra arguments:" echo " $@" echo @@ -39,7 +54,7 @@ echo rm -rf build_${BUILD_SUFFIX} 2>/dev/null mkdir build_${BUILD_SUFFIX} && cd build_${BUILD_SUFFIX} -module load cmake/3.23.1 +module load cmake/${CMAKE_VER} cmake \ -DCMAKE_BUILD_TYPE=Debug \ diff --git a/scripts/lc-builds/toss4_gcc.sh b/scripts/lc-builds/toss4_gcc.sh index 35040a859d..c8328d8828 100755 --- a/scripts/lc-builds/toss4_gcc.sh +++ b/scripts/lc-builds/toss4_gcc.sh @@ -9,20 +9,35 @@ # SPDX-License-Identifier: (BSD-3-Clause) ############################################################################### +# Default CMake version if not provided +DEFAULT_CMAKE_VER=3.25.2 + if [ "$1" == "" ]; then echo - echo "You must pass a compiler version number to script. For example," - echo " toss4_gcc.sh 10.3.1" - exit + echo "You must pass a compiler version number to the script. For example," + echo " toss4_gcc.sh 10.3.1 [3.27.4]" + echo "An optional second argument can be given to set the CMake version to load." + echo "If no CMake version is provided, version ${DEFAULT_CMAKE_VER} will be used." + exit 1 fi COMP_VER=$1 -shift 1 + +# Detect optional second positional argument as a CMake version if it looks like N.M or N.M.P +# Otherwise, treat it as a normal CMake argument. +if [ -n "$2" ] && [[ "$2" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + CMAKE_VER=$2 + shift 2 +else + CMAKE_VER=$DEFAULT_CMAKE_VER + shift 1 +fi BUILD_SUFFIX=lc_toss4-gcc-${COMP_VER} echo echo "Creating build directory build_${BUILD_SUFFIX} and generating configuration in it" +echo "Using CMake version: ${CMAKE_VER}" echo "Configuration extra arguments:" echo " $@" echo @@ -30,7 +45,7 @@ echo rm -rf build_${BUILD_SUFFIX} 2>/dev/null mkdir build_${BUILD_SUFFIX} && cd build_${BUILD_SUFFIX} -module load cmake/3.23.1 +module load cmake/${CMAKE_VER} cmake \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/scripts/lc-builds/toss4_hipcc.sh b/scripts/lc-builds/toss4_hipcc.sh index 06b1e1f9a4..c35cd2c3e2 100755 --- a/scripts/lc-builds/toss4_hipcc.sh +++ b/scripts/lc-builds/toss4_hipcc.sh @@ -9,21 +9,34 @@ # SPDX-License-Identifier: (BSD-3-Clause) ############################################################################### +# Default CMake version if not provided +DEFAULT_CMAKE_VER=3.25.2 + if [[ $# -lt 2 ]]; then echo echo "You must pass 2 or more arguments to the script (in this order): " echo " 1) compiler version number" echo " 2) HIP compute architecture" - echo " 3...) optional arguments to cmake" + echo " 3) optional CMake version to load." echo echo "For example: " - echo " toss4_hipcc.sh 4.1.0 gfx906" - exit + echo " toss4_hipcc.sh 4.1.0 gfx906 [3.27.4]" + echo "If no CMake version is provided, version ${DEFAULT_CMAKE_VER} will be used." + exit 1 fi COMP_VER=$1 COMP_ARCH=$2 -shift 2 + +# Detect optional third positional argument as a CMake version if it looks like N.M or N.M.P +# Otherwise, treat it as a normal CMake argument. +if [ -n "$3" ] && [[ "$3" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + CMAKE_VER=$3 + shift 3 +else + CMAKE_VER=$DEFAULT_CMAKE_VER + shift 2 +fi HOSTCONFIG="hip_3_X" @@ -42,6 +55,7 @@ BUILD_SUFFIX=lc_toss4-hipcc-${COMP_VER}-${COMP_ARCH} echo echo "Creating build directory build_${BUILD_SUFFIX} and generating configuration in it" +echo "Using CMake version: ${CMAKE_VER}" echo "Configuration extra arguments:" echo " $@" echo @@ -53,7 +67,7 @@ rm -rf build_${BUILD_SUFFIX} >/dev/null mkdir build_${BUILD_SUFFIX} && cd build_${BUILD_SUFFIX} -module load cmake/3.23.1 +module load cmake/${CMAKE_VER} # unload rocm to avoid configuration problems where the loaded rocm and COMP_VER # are inconsistent causing the rocprim from the module to be used unexpectedly diff --git a/scripts/lc-builds/toss4_icpc-classic.sh b/scripts/lc-builds/toss4_icpc-classic.sh deleted file mode 100755 index 46bafe74d2..0000000000 --- a/scripts/lc-builds/toss4_icpc-classic.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env bash - -############################################################################### -# Copyright (c) Lawrence Livermore National Security, LLC and other -# RAJA Project Developers. See top-level LICENSE and COPYRIGHT -# files for dates and other details. No copyright assignment is required -# to contribute to RAJA. -# -# SPDX-License-Identifier: (BSD-3-Clause) -############################################################################### - -if [ "$1" == "" ]; then - echo - echo "You must pass a compiler version number to script. For example," - echo " toss4_icpc-classic.sh 19.1.2" - exit -fi - -COMP_VER=$1 -shift 1 - -BUILD_SUFFIX=lc_toss4-icpc-classic-${COMP_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} 2>/dev/null -mkdir build_${BUILD_SUFFIX} && cd build_${BUILD_SUFFIX} - -module load cmake/3.23.1 - -## -# CMake option -DRAJA_ENABLE_FORCEINLINE_RECURSIVE=Off used to speed up compile -# times at a potential cost of slower 'forall' execution. -## - -cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_COMPILER=/usr/tce/packages/intel-classic/intel-classic-${COMP_VER}/bin/icpc \ - -DCMAKE_C_COMPILER=/usr/tce/packages/intel-classic/intel-classic-${COMP_VER}/bin/icc \ - -DENABLE_CLANGFORMAT=On \ - -DCLANGFORMAT_EXECUTABLE=/usr/tce/packages/clang/clang-14.0.6/bin/clang-format \ - -DBLT_CXX_STD=c++17 \ - -C ../host-configs/lc-builds/toss4/icpc-classic_X.cmake \ - -DRAJA_ENABLE_FORCEINLINE_RECURSIVE=Off \ - -DENABLE_OPENMP=On \ - -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 may need to add some intel openmp libraries to your" -echo " LD_LIBRARY_PATH to run with openmp." -echo -echo " LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/tce/packages/intel-classic/intel-classic-${COMP_VER}/compiler/lib/intel64_lin" -echo -echo "***********************************************************************" diff --git a/scripts/lc-builds/toss4_icpc.sh b/scripts/lc-builds/toss4_icpc.sh deleted file mode 100755 index 10637c3ac7..0000000000 --- a/scripts/lc-builds/toss4_icpc.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env bash - -############################################################################### -# Copyright (c) Lawrence Livermore National Security, LLC and other -# RAJA Project Developers. See top-level LICENSE and COPYRIGHT -# files for dates and other details. No copyright assignment is required -# to contribute to RAJA. -# -# SPDX-License-Identifier: (BSD-3-Clause) -############################################################################### - -if [ "$1" == "" ]; then - echo - echo "You must pass a compiler version number to script. For example," - echo " toss4_icpc.sh 2022.3" - exit -fi - -COMP_VER=$1 -shift 1 - -BUILD_SUFFIX=lc_toss4-icpc-${COMP_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} 2>/dev/null -mkdir build_${BUILD_SUFFIX} && cd build_${BUILD_SUFFIX} - -module load cmake/3.23.1 - -## -# CMake option -DRAJA_ENABLE_FORCEINLINE_RECURSIVE=Off used to speed up compile -# times at a potential cost of slower 'forall' execution. -## - -cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_COMPILER=/usr/tce/packages/intel/intel-${COMP_VER}/bin/icpc \ - -DCMAKE_C_COMPILER=/usr/tce/packages/intel/intel-${COMP_VER}/bin/icc \ - -DENABLE_CLANGFORMAT=On \ - -DCLANGFORMAT_EXECUTABLE=/usr/tce/packages/clang/clang-14.0.6/bin/clang-format \ - -DBLT_CXX_STD=c++17 \ - -C ../host-configs/lc-builds/toss4/icpc_X.cmake \ - -DRAJA_ENABLE_FORCEINLINE_RECURSIVE=Off \ - -DENABLE_OPENMP=On \ - -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 may need to add some intel openmp libraries to your" -echo " LD_LIBRARY_PATH to run with openmp." -echo -echo " LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/tce/packages/intel/intel-${COMP_VER}/compiler/lib/intel64_lin" -echo -echo "***********************************************************************" diff --git a/scripts/lc-builds/toss4_icpx.sh b/scripts/lc-builds/toss4_icpx.sh index 6ed942f609..19430a086c 100755 --- a/scripts/lc-builds/toss4_icpx.sh +++ b/scripts/lc-builds/toss4_icpx.sh @@ -9,20 +9,35 @@ # SPDX-License-Identifier: (BSD-3-Clause) ############################################################################### +# Default CMake version if not provided +DEFAULT_CMAKE_VER=3.25.2 + if [ "$1" == "" ]; then echo echo "You must pass a compiler version number to script. For example," - echo " toss4_icpx.sh 2022.1.0" - exit + echo " toss4_icpx.sh 2022.1.0 [3.27.4]" + echo "An optional second argument can be given to set the CMake version to load." + echo "If no CMake version is provided, version ${DEFAULT_CMAKE_VER} will be used." + exit 1 fi COMP_VER=$1 -shift 1 + +# Detect optional second positional argument as a CMake version if it looks like N.M or N.M.P +# Otherwise, treat it as a normal CMake argument. +if [ -n "$2" ] && [[ "$2" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + CMAKE_VER=$2 + shift 2 +else + CMAKE_VER=$DEFAULT_CMAKE_VER + shift 1 +fi BUILD_SUFFIX=lc_toss4-icpx-${COMP_VER} echo echo "Creating build directory build_${BUILD_SUFFIX} and generating configuration in it" +echo "Using CMake version: ${CMAKE_VER}" echo "Configuration extra arguments:" echo " $@" echo @@ -30,7 +45,7 @@ echo rm -rf build_${BUILD_SUFFIX} 2>/dev/null mkdir build_${BUILD_SUFFIX} && cd build_${BUILD_SUFFIX} -module load cmake/3.23.1 +module load cmake/${CMAKE_VER} ## # CMake option -DRAJA_ENABLE_FORCEINLINE_RECURSIVE=Off used to speed up compile diff --git a/scripts/lc-builds/toss4_nvcc_clang.sh b/scripts/lc-builds/toss4_nvcc_clang.sh index 0b442b5d83..5607867b47 100755 --- a/scripts/lc-builds/toss4_nvcc_clang.sh +++ b/scripts/lc-builds/toss4_nvcc_clang.sh @@ -9,30 +9,46 @@ # SPDX-License-Identifier: (BSD-3-Clause) ############################################################################### +# Default CMake version if not provided +DEFAULT_CMAKE_VER=3.25.2 + if [[ $# -lt 3 ]]; then echo - echo "You must pass 3 arguments to the script (in this order): " + echo "You must pass 3 or more arguments to the script (in this order): " echo " 1) compiler version number for nvcc" echo " 2) CUDA compute architecture (number only, e.g., '90' not 'sm_90')" echo " 3) compiler version number for clang" + echo " 4) optional CMake version to load." echo echo "For example: " - echo " toss4_nvcc_clang.sh 12.6.0 90 14.0.6" + echo " toss4_nvcc_clang.sh 12.6.0 90 14.0.6 [3.27.4]" echo echo " toss4_nvcc_clang.sh 12.9.1 90 19.1.3-magic" echo " (note: a compilation issue with one RAJA benchmark code)" - exit + echo + echo "If no CMake version is provided, version ${DEFAULT_CMAKE_VER} will be used." + exit 1 fi COMP_NVCC_VER=$1 COMP_ARCH=$2 COMP_CLANG_VER=$3 -shift 3 + +# Detect optional fourth positional argument as a CMake version if it looks like N.M or N.M.P +# Otherwise, treat it as a normal CMake argument. +if [ -n "$4" ] && [[ "$4" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + CMAKE_VER=$4 + shift 4 +else + CMAKE_VER=$DEFAULT_CMAKE_VER + shift 3 +fi BUILD_SUFFIX=lc_toss4-nvcc${COMP_NVCC_VER}-${COMP_ARCH}-clang${COMP_CLANG_VER} echo echo "Creating build directory build_${BUILD_SUFFIX} and generating configuration in it" +echo "Using CMake version: ${CMAKE_VER}" echo "Configuration extra arguments:" echo " $@" echo @@ -40,7 +56,7 @@ echo rm -rf build_${BUILD_SUFFIX} >/dev/null mkdir build_${BUILD_SUFFIX} && cd build_${BUILD_SUFFIX} -module load cmake/3.25.2 +module load cmake/${CMAKE_VER} cmake \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/scripts/lc-builds/toss4_nvcc_gcc.sh b/scripts/lc-builds/toss4_nvcc_gcc.sh index bb6122d503..2e3a15c9c1 100755 --- a/scripts/lc-builds/toss4_nvcc_gcc.sh +++ b/scripts/lc-builds/toss4_nvcc_gcc.sh @@ -9,30 +9,46 @@ # SPDX-License-Identifier: (BSD-3-Clause) ############################################################################### +# Default CMake version if not provided +DEFAULT_CMAKE_VER=3.25.2 + if [[ $# -lt 3 ]]; then echo - echo "You must pass 3 arguments to the script (in this order): " + echo "You must pass 3 or more arguments to the script (in this order): " echo " 1) compiler version number for nvcc" echo " 2) CUDA compute architecture (number only, e.g., '90' not 'sm_90')" echo " 3) compiler version number for gcc" + echo " 4) optional CMake version to load." echo echo "For example: " - echo " toss4_nvcc_gcc.sh 12.6.0 90 13.3.1-magic" + echo " toss4_nvcc_gcc.sh 12.6.0 90 13.3.1-magic [3.27.4]" echo echo " toss4_nvcc_gcc.sh 12.9.1 90 13.3.1-magic" echo " (note: a compilation issue with one RAJA benchmark code)" - exit + echo + echo "If no CMake version is provided, version ${DEFAULT_CMAKE_VER} will be used." + exit 1 fi COMP_NVCC_VER=$1 COMP_ARCH=$2 COMP_GCC_VER=$3 -shift 3 + +# Detect optional fourth positional argument as a CMake version if it looks like N.M or N.M.P +# Otherwise, treat it as a normal CMake argument. +if [ -n "$4" ] && [[ "$4" =~ ^[0-9]+(\.[0-9]+)*$ ]]; then + CMAKE_VER=$4 + shift 4 +else + CMAKE_VER=$DEFAULT_CMAKE_VER + shift 3 +fi BUILD_SUFFIX=lc_toss4-nvcc${COMP_NVCC_VER}-${COMP_ARCH}-gcc${COMP_GCC_VER} echo echo "Creating build directory build_${BUILD_SUFFIX} and generating configuration in it" +echo "Using CMake version: ${CMAKE_VER}" echo "Configuration extra arguments:" echo " $@" echo @@ -40,7 +56,7 @@ echo rm -rf build_${BUILD_SUFFIX} >/dev/null mkdir build_${BUILD_SUFFIX} && cd build_${BUILD_SUFFIX} -module load cmake/3.25.2 +module load cmake/${CMAKE_VER} cmake \ -DCMAKE_BUILD_TYPE=Release \