Findind MKL with cmake

Findind MKL with cmake


I would like to compile my programs using cmake, but it seems that MKL (newer versions) is not detected by cmake modules (FindBLAS, FindLAPACK, etc.). Does Intel provide support for cmake ? Is there a way to detect MKL with cmake ?



8 帖子 / 0 全新

Since the directories in which MKL is installed have a definite and simple relationship to the directories in which the Intel compiler(s) are installed, if CMake knows where to find the compiler(s) already, it should be easy to inform CMake where to find the MKL files. In particular, using the -mkl switch of the compiler should suffice for projects that use MKL in a simple way.

The issue is that I need to detect only the MKL libraries. It seems to me that older library names are not the same anymore and the symbols inside each library have different names. This makes the update of FindBLAS.cmake and FindLAPACK.cmake scripts rather cumbersome. Some providers, like Digia, provide with their framework their own cmake scripts which makes library detection much easier.

I do not understand of which -mkl switch you are referring to. Is the one provided by Intel compilers ?

I am not familiar with the packages that you mention, and I use Cmake infrequently -- usually when someone provides a script for building their package.

The -mkl and -mkl=<lib> options are used to tell the Intel C and Fortran compilers to link in certain parts of MKL. These options are specific to the Intel compilers.

cmake comes with his own scripts for detecting MKL, the ones I have mentioned above, but they are outdated and new versions of MKL are no longer detected. I was hoping that someone has already addressed this issue, otherwise I need to update these scripts.

we don't support these cmake. you need to edit cmake accordingly the version of mkl you are using by yourself. please pay attention - there are no em64 directories with the latest versions as well as libguide40 libs.

Thank you for your replies. Is there a way to submit a feature request for MKL in order to support library detection with cmake ?

Hi Bogdan,

To submit a feature request for MKL you can use Intel Premier Support.

Note, that it's CMAKE providing support for MKL and not vice versa. So the best course of action is submitting your issue directly to CMAKE bug tracking system.