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

fatal error: mkl.h: No such file or directory

Maraki
Beginner
1,499 Views

Hello,

I have installed intel One base toolkit on windows and I am trying to compile  a c code in R desktop. I am facing the following issue:

 

 

 

> system("R CMD SHLIB example.c") 
using C compiler: 'gcc.exe (GCC) 12.2.0'
gcc  -I"C:/PROGRA~1/R/R-43~1.1/include" -DNDEBUG     -I"c:/rtools43/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c example.c -o example.o
example.c:3:10: fatal error: mkl.h: No such file or directory
    3 | #include <mkl.h>
      |          ^~~~~~~
compilation terminated.
make: *** [C:/PROGRA~1/R/R-43~1.1/etc/x64/Makeconf:265: example.o] Error 1

 

 

 

I've read here instructions on utilizing R with Intel MKL, but those specific instructions are designed for Linux, and I don't have the expertise to modify the process as I'm not well-versed in Linux. 

I have tried also the following but  with no luck

 

 

> system("R CMD SHLIB -I 'C:/Program Files (x86)/Intel/oneAPI/mkl/latest/include' example.c")
using C compiler: 'gcc.exe (GCC) 12.2.0'
make: *** No rule to make target 'Files'.  Stop.
[1] 1

 

 

 

Thank you very much

Maraki

0 Kudos
4 Replies
VarshaS_Intel
Moderator
1,409 Views

Hi,


Thanks for posting in Intel Communities.


Could you please let us know the Intel MKL version you are using?


Also, could you please provide us with the complete steps you are following on the R desktop along with the sample reproducer code you are using?


Thanks & Regards,

Varsha


0 Kudos
VarshaS_Intel
Moderator
1,376 Views

Hi,


>>example.c:3:10: fatal error: mkl.h: No such file or directory

  3 | #include <mkl.h>

   |     ^~~~~~~

From this error, we can see that Intel MKL does not link properly. Also, from the compiler options provided by you, we did not see the option '-qmkl' so this might be causing an error.


Could you please try adding the flag and let us know if you still have any other issues?


Thanks & Regards,

Varsha


0 Kudos
VarshaS_Intel
Moderator
1,263 Views

Hi,


We have not heard back from you. Could you please provide us with an update on your issue?


Thanks & Regards,

Varsha


0 Kudos
VarshaS_Intel
Moderator
1,168 Views

Hi,


We have not heard back from you. Could you please provide us with an update on your issue?


Thanks & Regards,

Varsha


0 Kudos
Reply