Skip to content

Instantly share code, notes, and snippets.

@scivision
Last active July 13, 2025 02:35
Show Gist options
  • Save scivision/9efcb4c9efc695190ba98e9457cc44ba to your computer and use it in GitHub Desktop.
Save scivision/9efcb4c9efc695190ba98e9457cc44ba to your computer and use it in GitHub Desktop.
Intel oneAPI 2025.2 new options for MKLconfig.cmake

Intel oneAPI 2025.2 CMake MKLconfig.cmake new options

Intel oneAPI 2025.2 introduces functionality and some new flags and settings that broke projects using MKL Scalapack. If using CMake with MKLconfig.cmake from Intel oneAPI, here is how to keep working with oneMKL including 2025.2.

In the CMakeLists.txt or other CMake script using find_package(MKL CONFIG REQUIRED) do like the following example that uses MKL ScaLAPACK:

set(ENABLE_SCALAPACK true)
set(ENABLE_BLAS true)

set(MKL_INTERFACE "lp64")
# "lp64" is the 32-bit interface, "ilp64" is the 64-bit interface

set(MKL_SYCL_MPI false)
set(MKL_SYCL_LINK false)
# for Intel oneAPI 2025.2, we don't need SYCL

find_package(MKL CONFIG REQUIRED)

Test this out with Intel MKL Scalapack examples

-- MKL_VERSION: 2025.2.0
-- MKL_ROOT: /opt/intel/oneapi/mkl/2025.2
-- MKL_ARCH: intel64
-- MKL_SYCL_LINK: None, set to ` dynamic` by default
-- MKL_LINK: None, set to ` dynamic` by default
-- MKL_SYCL_INTERFACE_FULL: intel_lp64
-- MKL_INTERFACE_FULL: intel_lp64
-- MKL_SYCL_THREADING: sequential
-- MKL_THREADING: sequential
-- MKL_SYCL_MPI: None, set to ` intelmpi` by default
-- MKL_MPI: None, set to ` intelmpi` by default
-- Experimental oneMKL Data Fitting SYCL API does not support LP64 on CPU
-- Found /opt/intel/oneapi/mkl/2025.2/lib/libmkl_scalapack_lp64.so
-- Found /opt/intel/oneapi/mkl/2025.2/lib/libmkl_cdft_core.so
-- Found /opt/intel/oneapi/mkl/2025.2/lib/libmkl_intel_lp64.so
-- Found /opt/intel/oneapi/mkl/2025.2/lib/libmkl_sequential.so
-- Found /opt/intel/oneapi/mkl/2025.2/lib/libmkl_core.so
-- Found /opt/intel/oneapi/mkl/2025.2/lib/libmkl_blacs_intelmpi_lp64.so
CMake Warning at cmake/FindSCALAPACK.cmake:150 (find_package):
Found package configuration file:
/opt/intel/oneapi/mkl/2025.2/lib/cmake/mkl/MKLConfig.cmake
but it set MKL_FOUND to FALSE so package "MKL" is considered to be NOT
FOUND. Reason given by package:
The required variable mkl_sycl_distributed_dft_file has an invalid value
"mkl_sycl_distributed_dft_file-NOTFOUND".
-- MKL_VERSION: 2025.2.0
-- MKL_ROOT: /opt/intel/oneapi/mkl/2025.2
-- MKL_ARCH: intel64
-- MKL_LINK: None, set to ` dynamic` by default
-- MKL_INTERFACE_FULL: intel_lp64
-- MKL_THREADING: sequential
-- MKL_MPI: None, set to ` intelmpi` by default
-- Found /opt/intel/oneapi/mkl/2025.2/lib/libmkl_scalapack_lp64.so
-- Found /opt/intel/oneapi/mkl/2025.2/lib/libmkl_cdft_core.so
-- Found /opt/intel/oneapi/mkl/2025.2/lib/libmkl_intel_lp64.so
-- Found /opt/intel/oneapi/mkl/2025.2/lib/libmkl_sequential.so
-- Found /opt/intel/oneapi/mkl/2025.2/lib/libmkl_core.so
-- Found /opt/intel/oneapi/mkl/2025.2/lib/libmkl_blacs_intelmpi_lp64.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment