<?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 I can't run MKL with Visual studio. in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-can-t-run-MKL-with-Visual-studio/m-p/931520#M13776</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;

&lt;P&gt;I installed on my computer &lt;STRONG&gt;Intel® C++ Studio XE for Windows 2013 SP1 and Microsoft Visual Studio Pro 2012. Then I followed the instructions that I watched on this video &lt;/STRONG&gt;&lt;A href="http://software.intel.com/en-us/videos/using-the-intel-c-compiler-with-microsoft-visual-studio-2012" target="_blank"&gt;http://software.intel.com/en-us/videos/using-the-intel-c-compiler-with-microsoft-visual-studio-2012&lt;/A&gt;. In order to use MKL&amp;nbsp; I followed these instructions&lt;/P&gt;

&lt;P&gt;For the Visual Studio* 2010/2012 development system:&lt;/P&gt;

&lt;OL id="GUID-CB651C45-6021-41F7-9561-64B8E27A2FCF"&gt;
	&lt;LI&gt;Go to &lt;B class="uicontrol"&gt;Project&lt;/B&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;B class="uicontrol"&gt;Properties&lt;/B&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;B class="uicontrol"&gt;Configuration Properties&lt;/B&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;B class="uicontrol"&gt;Intel Performance Libraries&lt;/B&gt;.&lt;/LI&gt;
	&lt;LI&gt;Change the &lt;B class="uicontrol"&gt;Use MKL&lt;/B&gt; property setting by selecting &lt;B class="uicontrol"&gt;Parallel&lt;/B&gt;, &lt;B class="uicontrol"&gt;Sequential&lt;/B&gt;, or &lt;B class="uicontrol"&gt;Cluster&lt;/B&gt; as appropriate.&lt;BR /&gt;
		&lt;BR /&gt;
		I wanted to run the following example that I read on the tutorial
		&lt;PRE class="brush:cpp;"&gt;
/* C source code is found in dgemm_example.c */

#define min(x,y) (((x) &amp;lt; (y)) ? (x) : (y))

#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include "mkl.h"

int main()
{
    double *A, *B, *C;
    int m, n, k, i, j;
    double alpha, beta;

    printf ("\n This example computes real matrix C=alpha*A*B+beta*C using \n"
            " Intel® MKL function dgemm, where A, B, and  C are matrices and \n"
            " alpha and beta are double precision scalars\n\n");

    m = 2000, k = 200, n = 1000;
    printf (" Initializing data for matrix multiplication C=A*B for matrix \n"
            " A(%ix%i) and matrix B(%ix%i)\n\n", m, k, k, n);
    alpha = 1.0; beta = 0.0;

    printf (" Allocating memory for matrices aligned on 64-byte boundary for better \n"
            " performance \n\n");
    A = (double *)mkl_malloc( m*k*sizeof( double ), 64 );
    B = (double *)mkl_malloc( k*n*sizeof( double ), 64 );
    C = (double *)mkl_malloc( m*n*sizeof( double ), 64 );
    if (A == NULL || B == NULL || C == NULL) {
      printf( "\n ERROR: Can't allocate memory for matrices. Aborting... \n\n");
      mkl_free(A);
      mkl_free(B);
      mkl_free(C);
      return 1;
    }

    printf (" Intializing matrix data \n\n");
    for (i = 0; i &amp;lt; (m*k); i++) {
        A&lt;I&gt; = (double)(i+1);
    }

    for (i = 0; i &amp;lt; (k*n); i++) {
        B&lt;I&gt; = (double)(-i-1);
    }

    for (i = 0; i &amp;lt; (m*n); i++) {
        C&lt;I&gt; = 0.0;
    }

    printf (" Computing matrix product using Intel® MKL dgemm function via CBLAS interface \n\n");
    cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 
                m, n, k, alpha, A, k, B, n, beta, C, n);
    printf ("\n Computations completed.\n\n");

    printf (" Top left corner of matrix A: \n");
    for (i=0; i&amp;lt;min(m,6); i++) {
      for (j=0; j&amp;lt;min(k,6); j++) {
        printf ("%12.0f", A[j+i*k]);
      }
      printf ("\n");
    }

    printf ("\n Top left corner of matrix B: \n");
    for (i=0; i&amp;lt;min(k,6); i++) {
      for (j=0; j&amp;lt;min(n,6); j++) {
        printf ("%12.0f", B[j+i*n]);
      }
      printf ("\n");
    }
    
    printf ("\n Top left corner of matrix C: \n");
    for (i=0; i&amp;lt;min(m,6); i++) {
      for (j=0; j&amp;lt;min(n,6); j++) {
        printf ("%12.5G", C[j+i*n]);
      }
      printf ("\n");
    }

    printf ("\n Deallocating memory \n\n");
    mkl_free(A);
    mkl_free(B);
    mkl_free(C);

    printf (" Example completed. \n\n");
    return 0;
}&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

		&lt;P&gt;&amp;nbsp;&lt;/P&gt;
	&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;But I can't run it. The results I got are&lt;/P&gt;

&lt;P&gt;Warning&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;warning D9025: overriding '/D__INTEL_COMPILER=1400' with '/U__INTEL_COMPILER'&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	Warning&amp;nbsp;&amp;nbsp; &amp;nbsp;2&amp;nbsp;&amp;nbsp; &amp;nbsp;warning D9002: ignoring unknown option '/QaxSSE4.2'&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	Warning&amp;nbsp;&amp;nbsp; &amp;nbsp;3&amp;nbsp;&amp;nbsp; &amp;nbsp;warning D9002: ignoring unknown option '/QxAVX'&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	Warning&amp;nbsp;&amp;nbsp; &amp;nbsp;4&amp;nbsp;&amp;nbsp; &amp;nbsp;warning D9002: ignoring unknown option '/Qfast-transcendentals'&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	Error&amp;nbsp;&amp;nbsp; &amp;nbsp;5&amp;nbsp;&amp;nbsp; &amp;nbsp;error C1083: Cannot open include file: 'mkl.h': No such file or directory&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Could you please tell what I have done wrong?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you in advance.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Feb 2014 12:46:21 GMT</pubDate>
    <dc:creator>Fiori</dc:creator>
    <dc:date>2014-02-28T12:46:21Z</dc:date>
    <item>
      <title>I can't run MKL with Visual studio.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-can-t-run-MKL-with-Visual-studio/m-p/931520#M13776</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;

&lt;P&gt;I installed on my computer &lt;STRONG&gt;Intel® C++ Studio XE for Windows 2013 SP1 and Microsoft Visual Studio Pro 2012. Then I followed the instructions that I watched on this video &lt;/STRONG&gt;&lt;A href="http://software.intel.com/en-us/videos/using-the-intel-c-compiler-with-microsoft-visual-studio-2012" target="_blank"&gt;http://software.intel.com/en-us/videos/using-the-intel-c-compiler-with-microsoft-visual-studio-2012&lt;/A&gt;. In order to use MKL&amp;nbsp; I followed these instructions&lt;/P&gt;

&lt;P&gt;For the Visual Studio* 2010/2012 development system:&lt;/P&gt;

&lt;OL id="GUID-CB651C45-6021-41F7-9561-64B8E27A2FCF"&gt;
	&lt;LI&gt;Go to &lt;B class="uicontrol"&gt;Project&lt;/B&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;B class="uicontrol"&gt;Properties&lt;/B&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;B class="uicontrol"&gt;Configuration Properties&lt;/B&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;B class="uicontrol"&gt;Intel Performance Libraries&lt;/B&gt;.&lt;/LI&gt;
	&lt;LI&gt;Change the &lt;B class="uicontrol"&gt;Use MKL&lt;/B&gt; property setting by selecting &lt;B class="uicontrol"&gt;Parallel&lt;/B&gt;, &lt;B class="uicontrol"&gt;Sequential&lt;/B&gt;, or &lt;B class="uicontrol"&gt;Cluster&lt;/B&gt; as appropriate.&lt;BR /&gt;
		&lt;BR /&gt;
		I wanted to run the following example that I read on the tutorial
		&lt;PRE class="brush:cpp;"&gt;
/* C source code is found in dgemm_example.c */

#define min(x,y) (((x) &amp;lt; (y)) ? (x) : (y))

#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include "mkl.h"

int main()
{
    double *A, *B, *C;
    int m, n, k, i, j;
    double alpha, beta;

    printf ("\n This example computes real matrix C=alpha*A*B+beta*C using \n"
            " Intel® MKL function dgemm, where A, B, and  C are matrices and \n"
            " alpha and beta are double precision scalars\n\n");

    m = 2000, k = 200, n = 1000;
    printf (" Initializing data for matrix multiplication C=A*B for matrix \n"
            " A(%ix%i) and matrix B(%ix%i)\n\n", m, k, k, n);
    alpha = 1.0; beta = 0.0;

    printf (" Allocating memory for matrices aligned on 64-byte boundary for better \n"
            " performance \n\n");
    A = (double *)mkl_malloc( m*k*sizeof( double ), 64 );
    B = (double *)mkl_malloc( k*n*sizeof( double ), 64 );
    C = (double *)mkl_malloc( m*n*sizeof( double ), 64 );
    if (A == NULL || B == NULL || C == NULL) {
      printf( "\n ERROR: Can't allocate memory for matrices. Aborting... \n\n");
      mkl_free(A);
      mkl_free(B);
      mkl_free(C);
      return 1;
    }

    printf (" Intializing matrix data \n\n");
    for (i = 0; i &amp;lt; (m*k); i++) {
        A&lt;I&gt; = (double)(i+1);
    }

    for (i = 0; i &amp;lt; (k*n); i++) {
        B&lt;I&gt; = (double)(-i-1);
    }

    for (i = 0; i &amp;lt; (m*n); i++) {
        C&lt;I&gt; = 0.0;
    }

    printf (" Computing matrix product using Intel® MKL dgemm function via CBLAS interface \n\n");
    cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 
                m, n, k, alpha, A, k, B, n, beta, C, n);
    printf ("\n Computations completed.\n\n");

    printf (" Top left corner of matrix A: \n");
    for (i=0; i&amp;lt;min(m,6); i++) {
      for (j=0; j&amp;lt;min(k,6); j++) {
        printf ("%12.0f", A[j+i*k]);
      }
      printf ("\n");
    }

    printf ("\n Top left corner of matrix B: \n");
    for (i=0; i&amp;lt;min(k,6); i++) {
      for (j=0; j&amp;lt;min(n,6); j++) {
        printf ("%12.0f", B[j+i*n]);
      }
      printf ("\n");
    }
    
    printf ("\n Top left corner of matrix C: \n");
    for (i=0; i&amp;lt;min(m,6); i++) {
      for (j=0; j&amp;lt;min(n,6); j++) {
        printf ("%12.5G", C[j+i*n]);
      }
      printf ("\n");
    }

    printf ("\n Deallocating memory \n\n");
    mkl_free(A);
    mkl_free(B);
    mkl_free(C);

    printf (" Example completed. \n\n");
    return 0;
}&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

		&lt;P&gt;&amp;nbsp;&lt;/P&gt;
	&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;But I can't run it. The results I got are&lt;/P&gt;

&lt;P&gt;Warning&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;warning D9025: overriding '/D__INTEL_COMPILER=1400' with '/U__INTEL_COMPILER'&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	Warning&amp;nbsp;&amp;nbsp; &amp;nbsp;2&amp;nbsp;&amp;nbsp; &amp;nbsp;warning D9002: ignoring unknown option '/QaxSSE4.2'&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	Warning&amp;nbsp;&amp;nbsp; &amp;nbsp;3&amp;nbsp;&amp;nbsp; &amp;nbsp;warning D9002: ignoring unknown option '/QxAVX'&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	Warning&amp;nbsp;&amp;nbsp; &amp;nbsp;4&amp;nbsp;&amp;nbsp; &amp;nbsp;warning D9002: ignoring unknown option '/Qfast-transcendentals'&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	Error&amp;nbsp;&amp;nbsp; &amp;nbsp;5&amp;nbsp;&amp;nbsp; &amp;nbsp;error C1083: Cannot open include file: 'mkl.h': No such file or directory&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Could you please tell what I have done wrong?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you in advance.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2014 12:46:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-can-t-run-MKL-with-Visual-studio/m-p/931520#M13776</guid>
      <dc:creator>Fiori</dc:creator>
      <dc:date>2014-02-28T12:46:21Z</dc:date>
    </item>
    <item>
      <title>Right click on the project</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-can-t-run-MKL-with-Visual-studio/m-p/931521#M13777</link>
      <description>&lt;P&gt;Right click on the project containing the source file, and select Properties. In the xxxapp Property Pages, select Configuration Properties-&amp;gt;"Intel Performance Libraries" and set one of the options under "Intel Math Kernel Library".&lt;/P&gt;

&lt;P&gt;If you do not see "Intel Performance Libraries" as described above, the Visual Studio integration for Intel C has not been properly installed. You will need to rectify that if you want to use Intel C.&lt;/P&gt;

&lt;P&gt;If you want to use MKL with Microsoft C, the procedure is a little bit different, but straightforward -- it is the same as for using any third party C library in Visual Studio.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2014 14:37:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-can-t-run-MKL-with-Visual-studio/m-p/931521#M13777</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2014-02-28T14:37:00Z</dc:date>
    </item>
    <item>
      <title>There are 3 options: Parallel</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-can-t-run-MKL-with-Visual-studio/m-p/931522#M13778</link>
      <description>&lt;P&gt;There are 3 options: Parallel, Sequential, Cluster. But it doesn't work. Please, do you have something to propose in order to find out what is&amp;nbsp; going wrong?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2014 15:30:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-can-t-run-MKL-with-Visual-studio/m-p/931522#M13778</guid>
      <dc:creator>Fiori</dc:creator>
      <dc:date>2014-02-28T15:30:50Z</dc:date>
    </item>
    <item>
      <title>one of the problem may be (</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-can-t-run-MKL-with-Visual-studio/m-p/931523#M13779</link>
      <description>&lt;P&gt;one of the problem may be ( we need to check it ) the issue with integration to VS2012.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;but to start working, you can explicitly to add the path to the mkl header files into C.C++/General/Additional Include directories&amp;nbsp;&lt;/P&gt;

&lt;P&gt;it should help with this problem.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2014 15:56:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-can-t-run-MKL-with-Visual-studio/m-p/931523#M13779</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2014-02-28T15:56:04Z</dc:date>
    </item>
    <item>
      <title>Hi GF G.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-can-t-run-MKL-with-Visual-studio/m-p/931524#M13780</link>
      <description>&lt;P&gt;Hi GF G.&lt;/P&gt;

&lt;P&gt;Yes, you should be able to solve the problem by adding mkl&amp;nbsp;header file path, library and library&amp;nbsp;path manualy as&amp;nbsp;Gennady mentioned. &lt;/P&gt;

&lt;P&gt;Or&amp;nbsp;you may open the verbose by property =&amp;gt; C++ =&amp;gt; General =&amp;gt; Supress Startup banner&amp;nbsp; to NO&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;And property page =&amp;gt; Linker=&amp;gt; general =&amp;gt; Show progress to For Libraries Searched (/VERBOSE:Lib).&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Clean your project and rebuild it , then check the buildlog to see what is going wrong.&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2014 02:02:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/I-can-t-run-MKL-with-Visual-studio/m-p/931524#M13780</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2014-03-03T02:02:10Z</dc:date>
    </item>
  </channel>
</rss>

