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

catastrophic error: cannot open source file "mkl.h"

Frank_M
Beginner
1,602 Views
After installing the new FORTRAN compiler c++ can no longer find mkl.h.

I have added $(IFortInstallDir)mkl\\lib\\ia32 to the Parallel composer 2011 library and the VC++ library list.

Also, $(IFortInstallDir)mkl\\include has been added to Parallel composer 2011 include list and the VC++ include list.
0 Kudos
7 Replies
VipinKumar_E_Intel
1,602 Views


Can you please select MKL from the project properties as seen below and try? This basically sets the library and include paths for MKL in Parallel Composer 2011.


MKL selection from the project properties in MS VS 2010
0 Kudos
Frank_M
Beginner
1,602 Views

Unfortunately I cant do what you suggest because my version of Parallel studio provides no such option. Under Configuration Properties my options are General, Debugging, Intel Debugging, c/c++, Linker, Manifest Tool, Browse Information, Build Events, Custom Build Step.

I would post a screen capture but the website does not seem to want to display a screen capture.

0 Kudos
Frank_M
Beginner
1,602 Views
The answer is ......the c++ compiler no longer recognizes the fortran directory macro. All mkl lib & include directories must be explicitly stated.
0 Kudos
John_Naliboff
Beginner
1,602 Views
Could somebody expand on this...I just installed the c++ compiler package for mac os x (10.6.5), which included the mkl library.

I elected to install both the developer/Xcode and regular terminal forms of the package.

The mian terminal builds appear to be in /opt/intel/composerxe-2011.1.122/, which includes the mkl libraries, etc.

The executable I tried to use for compiling is in /opt/intel/composerxe-2011.1.122/bin/intel64

When I try to use this executable to compile I get the following error:

naliboff >> /opt/intel/composerxe-2011.1.122/bin/intel64/icc -o in2fast in2fast.c -lmkl_solver_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lguide -lpthread -mcmodel=medium
icc: command line warning #10152: option '-mcmodel medium' not supported
in2fast.c(5): catastrophic error: cannot open source file "mkl.h"
#include
^

compilation aborted for in2fast.c (code 4)
naliboff >>


I've tried using other icc executables (in /usr/bin, etc) but I always get this errror. The licencse file (I'm doing the 28 trial) is on my desktop and in my .cshrc file I set setenv INTEL_LICENSE_FILE /Users/naliboff/Desktop.

So fom Frank_M's post it seems I need to explicitly state all the mkl lib & include directories, but I'm not sure how to go about this.

Thanks in advance for the input.

Cheers,
John
0 Kudos
Gennady_F_Intel
Moderator
1,602 Views
John,
Could you please look at the article "How to link application against MKL using XCode IDE...".
You will find there how to do that step by step...
--Gennady
0 Kudos
John_Naliboff
Beginner
1,602 Views
Gennady,
Thank you for the link, if I end up compiling with the Xcode version of icc that link has all the needed info. However, I would prefer to not use Xcode (and the Xcode versions of icc) for compiling as eventually I will be operating and compiling remotely, as well as on a cluster. As such, is there an additional step I can take to link the non-xcode versions of icc (i.e. in my /usr/bin or in /opt/intel/composerxe-2011.1.122/bin/intel64) to mkl? When I did the installation there was a separate xcode version of icc/mkl/etc installed. Thank you again for your quick reply and the helpful link.
Cheers,
John

0 Kudos
Nibbe__Evan
Beginner
1,602 Views

I have the same error running the following on terminal:

icc -c -xAVX optimizedV6.c

I get:

optimizedV6.c(12): catastrophic error: cannot open source file "mkl.h"

  #include "mkl.h"

                  ^

 

compilation aborted for optimizedV6.c (code 4)

 

Last time I ran the exact same line on terminal for version 4 and the code compiled perfectly in the same directory. I also tried removing the previously compiled code from the directory, but I am still getting the same problem.

0 Kudos
Reply