Skip to content

Add compiler install scripts in util/compilers - #2099

Open
climbfuji wants to merge 1 commit into
JCSDA:developfrom
climbfuji:feature/comp-inst-scripts
Open

Add compiler install scripts in util/compilers#2099
climbfuji wants to merge 1 commit into
JCSDA:developfrom
climbfuji:feature/comp-inst-scripts

Conversation

@climbfuji

Copy link
Copy Markdown
Collaborator

Description

Add compiler install scripts in util/compilers. These can be - and are - hardcoded to specific versions; they are a pragmatic solution to a repetitive task. We can add install scripts for other compilers or newer versions of existing compilers and remove old ones as needed.

Dependencies

None

Issues addressed

None

Applications affected

None

Systems affected

None

Testing

n/a

Checklist

  • This PR addresses one issue/problem/enhancement or has a very good reason for not doing so.~~
  • These changes have been tested on the affected systems and applications.
  • All dependency PRs/issues have been resolved and this PR can be merged.
  • All necessary updates to the documentation (spack-stack wiki) will be made when this PR is merged

@climbfuji climbfuji self-assigned this Aug 21, 2026

# Create modulefiles - special modules for Cray, Intel auto-generated modules elsewhere
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.

@eap eap left a comment

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.

Some questions.

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"

Comment on lines +3 to +5
# 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.

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.

Comment thread util/compilers/intel_oneapi-2026.0.0_install.sh
Comment on lines +7 to +8
# Missing: patching of libirc.so and libimf.so to add the missing symbolic
# links to libc.so.6 and libm.so.6.

@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.


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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants