<?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 Compiling Applications with MKL in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-Applications-with-MKL/m-p/1114224#M24552</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I have MKL installed on my Ubuntu Server 16.04. I've used the Intel-provided mklvars.sh script to provide the directories with the MKL libraries. Every time I try to use these directories with a compiler (such as gcc or gfortran), I'm never able to reference the libraries without providing the -L option and the directory manually. I thought the script would set the environment variables so I wouldn't have to provide these entries in the dynamic links. The script is sets MKLROOT, LD_LIBRARY_PATH, and LIBRARY_PATH successfully, but when I attempt to run compilers without the directory, I'm told the files cannot be found.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Any suggestions are tremendously appreciated!&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jun 2016 14:40:38 GMT</pubDate>
    <dc:creator>Alex8</dc:creator>
    <dc:date>2016-06-30T14:40:38Z</dc:date>
    <item>
      <title>Compiling Applications with MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-Applications-with-MKL/m-p/1114224#M24552</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I have MKL installed on my Ubuntu Server 16.04. I've used the Intel-provided mklvars.sh script to provide the directories with the MKL libraries. Every time I try to use these directories with a compiler (such as gcc or gfortran), I'm never able to reference the libraries without providing the -L option and the directory manually. I thought the script would set the environment variables so I wouldn't have to provide these entries in the dynamic links. The script is sets MKLROOT, LD_LIBRARY_PATH, and LIBRARY_PATH successfully, but when I attempt to run compilers without the directory, I'm told the files cannot be found.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Any suggestions are tremendously appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2016 14:40:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-Applications-with-MKL/m-p/1114224#M24552</guid>
      <dc:creator>Alex8</dc:creator>
      <dc:date>2016-06-30T14:40:38Z</dc:date>
    </item>
    <item>
      <title>The Intel compiler drivers</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-Applications-with-MKL/m-p/1114225#M24553</link>
      <description>&lt;P&gt;The Intel compiler drivers &lt;STRONG&gt;icc&lt;/STRONG&gt; and &lt;STRONG&gt;ifort&lt;/STRONG&gt; recognize the -mkl option for this very purpose. When you use a non-Intel compiler, if you do not have a compiler driver with the equivalent option, you can write a shell-script that will convert a "-mkl" shell-script option to the corresponding -I, -L and -l options.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 11:59:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-Applications-with-MKL/m-p/1114225#M24553</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2016-07-01T11:59:08Z</dc:date>
    </item>
    <item>
      <title>Thanks for the response.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-Applications-with-MKL/m-p/1114226#M24554</link>
      <description>&lt;P&gt;Thanks for the response. Could you please provide an example of what you've proposed? I'm not quite sure I understand.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks so much!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 19:34:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-Applications-with-MKL/m-p/1114226#M24554</guid>
      <dc:creator>Alex8</dc:creator>
      <dc:date>2016-07-01T19:34:37Z</dc:date>
    </item>
    <item>
      <title>The mkl link advisor covers</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-Applications-with-MKL/m-p/1114227#M24555</link>
      <description>&lt;P&gt;The mkl link advisor covers include and library options for gcc and gfortran on the supported platforms. &amp;nbsp;As you said, they require explicit L and I specification, so you may consider make or some other scripting option worth while. &amp;nbsp;The built in ability of icc and ifort to set up an ld script is limited to a few basic cases.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2016 20:21:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-Applications-with-MKL/m-p/1114227#M24555</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2016-07-01T20:21:08Z</dc:date>
    </item>
    <item>
      <title>I have a sample C program</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-Applications-with-MKL/m-p/1114228#M24556</link>
      <description>&lt;P style="font-size: 13.008px;"&gt;&lt;SPAN style="color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 14px;"&gt;I have a sample C program that makes use of trigonometric functions. I want to compile it using GCC 6.2.0.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;On using the following command,&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;gcc -liomp5 -lmkl_core -lmkl_intel_thread -lmkl_intel_lp64 &lt;SPAN style="font-size: 13.008px;"&gt;example_tignometry&lt;/SPAN&gt;.c&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;I get,&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;example_tignometry.c:(.text+0x35): undefined reference to `sin'&lt;BR /&gt;
	example_tignometry.c:(.text+0x48): undefined reference to `cos'&lt;BR /&gt;
	example_tignometry.c:(.text+0x5b): undefined reference to `tan'&lt;BR /&gt;
	example_tignometry.c:(.text+0x6e): undefined reference to `sinh'&lt;BR /&gt;
	example_tignometry.c:(.text+0x81): undefined reference to `cosh'&lt;BR /&gt;
	example_tignometry.c:(.text+0x94): undefined reference to `tanh'&lt;BR /&gt;
	example_tignometry.c:(.text+0xa7): undefined reference to `log'&lt;BR /&gt;
	example_tignometry.c:(.text+0xba): undefined reference to `log10'&lt;BR /&gt;
	example_tignometry.c:(.text+0xcd): undefined reference to `exp'&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;The contents of example_tignometry.c are&lt;/P&gt;

&lt;P&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;
	#include &amp;lt;math.h&amp;gt;&lt;BR /&gt;
	int main(){&lt;BR /&gt;
	float i = 0.314;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float j = 0.25;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float k = 6.25;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float sin_value = sin(i);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float cos_value = cos(i);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float tan_value = tan(i);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float sinh_value = sinh(j);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float cosh_value = cosh(j);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float tanh_value = tanh(j);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float log_value = log(k);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float log10_value = log10(k);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float exp_value = exp(k);&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of sin(%f) : %f \n", i, sin_value);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of cos(%f) : %f \n", i, cos_value);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of tan(%f) : %f \n", i, tan_value);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of sinh(%f) : %f \n", j, sinh_value);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of cosh(%f) : %f \n", j, cosh_value);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of tanh(%f) : %f \n", j, tanh_value);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of log(%f) : %f \n", k, log_value);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of log10(%f) : %f \n",k,log10_value);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf("The value of exp(%f) : %f \n",k, exp_value);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return 0;&lt;BR /&gt;
	}&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 11:16:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-Applications-with-MKL/m-p/1114228#M24556</guid>
      <dc:creator>Joseph_A_</dc:creator>
      <dc:date>2016-12-22T11:16:49Z</dc:date>
    </item>
    <item>
      <title>As mentioned earlier in the</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-Applications-with-MKL/m-p/1114229#M24557</link>
      <description>&lt;P&gt;As mentioned earlier in the thread, the MKL link advisor applet ought to get you much closer to the answer, in case you do decide to use MKL.&amp;nbsp; From the looks of it you would need -lm (requirement unrelated to mkl).&amp;nbsp; As you apparently are linking dynamic libraries, you may not need attention to correct order and use of start-group...end-group directives, but since your example doesn't actually use MKL, you can do anything you like with the MKL references.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 12:35:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Compiling-Applications-with-MKL/m-p/1114229#M24557</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2016-12-22T12:35:42Z</dc:date>
    </item>
  </channel>
</rss>

