How to use intel mkl in cmake-gui under Windows?

Dear all,

Note of OS information first:
ogs source code version: 6.4.1, from ogs / ogs · GitLab (by zip),
Operating system / hardware information: Windows 11 (I am not using WSL2, just Windows 11),Intel Core i7-1185G7 3.00GHz, 16 GB RAM),
CMake version: 3.22.2
Intel MKL version: w_BaseKit_p_2022.1.2.154_offline.exe

I am a newbie for OGS. I would like to compile OGS6 to enable PardisoLU for the liner solver (with Eigen library) to improve computing speed for a THM model.

  • (1) First, I followed these two guides (Build configuration and Build) to configure and build ogs.exe very smoothly and successfully. And this ogs.exe works well for my prj file (still use SparseLU without mkl at this point).
  • (2) Then, I installed intel MKL (only) from Intel oneAPI Base Toolkit. When I tried a new configuration (in a new directory) in step (1), I found there was no OGS_USE_MKL option to turn on Intel MKL. So, my question is how can I make OGS_USE_MKL shown in CMake-gui to turn on? Whether I need set some environment variables for Intel mkl in PATH under Windows OS? Which directory or folder should I add to PATH?

When I pressed “configure” third time, OGS_USE_MKL show. But when I gave the mkl directory (…/mkl/2022.0.2), it seemed not to load correct MKL_DIR and other MKL variables. I’ll try it tomorrow or later and be back here to give a right step.

Finally, it works. I give the solution here:

MKL_DIR (folder): ...\mkl\2022.0.2
MKL_INCLUDE_DIR (folder): ...\mkl\2022.0.2\include
MKL_LIB_CORE (file): ...\mkl\2022.0.2\lib\intel64\mkl_core.lib
MKL_LIB_INTEL (file): ...\mkl\2022.0.2\lib\intel64\mkl_intel_lp64.lib
MKL_LIB_THREAD (file): ...\mkl\2022.0.2\lib\intel64\mkl_sequential.lib

... means your installation directory of Intel mkl.