From 927731d9cce0c9150179f3b0d990faf736ccdfb1 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 21 Aug 2026 09:23:38 -0600 Subject: [PATCH] [skip ci] Add compiler install scripts in util/compilers --- .../intel_oneapi-2026.0.0_install.sh | 99 +++++++++++++++++++ .../intel_oneapi-2026.1.0_install.sh | 99 +++++++++++++++++++ util/compilers/nvhpc-26.5_install.sh | 30 ++++++ 3 files changed, 228 insertions(+) create mode 100755 util/compilers/intel_oneapi-2026.0.0_install.sh create mode 100755 util/compilers/intel_oneapi-2026.1.0_install.sh create mode 100755 util/compilers/nvhpc-26.5_install.sh diff --git a/util/compilers/intel_oneapi-2026.0.0_install.sh b/util/compilers/intel_oneapi-2026.0.0_install.sh new file mode 100755 index 000000000..bbdc8b88f --- /dev/null +++ b/util/compilers/intel_oneapi-2026.0.0_install.sh @@ -0,0 +1,99 @@ +#!/usr/bin/env bash + +# Utility script to install Intel oneAPI 2026.0.0, fix non-ascii characters +# in the Intel auto-generated modulefiles (bug filed with Intel to correct +# upstream) on non-Cray systems, or to create a single module on Cray systems. + +# Missing: patching of libirc.so and libimf.so to add the missing symbolic +# links to libc.so.6 and libm.so.6. + +set -eu + +umask 0022 +module purge + +if [ "$#" -lt 1 ]; then + echo "Error: Not enough arguments. Provide Intel oneAPI installation prefix." + exit 1 +fi + +ONEAPI_INSTALL_DIR=${1} +ONEAPI_VERSION="2026.0.0" +COMPILER_VERSION="2026.0" +MKL_VERSION="2026.0" +ONEAPI_DOWNLOAD_URL=https://registrationcenter-download.intel.com/akdlm/IRC_NAS/71180075-e4e3-4c6f-bbbb-19017ed0cf7d/intel-oneapi-toolkit-2026.0.0.198_offline.sh + +mkdir -p ${ONEAPI_INSTALL_DIR}/src +cd ${ONEAPI_INSTALL_DIR}/src +wget ${ONEAPI_DOWNLOAD_URL} +ONEAPI_INSTALL_SCRIPT="${ONEAPI_DOWNLOAD_URL##*/}" +sh ./${ONEAPI_INSTALL_SCRIPT} -a --silent --eula accept --install-dir ${ONEAPI_INSTALL_DIR} --intel-sw-improvement-program-consent decline 2>&1 | tee log.install + +# Check that compiler and mkl versions are correct +if [ ! -d "${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}" ]; then + echo "Error, directory ${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION} does not exist" + exit 1 +fi +if [ ! -d "${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION}" ]; then + echo "Error, directory ${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION} does not exist" + exit 1 +fi + +# Create modulefiles - special modules for Cray, Intel auto-generated modules elsewhere +HOSTNAME=$(hostname) +if [[ "${HOSTNAME}" == *"blueback"* || "${HOSTNAME}" == *"narwhal"* ]]; then + mkdir -p ${ONEAPI_INSTALL_DIR}/modulefiles/intel-oneapi + cat << EOF > ${ONEAPI_INSTALL_DIR}/modulefiles/intel-oneapi/${ONEAPI_VERSION} +#%Module +# +# Intel oneAPI module +# + +conflict intel +conflict intel-classic +conflict intel-oneapi + +set INTEL_CURPATH ${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION} +set INTEL_LEVEL ${COMPILER_VERSION} + +setenv INTEL_PATH \$INTEL_CURPATH +setenv INTEL_VERSION \$INTEL_LEVEL +setenv INTEL_COMPILER_TYPE "ONEAPI" + +prepend-path {LD_LIBRARY_PATH} {${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}/opt/compiler/lib:${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}/lib} +setenv {OCL_ICD_FILENAMES} {${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}/lib/libintelocl.so} +setenv {CMPLR_ROOT} {${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}} +prepend-path {CMAKE_PREFIX_PATH} {${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}} +prepend-path {NLSPATH} {} +prepend-path {LIBRARY_PATH} {${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}/lib} +prepend-path {DIAGUTIL_PATH} {} +prepend-path {MANPATH} {${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}/share/man} +prepend-path {PATH} {${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}/bin} +prepend-path {PKG_CONFIG_PATH} {${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}/lib/pkgconfig} +prepend-path {LD_LIBRARY_PATH} {${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION}/lib} +prepend-path {CMAKE_PREFIX_PATH} {${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION}/lib/cmake} +prepend-path {CPATH} {${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION}/include} +prepend-path {LIBRARY_PATH} {${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION}/lib} +setenv {MKLROOT} {${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION}} +prepend-path {PATH} {${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION}/bin} +prepend-path {PKG_CONFIG_PATH} {${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION}/lib/pkgconfig} + +proc ModulesHelp { } { + global INTEL_LEVEL + global INTEL_CURPATH +} + +# This module was produced with dom-gen 0.0.1 + +module-whatis "Intel oneAPI compiler" +EOF + +else + cd ${ONEAPI_INSTALL_DIR} + ./modulefiles-setup.sh --output-dir=${ONEAPI_INSTALL_DIR}/modulefiles --ignore-latest 2>&1 | tee log.modulefiles + # Fix non-ascii symbols in Intel modulefiles; must follow links + for file in `find ./modulefiles -type l`; do + echo $file + sed -i --follow-symlinks 's/®//g' $file + done +fi diff --git a/util/compilers/intel_oneapi-2026.1.0_install.sh b/util/compilers/intel_oneapi-2026.1.0_install.sh new file mode 100755 index 000000000..6a5cd124e --- /dev/null +++ b/util/compilers/intel_oneapi-2026.1.0_install.sh @@ -0,0 +1,99 @@ +#!/usr/bin/env bash + +# Utility script to install Intel oneAPI 2026.1.0, fix non-ascii characters +# in the Intel auto-generated modulefiles (bug filed with Intel to correct +# upstream) on non-Cray systems, or to create a single module on Cray systems. + +# Missing: patching of libirc.so and libimf.so to add the missing symbolic +# links to libc.so.6 and libm.so.6. + +set -eu + +umask 0022 +module purge + +if [ "$#" -lt 1 ]; then + echo "Error: Not enough arguments. Provide Intel oneAPI installation prefix." + exit 1 +fi + +ONEAPI_INSTALL_DIR=${1} +ONEAPI_VERSION="2026.1.0" +COMPILER_VERSION="2026.1" +MKL_VERSION="2026.1" +ONEAPI_DOWNLOAD_URL=https://registrationcenter-download.intel.com/akdlm/IRC_NAS/33cb2a22-ddf1-4aa9-8d68-1f5a118acaf2/intel-oneapi-toolkit-2026.1.0.192_offline.sh + +mkdir -p ${ONEAPI_INSTALL_DIR}/src +cd ${ONEAPI_INSTALL_DIR}/src +wget ${ONEAPI_DOWNLOAD_URL} +ONEAPI_INSTALL_SCRIPT="${ONEAPI_DOWNLOAD_URL##*/}" +sh ./${ONEAPI_INSTALL_SCRIPT} -a --silent --eula accept --install-dir ${ONEAPI_INSTALL_DIR} --intel-sw-improvement-program-consent decline 2>&1 | tee log.install + +# Check that compiler and mkl versions are correct +if [ ! -d "${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}" ]; then + echo "Error, directory ${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION} does not exist" + exit 1 +fi +if [ ! -d "${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION}" ]; then + echo "Error, directory ${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION} does not exist" + exit 1 +fi + +# Create modulefiles - special modules for Cray, Intel auto-generated modules elsewhere +HOSTNAME=$(hostname) +if [[ "${HOSTNAME}" == *"blueback"* || "${HOSTNAME}" == *"narwhal"* ]]; then + mkdir -p ${ONEAPI_INSTALL_DIR}/modulefiles/intel-oneapi + cat << EOF > ${ONEAPI_INSTALL_DIR}/modulefiles/intel-oneapi/${ONEAPI_VERSION} +#%Module +# +# Intel oneAPI module +# + +conflict intel +conflict intel-classic +conflict intel-oneapi + +set INTEL_CURPATH ${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION} +set INTEL_LEVEL ${COMPILER_VERSION} + +setenv INTEL_PATH \$INTEL_CURPATH +setenv INTEL_VERSION \$INTEL_LEVEL +setenv INTEL_COMPILER_TYPE "ONEAPI" + +prepend-path {LD_LIBRARY_PATH} {${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}/opt/compiler/lib:${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}/lib} +setenv {OCL_ICD_FILENAMES} {${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}/lib/libintelocl.so} +setenv {CMPLR_ROOT} {${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}} +prepend-path {CMAKE_PREFIX_PATH} {${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}} +prepend-path {NLSPATH} {} +prepend-path {LIBRARY_PATH} {${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}/lib} +prepend-path {DIAGUTIL_PATH} {} +prepend-path {MANPATH} {${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}/share/man} +prepend-path {PATH} {${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}/bin} +prepend-path {PKG_CONFIG_PATH} {${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}/lib/pkgconfig} +prepend-path {LD_LIBRARY_PATH} {${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION}/lib} +prepend-path {CMAKE_PREFIX_PATH} {${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION}/lib/cmake} +prepend-path {CPATH} {${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION}/include} +prepend-path {LIBRARY_PATH} {${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION}/lib} +setenv {MKLROOT} {${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION}} +prepend-path {PATH} {${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION}/bin} +prepend-path {PKG_CONFIG_PATH} {${ONEAPI_INSTALL_DIR}/mkl/${MKL_VERSION}/lib/pkgconfig} + +proc ModulesHelp { } { + global INTEL_LEVEL + global INTEL_CURPATH +} + +# This module was produced with dom-gen 0.0.1 + +module-whatis "Intel oneAPI compiler" +EOF + +else + cd ${ONEAPI_INSTALL_DIR} + ./modulefiles-setup.sh --output-dir=${ONEAPI_INSTALL_DIR}/modulefiles --ignore-latest 2>&1 | tee log.modulefiles + # Fix non-ascii symbols in Intel modulefiles; must follow links + for file in `find ./modulefiles -type l`; do + echo $file + sed -i --follow-symlinks 's/®//g' $file + done +fi diff --git a/util/compilers/nvhpc-26.5_install.sh b/util/compilers/nvhpc-26.5_install.sh new file mode 100755 index 000000000..fcba5f0d6 --- /dev/null +++ b/util/compilers/nvhpc-26.5_install.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# Note. nvhpc binds to the system gcc at install time. A system update +# that bumps the default gcc means reinstalling the SDK, not just +# rebuilding the software stack and the downstream applications. + +if [ "$#" -lt 1 ]; then + echo "Error: Not enough arguments. Provide NVHPC SDK installation prefix." + exit 1 +fi + +# Configure install via command line arguments +export NVHPC_SILENT=true +export NVHPC_INSTALL_DIR=${1} +export NVHPC_INSTALL_TYPE=single # or "network" for heterogeneous systems; check installer doc for details +export NVHPC_DEFAULT_CUDA=13.2 # optional; sets the default CUDA version + +# Download and install nvhpc +mkdir -p ${NVHPC_INSTALL_DIR}/src +cd ${NVHPC_INSTALL_DIR}/src +wget https://developer.download.nvidia.com/hpc-sdk/26.5/nvhpc_2026_265_Linux_x86_64_cuda_13.2.tar.gz +tar xpzf nvhpc_2026_265_Linux_x86_64_cuda_13.2.tar.gz +nvhpc_2026_265_Linux_x86_64_cuda_13.2/install + +# Bug fix for missing include directory (symbolic link) +cd ${NVHPC_INSTALL_DIR} +ln -s Linux_x86_64/26.5/compilers/include include + +cd ${NVHPC_INSTALL_DIR}/src +rm -fr nvhpc_2026_265_Linux_x86_64_cuda_13.2