Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7069 Discussions

"CMake Config for oneMKL example" adapted for Fortran has "include" issues

Peter0000
New Contributor I
1,573 Views
I have adapted cmakelist.txt example below 

https://www.intel.com/content/www/us/en/develop/documentation/onemkl-windows-developer-guide/top/get..

 

for Fortran (attached), and VS2022 cannot fine F95_PRECISION etc etc

 

I assume $(ConfigurationName) is not wrong n the INCLUDE

C:\Program Files (x86)\Intel\oneAPI\mkl\latest\include/$(ConfigurationName)  

 

 

 

0 Kudos
1 Solution
Peter0000
New Contributor I
1,503 Views

The solution was simple, adding

 

option(ENABLE_BLAS95 "Enables BLAS Fortran95 API" ON)
option(ENABLE_LAPACK95 "Enables LAPACK Fortran95 API" ON)

 

to cmakelist.txt.

 

For the future, the attached adds other MKL options, no set to OFF.

View solution in original post

0 Kudos
5 Replies
Peter0000
New Contributor I
1,551 Views

I am also trying to get clues from

C:\Program Files (x86)\Intel\oneAPI\mkl\2022.1.0\examples\examples_f95\f95  but it cannot find

generate_examples_list,  setup_examples

0 Kudos
VidyalathaB_Intel
Moderator
1,528 Views

Hi Peter,

 

Thanks for reaching out to us.

>>but it cannot find generate_examples_list, setup_examples

Above 2 files generate_examples_list and setup_examples are located under the following path

C:\Program Files (x86)\Intel\oneAPI\mkl\2022.1.0\examples\cmake

 

>>cannot fine F95_PRECISION..

Maybe you can refer to the sample CMakeLists.txt given under

C:\Program Files (x86)\Intel\oneAPI\mkl\2022.1.0\examples\examples_f95\f95

.

And if you are attempting to run the examples present in the f95 folder please make sure that the generate_examples_list and setup_examples files in cmake directory are present as mentioned in the CMakeLists.txt (like maybe you can try copying the cmake directory to the path where f95 present i.e. f95 and cmake should present in same location) otherwise you might get errors as shown below

"CMake Error at CMakeLists.txt:23 (include):

 include could not find requested file:

 

  generate_examples_list

 

 

CMake Error at CMakeLists.txt:36 (include):

 include could not find requested file:

 

  setup_examples"

 

Please give it a try and do let me know if there are any issues in doing so.

 

Regards,

Vidya.

 

0 Kudos
Peter0000
New Contributor I
1,514 Views

Thanks.

 

Both my F95 and my smaller example seem to have a problem with with the the Additional Include Directories

 

C:\Program Files (x86)\Intel\oneAPI\mkl\latest\include
C:\Program Files (x86)\Intel\oneAPI\mkl\latest\include/$(ConfigurationName)

 

which is is patched by adding

 

C:\Program Files (x86)\Intel\oneAPI\mkl\2022.1.0\include\intel64\ilp64

 

 

0 Kudos
Peter0000
New Contributor I
1,504 Views

The solution was simple, adding

 

option(ENABLE_BLAS95 "Enables BLAS Fortran95 API" ON)
option(ENABLE_LAPACK95 "Enables LAPACK Fortran95 API" ON)

 

to cmakelist.txt.

 

For the future, the attached adds other MKL options, no set to OFF.

0 Kudos
VidyalathaB_Intel
Moderator
1,493 Views

Hi Peter,


>>The solution was simple, adding..

Glad to know that your issue is resolved and thanks for letting us know.

Please post a new question if you need any additional assistance from Intel as this thread will no longer be monitored.


Regards,

Vidya.


0 Kudos
Reply