Add compiler install scripts in util/compilers - #2099
Conversation
|
|
||
| # Create modulefiles - special modules for Cray, Intel auto-generated modules elsewhere | ||
| HOSTNAME=$(hostname) | ||
| if [[ "${HOSTNAME}" == *"blueback"* || "${HOSTNAME}" == *"narwhal"* ]]; then |
There was a problem hiding this comment.
If your system is a cray, then add the hostname here.
| global INTEL_CURPATH | ||
| } | ||
|
|
||
| # This module was produced with dom-gen 0.0.1 |
There was a problem hiding this comment.
See below. I just needed to add something here ...
There was a problem hiding this comment.
Let's rename it to "was produced with the spack-stack Intel oneAPI installer wrapper"
| # 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Compilers, MPI, MKL, TBB.
There was a problem hiding this comment.
Additional, mandatory dependencies nowadays are umf and a few others.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@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).
There was a problem hiding this comment.
Maybe adding a link to the official website/documentation will do ... but running a google search is just as fast.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
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
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