<?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 MKL Performance on Ubuntu 10.10 64 bit in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Performance-on-Ubuntu-10-10-64-bit/m-p/787349#M1938</link>
    <description>So far, you have not shown any code to help pinpoint the problem. It is odd that your code calls cblas_dgemm, yet you received a linker error for a reference to mkl_dgemm. It is difficult to debug code that has not been seen.&lt;BR /&gt;&lt;BR /&gt;Here are two things to try.&lt;BR /&gt;&lt;BR /&gt;1. On Ubuntu, repeat what you did before but add the -v flag to the compiler command, i.e, instead of &lt;I&gt;icc&lt;/I&gt; say &lt;I&gt;icc -v&lt;/I&gt;. Report the output.&lt;BR /&gt;&lt;BR /&gt;2. Try the following toy example of calling &lt;I&gt;cblas_dgemm&lt;/I&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[cpp]/* Test program for cblas_dgemm.
   Expected results:
   
     374.10   397.20   420.30
     695.10   738.20   781.30 
    1016.10  1079.20  1142.30 

*/
#include &lt;STDIO.H&gt;
#include &lt;MKL.H&gt;
int main(int argc,char *argv[]){
CBLAS_ORDER order=CblasColMajor;
CBLAS_TRANSPOSE transA=CblasNoTrans,transB=CblasTrans;
int M=3,N=3,K=2,ldA=3,ldB=3,ldC=3; double alpha=1.0, beta=10.0;
double A[]={11.0,21.0,31.0,12.0,22.0,32.0};
double B[]={11.0,12.0,13.0,21.0,22.0,23.0};
double C[9]={0.11,0.21,0.31,0.12,0.22,0.32,0.13,0.23,0.33};
int i,j;
cblas_dgemm(order, 
            transA, 
            transB, 
            M, N, K, 
            alpha, A, ldA, 
            B, ldB, 
            beta, 
            C, ldC);
for(i=0; i&lt;LDC&gt;&lt;/LDC&gt;&lt;/MKL.H&gt;&lt;/STDIO.H&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 15 Nov 2010 12:46:31 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2010-11-15T12:46:31Z</dc:date>
    <item>
      <title>MKL Performance on Ubuntu 10.10 64 bit</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Performance-on-Ubuntu-10-10-64-bit/m-p/787345#M1934</link>
      <description>Hello everyone,&lt;BR /&gt;&lt;BR /&gt;I used MKL in my project. On Windows, it compiles
 correctly and gives some speedup, but on Ubuntu 10.10 64 bit, it doesn't
 compile at all. The compiling process stops at the linking stage with 
the following error:&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;undefined reference to 'mkl_blas_dgemv'&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;In
 the code, I call cblas_dgemm() function. Even when I commented this
 function, and the application compiles OK, but it is really slow (in 
respect with the speedup it gives on Windows). Besides cblas_dgemm(), I 
also use other function like adding, subtracting vectors....&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;Some more details about my apps:&lt;/B&gt;&lt;BR /&gt;1.
 I used the library files from MKL package for 32-bit/x86-64bit 
development (338 MB). Although the installer told that it doesn't 
support the Ubuntu 10.10, but it installed successfully.&lt;BR /&gt;&lt;BR /&gt;2. My 
application uses boost::thread to create some threads. MKL functions are
 likely called from multiple threads. On linux, boost seems to utilize 
Posix threads.&lt;BR /&gt;&lt;BR /&gt;3. The linking command is:&lt;BR /&gt;&lt;I&gt;-Wl,--start-group 
$MKL_PATH/libmkl_intel_lp64.a $MKL_PATH/libmkl_intel_thread.a 
$MKL_PATH/libmkl_core.a -Wl,--end-group -liomp5 -lpthread&lt;BR /&gt;&lt;/I&gt;&lt;BR /&gt;(I have tried replacing libmkl_intel_thread.a by libmkl_sequential.a but it still doesn't compile at all)&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;So I would like to ask:&lt;/B&gt;&lt;BR /&gt;1.
Which library I have to link to get around the "&lt;I&gt;undefined reference to 
'mkl_blas_dgemv'&lt;/I&gt;" error? On windows it works well, but on Ubuntu 10.10 
64 bit, it simply cannot be compiled.&lt;BR /&gt;2. Why does MKL slows down the 
application on Ubuntu 10.10 64 bit? Is this a known-issue, or I did 
something wrong with the application?&lt;BR /&gt;&lt;BR /&gt;Any help would be greatly 
appreciated. I'm pretty new with MKL, so I hope that there was something
 wrong with my configuration...&lt;BR /&gt;Thanks a lot :x&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Nov 2010 16:46:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Performance-on-Ubuntu-10-10-64-bit/m-p/787345#M1934</guid>
      <dc:creator>Pham_Hoai_Vu</dc:creator>
      <dc:date>2010-11-12T16:46:57Z</dc:date>
    </item>
    <item>
      <title>MKL Performance on Ubuntu 10.10 64 bit</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Performance-on-Ubuntu-10-10-64-bit/m-p/787346#M1935</link>
      <description>Let's start with your first question.&lt;BR /&gt;You are using the right libraries and the link line looks good. Have you set MKL_PATH correctly (it must point to the directory containing those libraries of course). Are there any other error messages?&lt;BR /&gt;&lt;BR /&gt;Finally, what version of MKL are you using?&lt;BR /&gt;&lt;BR /&gt;Todd</description>
      <pubDate>Fri, 12 Nov 2010 18:32:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Performance-on-Ubuntu-10-10-64-bit/m-p/787346#M1935</guid>
      <dc:creator>Todd_R_Intel</dc:creator>
      <dc:date>2010-11-12T18:32:10Z</dc:date>
    </item>
    <item>
      <title>MKL Performance on Ubuntu 10.10 64 bit</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Performance-on-Ubuntu-10-10-64-bit/m-p/787347#M1936</link>
      <description>A suggestion, to make it easier for others to understand the problem: please do not confuse compilation errors with linker errors. The former class of errors occur because of errors in the source code, and will result in no object file being produced and, possibly, linking will not even be attempted. Linker errors, on the other hand, are caused most often by some routines being called from your Fortran source that are not present in the files (objects and libraries) presented to the linker.&lt;BR /&gt;&lt;BR /&gt;Along the same lines, I cannot make sense of your second question. Since, on Ubuntu, the linking step failed (or, in your words, "it simply cannot be compiled"), the question "Why does MKL slows down the 
application on Ubuntu 10.10 64 bit?" makes no sense, since it refers to the execution speed of a program that could not be produced.&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Nov 2010 19:48:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Performance-on-Ubuntu-10-10-64-bit/m-p/787347#M1936</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2010-11-12T19:48:32Z</dc:date>
    </item>
    <item>
      <title>MKL Performance on Ubuntu 10.10 64 bit</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Performance-on-Ubuntu-10-10-64-bit/m-p/787348#M1937</link>
      <description>Sorry for the misunderstanding. To make it clear, I meant:&lt;BR /&gt;When using &lt;I&gt;cblas_dgemm&lt;/I&gt;, the linking step failed under Ubuntu 10.10 64 bit (while it works on Windows).&lt;BR /&gt;When I commented &lt;I&gt;cblas_dgemm()&lt;/I&gt; function (I used the traditional loop to multiply the 2 matrices), the source code compiles successfully on Ubuntu, but it is slow. Besides &lt;I&gt;cblas_dgemm()&lt;/I&gt; function, I used many other MKL functions, e.g. Sub, Add ... in may places, and I hope that they can also provide some speedup. Nonetheless, it couldn't accelarate the application.&lt;BR /&gt;&lt;BR /&gt;Finally, I used MKL 10.3. I downloaded the file named "l_mkl_10.3.0.084.tgz". And I have checked the MKL_PATH many times, it points to the right directory.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 13 Nov 2010 01:45:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Performance-on-Ubuntu-10-10-64-bit/m-p/787348#M1937</guid>
      <dc:creator>Pham_Hoai_Vu</dc:creator>
      <dc:date>2010-11-13T01:45:18Z</dc:date>
    </item>
    <item>
      <title>MKL Performance on Ubuntu 10.10 64 bit</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Performance-on-Ubuntu-10-10-64-bit/m-p/787349#M1938</link>
      <description>So far, you have not shown any code to help pinpoint the problem. It is odd that your code calls cblas_dgemm, yet you received a linker error for a reference to mkl_dgemm. It is difficult to debug code that has not been seen.&lt;BR /&gt;&lt;BR /&gt;Here are two things to try.&lt;BR /&gt;&lt;BR /&gt;1. On Ubuntu, repeat what you did before but add the -v flag to the compiler command, i.e, instead of &lt;I&gt;icc&lt;/I&gt; say &lt;I&gt;icc -v&lt;/I&gt;. Report the output.&lt;BR /&gt;&lt;BR /&gt;2. Try the following toy example of calling &lt;I&gt;cblas_dgemm&lt;/I&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[cpp]/* Test program for cblas_dgemm.
   Expected results:
   
     374.10   397.20   420.30
     695.10   738.20   781.30 
    1016.10  1079.20  1142.30 

*/
#include &lt;STDIO.H&gt;
#include &lt;MKL.H&gt;
int main(int argc,char *argv[]){
CBLAS_ORDER order=CblasColMajor;
CBLAS_TRANSPOSE transA=CblasNoTrans,transB=CblasTrans;
int M=3,N=3,K=2,ldA=3,ldB=3,ldC=3; double alpha=1.0, beta=10.0;
double A[]={11.0,21.0,31.0,12.0,22.0,32.0};
double B[]={11.0,12.0,13.0,21.0,22.0,23.0};
double C[9]={0.11,0.21,0.31,0.12,0.22,0.32,0.13,0.23,0.33};
int i,j;
cblas_dgemm(order, 
            transA, 
            transB, 
            M, N, K, 
            alpha, A, ldA, 
            B, ldB, 
            beta, 
            C, ldC);
for(i=0; i&lt;LDC&gt;&lt;/LDC&gt;&lt;/MKL.H&gt;&lt;/STDIO.H&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Nov 2010 12:46:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-Performance-on-Ubuntu-10-10-64-bit/m-p/787349#M1938</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2010-11-15T12:46:31Z</dc:date>
    </item>
  </channel>
</rss>

