Conversation
cpaolini
approved these changes
May 16, 2025
Collaborator
cpaolini
left a comment
There was a problem hiding this comment.
Approve CMake support added for Intel® oneAPI Base Toolkit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this? (check all applicable)
Description
Issue:
A user encountered a linker warning during the build:
/usr/bin/ld: warning: libmkl_rt.so.2, needed by libarmadillo.so, not foundThis occurred because Armadillo had been linked against Intel MKL, but the MKL runtime (libmkl_rt.so) was not discoverable by the system at runtime. The issue was only resolved when the user manually sourced the Intel oneAPI environment, allowing the linker to find the required MKL libraries.
Resolution:
The CMakeLists.txt was updated to:
Automatically detect if the Intel oneAPI icpx compiler (CMAKE_CXX_COMPILER_ID == IntelLLVM) is being used.
If detected:
Retrieve MKLROOT from the environment or fallback to a default path.
Set BLAS and LAPACK paths to point to MKL.
Configure Armadillo to link against MKL without requiring user input.
Related Issues & Documents
QA Instructions, Screenshots, Recordings
To test the updated CMake configuration with Intel oneAPI compilers, ensure you have the Intel oneAPI toolkit installed and the environment sourced
. /opt/intel/oneapi/setvars.shThen,
The output file will have the following lines
Added/updated tests?
We encourage you to test all code included with MOLE, including examples.
Yes
No, and this is why: please replace this line with details on why tests
have not been included
I need help with writing tests
Read Contributing Guide and Code of Conduct