<?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 [SOLVED] Compilation error in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/SOLVED-Compilation-error/m-p/778022#M1222</link>
    <description>Hello again...,&lt;BR /&gt;so I just wanted to compile my first program that uses IMKL.&lt;BR /&gt;I chose one example from the userguide, it's in&lt;BR /&gt;$MKL_Install_Path/Documentation/en_US/mkl/mkl_userguide/MKL_UG_coding_calls/Calling_BLAS_Functions_that_Return_the_Complex_Values_in_C_C.htm&lt;BR /&gt;&lt;BR /&gt;And here is the code:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[cpp]#include &lt;COMPLEX&gt;
#include &lt;IOSTREAM&gt;
#define MKL_Complex16 std::complex&lt;DOUBLE&gt;
#include"/opt/intel/composerxe/mkl/include/mkl.h" //adjusted to my needs
#define N 5

int main()
{
        int n; int inca = 1, incb = 1, i;
        std::complex&lt;DOUBLE&gt; a&lt;N&gt;, b&lt;N&gt;, c;
        n = N;
        
        for( i = 0; i &amp;lt; n; i++ ){
                a&lt;I&gt; = std::complex&lt;DOUBLE&gt;(i,i*2.0);
                b&lt;I&gt; = std::complex&lt;DOUBLE&gt;(n-i,i*2.0);
        }
        zdotc(&amp;amp;c, &amp;amp;n, a, &amp;amp;inca, b, &amp;amp;incb );
        std::cout &amp;lt;&amp;lt; "The complex dot product is: " &amp;lt;&amp;lt; c &amp;lt;&amp;lt; std::endl;
        return 0;
}[/cpp]&lt;/DOUBLE&gt;&lt;/I&gt;&lt;/DOUBLE&gt;&lt;/I&gt;&lt;/N&gt;&lt;/N&gt;&lt;/DOUBLE&gt;&lt;/DOUBLE&gt;&lt;/IOSTREAM&gt;&lt;/COMPLEX&gt;&lt;/PRE&gt; &lt;BR /&gt;I used the Parameters from the Link Advisor Website for compiling / Linking (http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ ) and tried:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[bash]g++ -Wall -DMKL_ILP64  -m64 -c main.cpp[/bash]&lt;/PRE&gt; &lt;BR /&gt;Unfortunately this leads to the following error:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[plain]main.cpp:26:42: error: cannot convert int* to const long long int* for argument 2 to void zdotc(std::complex&lt;DOUBLE&gt;*, const long long int*, const std::complex&lt;DOUBLE&gt;*, const long long int*, const std::complex&lt;DOUBLE&gt;*, const long long int*)[/plain]&lt;/DOUBLE&gt;&lt;/DOUBLE&gt;&lt;/DOUBLE&gt;&lt;/PRE&gt; &lt;BR /&gt;Any ideas why this is happening?&lt;BR /&gt;matse&lt;BR /&gt;&lt;BR /&gt;//Edit: This problem is also solved... maybe I shouldn't just make a guess about the compiler options... withhout the "-DMKL_ILP64" it works fine.&lt;BR /&gt;</description>
    <pubDate>Wed, 03 Aug 2011 01:57:28 GMT</pubDate>
    <dc:creator>matse</dc:creator>
    <dc:date>2011-08-03T01:57:28Z</dc:date>
    <item>
      <title>[SOLVED] Compilation error</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/SOLVED-Compilation-error/m-p/778022#M1222</link>
      <description>Hello again...,&lt;BR /&gt;so I just wanted to compile my first program that uses IMKL.&lt;BR /&gt;I chose one example from the userguide, it's in&lt;BR /&gt;$MKL_Install_Path/Documentation/en_US/mkl/mkl_userguide/MKL_UG_coding_calls/Calling_BLAS_Functions_that_Return_the_Complex_Values_in_C_C.htm&lt;BR /&gt;&lt;BR /&gt;And here is the code:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[cpp]#include &lt;COMPLEX&gt;
#include &lt;IOSTREAM&gt;
#define MKL_Complex16 std::complex&lt;DOUBLE&gt;
#include"/opt/intel/composerxe/mkl/include/mkl.h" //adjusted to my needs
#define N 5

int main()
{
        int n; int inca = 1, incb = 1, i;
        std::complex&lt;DOUBLE&gt; a&lt;N&gt;, b&lt;N&gt;, c;
        n = N;
        
        for( i = 0; i &amp;lt; n; i++ ){
                a&lt;I&gt; = std::complex&lt;DOUBLE&gt;(i,i*2.0);
                b&lt;I&gt; = std::complex&lt;DOUBLE&gt;(n-i,i*2.0);
        }
        zdotc(&amp;amp;c, &amp;amp;n, a, &amp;amp;inca, b, &amp;amp;incb );
        std::cout &amp;lt;&amp;lt; "The complex dot product is: " &amp;lt;&amp;lt; c &amp;lt;&amp;lt; std::endl;
        return 0;
}[/cpp]&lt;/DOUBLE&gt;&lt;/I&gt;&lt;/DOUBLE&gt;&lt;/I&gt;&lt;/N&gt;&lt;/N&gt;&lt;/DOUBLE&gt;&lt;/DOUBLE&gt;&lt;/IOSTREAM&gt;&lt;/COMPLEX&gt;&lt;/PRE&gt; &lt;BR /&gt;I used the Parameters from the Link Advisor Website for compiling / Linking (http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ ) and tried:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[bash]g++ -Wall -DMKL_ILP64  -m64 -c main.cpp[/bash]&lt;/PRE&gt; &lt;BR /&gt;Unfortunately this leads to the following error:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[plain]main.cpp:26:42: error: cannot convert int* to const long long int* for argument 2 to void zdotc(std::complex&lt;DOUBLE&gt;*, const long long int*, const std::complex&lt;DOUBLE&gt;*, const long long int*, const std::complex&lt;DOUBLE&gt;*, const long long int*)[/plain]&lt;/DOUBLE&gt;&lt;/DOUBLE&gt;&lt;/DOUBLE&gt;&lt;/PRE&gt; &lt;BR /&gt;Any ideas why this is happening?&lt;BR /&gt;matse&lt;BR /&gt;&lt;BR /&gt;//Edit: This problem is also solved... maybe I shouldn't just make a guess about the compiler options... withhout the "-DMKL_ILP64" it works fine.&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Aug 2011 01:57:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/SOLVED-Compilation-error/m-p/778022#M1222</guid>
      <dc:creator>matse</dc:creator>
      <dc:date>2011-08-03T01:57:28Z</dc:date>
    </item>
  </channel>
</rss>

