<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: error: mkl.h: No such file or directory in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855455#M6935</link>
    <description>&lt;BR /&gt;Yes, it works!!!&lt;BR /&gt;&lt;BR /&gt;Thank you, Evgueni&lt;BR /&gt;</description>
    <pubDate>Wed, 23 Dec 2009 08:42:47 GMT</pubDate>
    <dc:creator>zx123</dc:creator>
    <dc:date>2009-12-23T08:42:47Z</dc:date>
    <item>
      <title>error: mkl.h: No such file or directory</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855452#M6932</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I can't fix error in my makefile:&lt;BR /&gt;&lt;BR /&gt;CPP=/opt/intel/Compiler/11.1/059/bin/ia32/icpc&lt;BR /&gt;INC=/opt/intel/Compiler/11.1/059/mkl/include/&lt;BR /&gt;LIB=/opt/intel/Compiler/11.1/059/mkl/lib/32/&lt;BR /&gt;main: main.cpp&lt;BR /&gt; $(CPP) -Wall -I$(INC) -c main.cpp&lt;BR /&gt;main: main.o&lt;BR /&gt; $(CPP) main.o -L$(LIB) -lmkl_intel -lmkl_core -lmkl_intel_thread -liomp5 -lpthread -lm -o main&lt;BR /&gt;&lt;BR /&gt;Then I try to compile I always get error: mkl.h: No such file or directory. What is wrong?&lt;BR /&gt;&lt;BR /&gt;The following script compiles correctly&lt;BR /&gt;#! /bin/bash&lt;BR /&gt;PATH_LIB="/opt/intel/Compiler/11.1/059/mkl/lib/32"&lt;BR /&gt;PATH_MKL="/opt/intel/Compiler/11.1/059/mkl/include/"&lt;BR /&gt;PATH_CPP="/opt/intel/Compiler/11.1/059/bin/ia32/"&lt;BR /&gt;LANG=C ${PATH_CPP}icpc main.cpp -I${PATH_MKL} -L${PATH_LIB} -static -lmkl_intel -lmkl_core -lmkl_intel_thread -liomp5 -lpthread -lm -o main&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Dec 2009 01:34:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855452#M6932</guid>
      <dc:creator>zx123</dc:creator>
      <dc:date>2009-12-23T01:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: error: mkl.h: No such file or directory</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855453#M6933</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/458170"&gt;zx123&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;Hi&lt;BR /&gt;&lt;BR /&gt;I can't fix error in my makefile:&lt;BR /&gt;&lt;BR /&gt;CPP=/opt/intel/Compiler/11.1/059/bin/ia32/icpc&lt;BR /&gt;INC=/opt/intel/Compiler/11.1/059/mkl/include/&lt;BR /&gt;LIB=/opt/intel/Compiler/11.1/059/mkl/lib/32/&lt;BR /&gt;main: main.cpp&lt;BR /&gt;$(CPP) -Wall -I$(INC) -c main.cpp&lt;BR /&gt;main: main.o&lt;BR /&gt;$(CPP) main.o -L$(LIB) -lmkl_intel -lmkl_core -lmkl_intel_thread -liomp5 -lpthread -lm -o main&lt;BR /&gt;&lt;BR /&gt;Then I try to compile I always get error: mkl.h: No such file or directory. What is wrong?&lt;BR /&gt;&lt;BR /&gt;The following script compiles correctly&lt;BR /&gt;#! /bin/bash&lt;BR /&gt;PATH_LIB="/opt/intel/Compiler/11.1/059/mkl/lib/32"&lt;BR /&gt;PATH_MKL="/opt/intel/Compiler/11.1/059/mkl/include/"&lt;BR /&gt;PATH_CPP="/opt/intel/Compiler/11.1/059/bin/ia32/"&lt;BR /&gt;LANG=C ${PATH_CPP}icpc main.cpp -I${PATH_MKL} -L${PATH_LIB} -static -lmkl_intel -lmkl_core -lmkl_intel_thread -liomp5 -lpthread -lm -o main&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Hi zx123!&lt;BR /&gt;I think that the target of the 1st rule should be main.o.&lt;BR /&gt;-Evgueni.</description>
      <pubDate>Wed, 23 Dec 2009 02:50:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855453#M6933</guid>
      <dc:creator>Evgueni_P_Intel</dc:creator>
      <dc:date>2009-12-23T02:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: error: mkl.h: No such file or directory</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855454#M6934</link>
      <description>&lt;DIV style="padding-left: 60px; margin: 0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;...that is, the make file should look as follows:&lt;BR /&gt;main&lt;SPAN style="font-size: small;"&gt;.o&lt;/SPAN&gt;: main.cpp&lt;BR /&gt;$(CPP) -Wall -I$(INC) -c main.cpp&lt;BR /&gt;main: main.o&lt;BR /&gt;$(CPP) main.o -L$(LIB) -lmkl_intel -lmkl_core -lmkl_intel_thread -liomp5 -lpthread -lm -o main&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Dec 2009 06:16:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855454#M6934</guid>
      <dc:creator>Evgueni_P_Intel</dc:creator>
      <dc:date>2009-12-23T06:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: error: mkl.h: No such file or directory</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855455#M6935</link>
      <description>&lt;BR /&gt;Yes, it works!!!&lt;BR /&gt;&lt;BR /&gt;Thank you, Evgueni&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Dec 2009 08:42:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855455#M6935</guid>
      <dc:creator>zx123</dc:creator>
      <dc:date>2009-12-23T08:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: error: mkl.h: No such file or directory</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855456#M6936</link>
      <description>Sorry...Sure I'm not programmer...&lt;BR /&gt;&lt;BR /&gt;I replaced &lt;STRONG&gt;main:&lt;/STRONG&gt; &lt;STRONG&gt;main.cpp&lt;/STRONG&gt; -&amp;gt; &lt;STRONG&gt;main.o: main.cpp&lt;/STRONG&gt;&lt;BR /&gt;but now makefile creates &lt;STRONG&gt;main.o&lt;/STRONG&gt; but I still have not an executable. My makefile does not produce executable file. What is wrong now?&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Dec 2009 09:38:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855456#M6936</guid>
      <dc:creator>zx123</dc:creator>
      <dc:date>2009-12-23T09:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: error: mkl.h: No such file or directory</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855457#M6937</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/458170"&gt;zx123&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;Sorry...Sure I'm not programmer...&lt;BR /&gt;&lt;BR /&gt;I replaced &lt;STRONG&gt;main:&lt;/STRONG&gt; &lt;STRONG&gt;main.cpp&lt;/STRONG&gt; -&amp;gt; &lt;STRONG&gt;main.o: main.cpp&lt;/STRONG&gt;&lt;BR /&gt;but now makefile creates &lt;STRONG&gt;main.o&lt;/STRONG&gt; but I still have not an executable. My makefile does not produce executable file. What is wrong now?&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Your make file produces an executable called &lt;EM&gt;main&lt;/EM&gt; -- this name is given after the -o switch at the end of the second rule.&lt;BR /&gt;Though this namedoesn'tendwith &lt;EM&gt;.exe&lt;/EM&gt;, you can run the file.&lt;BR /&gt;-Evgueni.&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Dec 2009 09:45:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855457#M6937</guid>
      <dc:creator>Evgueni_P_Intel</dc:creator>
      <dc:date>2009-12-23T09:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: error: mkl.h: No such file or directory</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855458#M6938</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/410027"&gt;Evgueni Petrov aka espetrov (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; &lt;BR /&gt;Your make file produces an executable called &lt;EM&gt;main&lt;/EM&gt; -- this name is given after the -o switch at the end of the second rule.&lt;BR /&gt;Though this namedoesn'tendwith &lt;EM&gt;.exe&lt;/EM&gt;, you can run the file.&lt;BR /&gt;-Evgueni.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Unfortunately, an executable (indeed called &lt;EM&gt;main&lt;/EM&gt;) is produced only if I use &lt;STRONG&gt;&lt;EM&gt;main: main.cpp&lt;/EM&gt;&lt;/STRONG&gt; instead of &lt;STRONG&gt;&lt;EM&gt;main.o: main.cpp&lt;/EM&gt;&lt;/STRONG&gt; and only if I exclude&lt;EM&gt; &lt;STRONG&gt;#include ''mkl.h''&lt;/STRONG&gt;&lt;/EM&gt; from my code. If I unclude both &lt;EM&gt;&lt;STRONG&gt;main.o: main.cpp&lt;/STRONG&gt;&lt;/EM&gt; and&lt;STRONG&gt;&lt;EM&gt; #include ''mkl.h''&lt;/EM&gt;&lt;/STRONG&gt; no any executables are produced - only &lt;STRONG&gt;&lt;EM&gt;main.o&lt;/EM&gt;&lt;/STRONG&gt; That is very strange...&lt;BR /&gt;&lt;BR /&gt;Is it possible to compile code with mkl library using only one rule as in my script that I listed in my first post?&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Dec 2009 21:05:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855458#M6938</guid>
      <dc:creator>zx123</dc:creator>
      <dc:date>2009-12-23T21:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: error: mkl.h: No such file or directory</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855459#M6939</link>
      <description>&lt;BR /&gt;zx123,&lt;BR /&gt;Remember that by default &lt;EM&gt;make &lt;/EM&gt;makes the target of the first rule (the tokens before the semicolon.)&lt;BR /&gt;Do &lt;EM&gt;make main &lt;/EM&gt;instead of &lt;EM&gt;make&lt;/EM&gt; or put the rule for &lt;EM&gt;main &lt;/EM&gt;in front of the rule for &lt;EM&gt;main.o&lt;/EM&gt;.&lt;BR /&gt;Good luck!&lt;BR /&gt;&lt;BR /&gt;But... you may find running your application also tricky!&lt;BR /&gt;Your make file links your application to your dynamic MKL libraries.&lt;BR /&gt;For this reason, your application contains only references to the needed MKL libraries, functions, andvaribales.&lt;BR /&gt;These references are resolved only when you run your application.&lt;BR /&gt;At that moment, the linker needs to know the path to the MKL libraries because by default this path isn't hard-coded in your application.&lt;BR /&gt;The standard solution is to add the path to the MKL libraries to environment variable &lt;EM&gt;LD_LIBRARY_PATH&lt;/EM&gt; as follows:&lt;BR /&gt;&lt;EM&gt;export LD_LIBRARY_PATH=/opt/intel/Compiler/11.1/059/mkl/lib/32/:${LD_LIBRARY_PATH}&lt;BR /&gt;&lt;/EM&gt;Of course, this needs be done before you run the application.&lt;BR /&gt;Good luck once again!&lt;BR /&gt;&lt;BR /&gt;-Evgueni.</description>
      <pubDate>Thu, 24 Dec 2009 03:53:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855459#M6939</guid>
      <dc:creator>Evgueni_P_Intel</dc:creator>
      <dc:date>2009-12-24T03:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: error: mkl.h: No such file or directory</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855460#M6940</link>
      <description>yes, I understood&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Dec 2009 10:12:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855460#M6940</guid>
      <dc:creator>zx123</dc:creator>
      <dc:date>2009-12-24T10:12:42Z</dc:date>
    </item>
    <item>
      <title>This error tends to happen if</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855461#M6941</link>
      <description>&lt;P&gt;This error tends to happen if the paths for include headers and bindings are not set correctly. Intel has made this process very straightforward now. Just set the environment using following command for say intel64 architecture located at /opt/intel/bin.&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;source ./compilervars.sh intel64&lt;/PRE&gt;

&lt;P&gt;This will set all the appropriate locations for MKL/TBB/etc headers. If you intent to set only the MKL paths then refer to bash script located at /opt/intel/mkl/bin named as "mklvars.sh"&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Subodh Pachghare&lt;/P&gt;

&lt;P&gt;&lt;A href="https://community.intel.com/www.thesubodh.com" target="_blank"&gt;www.thesubodh.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 11:39:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/error-mkl-h-No-such-file-or-directory/m-p/855461#M6941</guid>
      <dc:creator>Subodh_P_</dc:creator>
      <dc:date>2016-01-19T11:39:40Z</dc:date>
    </item>
  </channel>
</rss>

