Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions util/compilers/intel_oneapi-2026.0.0_install.sh
Original file line number Diff line number Diff line change
@@ -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.
Comment on lines +3 to +5

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't used the "intel-oneapi-toolkit" installer before; what is included with this installer? Just oneAPI c/c++/fortran/mkl or does it include other things like oneapi-mpi and tbb ? In any case documenting the targets up here would be helpful just so its clear what is included by this script.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't used the "intel-oneapi-toolkit" installer before; what is included with this installer? Just oneAPI c/c++/fortran/mkl or does it include other things like oneapi-mpi and tbb ? In any case documenting the targets up here would be helpful just so its clear what is included by this script.

Intel oneAPI Toolkit

Compilers, MPI, MKL, TBB.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional, mandatory dependencies nowadays are umf and a few others.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It includes a lot. From my look at 2026.1 I see:

ID                                  Version       Installed Name
============================================================================================================
intel.oneapi.lin.dpcpp_dbg          2026.1.0+70   true      Intel® Distribution for GDB*
intel.oneapi.lin.dpl                2022.13.0+107 true      Intel® oneAPI DPC++ Library
intel.oneapi.lin.tbb.devel          2023.1.0+151  true      Intel® oneAPI Threading Building Blocks
intel.oneapi.lin.ccl.devel          2022.1.0+142  false     Intel® oneAPI Collective Communications Library
intel.oneapi.lin.dpcpp-cpp-compiler 2026.1.0+235  true      Intel® oneAPI DPC++/C++ Compiler
 └─intel.oneapi.lin.dpl             2022.13.0+107 true       └─Intel® oneAPI DPC++ Library
intel.oneapi.lin.ifort-compiler     2026.1.0+235  true      Intel® Fortran Compiler
intel.oneapi.lin.ipp.devel          2026.0.1+51   true      Intel® Integrated Performance Primitives
intel.oneapi.lin.ippcp.devel        2026.0.1+9    false     Intel® Cryptography Primitives Library
intel.oneapi.lin.mkl.devel          2026.1.0+236  true      Intel® oneAPI Math Kernel Library
intel.oneapi.lin.vtune              2026.2.0+178  false     Intel® VTune(TM) Profiler
intel.oneapi.lin.dnnl               2026.0.1+55   false     Intel® oneAPI Deep Neural Network Library
 └─intel.oneapi.lin.tbb.devel       2023.1.0+151  true       └─Intel® oneAPI Threading Building Blocks
intel.oneapi.lin.mpi.devel          2021.18.0+745 true      Intel® MPI Library

Normally when I install locally, I do:

  • Intel oneAPI DPC++/C++ Compiler
  • Intel Fortran Compiler
  • Intel Distribution for GDB
  • Intel oneAPI Math Kernel Library
  • Intel Integrated Performance Primitives
  • Intel MPI Library
  • Intel oneAPI DPC++ Library
  • Intel oneAPI Threading Building Blocks

Which means I exclude:

— Intel oneAPI Collective Communications Library
— Intel Cryptography Primitives Library
— Intel VTune Profiler
— Intel oneAPI Deep Neural Network Library

Some I suppose VTune might be nice to have but it is also pretty bulky. No one (yet) has asked for the other ones so I just ignore them.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I don't really care about these. For one, if we install the compiler one time with this install script instead of every time a new environment is built with Spack that builds its own compilers, we are still saving a lot of disk space. Second, if someone comes around who is using spack-stack and then wants to use those dependencies for their work, I have to go back in. As I said, these are pragmatic scripts that are supposed to cover our needs with the minimum effort.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eap These scripts are really only for us and for convenience. I would expect us to go and look at the Intel oneAPI toolkit website/documentation to see what's included - this changes with releases (they went through several iterations over the last years; some releases had separate base + hpc toolkits, now it is only one).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe adding a link to the official website/documentation will do ... but running a google search is just as fast.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe adding a link to the official website/documentation will do

That works for me; I just wasn't familiar with that; I've defaulted to using their apt install sources.


# Missing: patching of libirc.so and libimf.so to add the missing symbolic
# links to libc.so.6 and libm.so.6.
Comment on lines +7 to +8

@rickgrubin-noaa rickgrubin-noaa Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For those interested:

Depending on the location of libm.so .6 and libc.so.6, should be:

patchelf --add-needed /path/to/libm.so.6 ${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}/lib/libimf.so

and

patchelf --add-needed /path/to/libc.so.6 ${ONEAPI_INSTALL_DIR}/compiler/${COMPILER_VERSION}/lib/libirc.so

and you'll need to install patchelf first.


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
Comment thread
eap marked this conversation as resolved.
HOSTNAME=$(hostname)
if [[ "${HOSTNAME}" == *"blueback"* || "${HOSTNAME}" == *"narwhal"* ]]; then

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If your system is a cray, then add the hostname here.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See below. I just needed to add something here ...

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rename it to "was produced with the spack-stack Intel oneAPI installer wrapper"


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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll also add: I have successfully stacked multiple versions of the oneAPI toolkit into the same install directory.

If an existing modulefiles directory exists (e.g. you installed 2026.0.0 and are now installing 2026.1.0) into the same root install directory, modulefiles-setup.sh will ask to overwrite the modulefiles directory. If running interactively, you can answer 'y' or add the --force argument to the invocation of modulefiles-setup.sh. Any overwritten modulef iles are re-created.

# 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
99 changes: 99 additions & 0 deletions util/compilers/intel_oneapi-2026.1.0_install.sh
Original file line number Diff line number Diff line change
@@ -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
30 changes: 30 additions & 0 deletions util/compilers/nvhpc-26.5_install.sh
Original file line number Diff line number Diff line change
@@ -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