<?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 problem with cblas_zgemm in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/problem-with-cblas-zgemm/m-p/773154#M788</link>
    <description>Dear service provider&lt;BR /&gt;&lt;BR /&gt;I am trying MKL 10.3 provided with c++ composer xe for mac.&lt;BR /&gt;&lt;BR /&gt;I was trying this simple code : for C = I*A;&lt;BR /&gt;&lt;BR /&gt;???? but getting C as all zeros&lt;BR /&gt;&lt;BR /&gt;#include &lt;IOSTREAM&gt;&lt;BR /&gt;#include &lt;MKL.H&gt;&lt;BR /&gt;using namespace std;&lt;BR /&gt;&lt;BR /&gt;int main () {&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; MKL_Complex16 A[2], I[4], C[2], alpha, beta;&lt;BR /&gt; &lt;BR /&gt; I[0].real = 1.0;I[0].imag = 1.0;&lt;BR /&gt; I[1].real = 1.0;I[1].imag = 1.0;&lt;BR /&gt; I[2].real = 1.0;I[2].imag = 1.0;&lt;BR /&gt; I[3].real = 1.0;I[3].imag = 1.0;&lt;BR /&gt;  &lt;BR /&gt; A[0].real = 10.0;A[0].imag = 1.0;&lt;BR /&gt; A[1].real = 11.0;A[1].imag = 11.0; &lt;BR /&gt; &lt;BR /&gt; alpha.real = 1.0; alpha.imag = 0.0;&lt;BR /&gt; beta.real = 0.0; beta.imag = 0.0;&lt;BR /&gt; &lt;BR /&gt; cblas_zgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 2, 2, 1, α, I, 2, A, 2, β, C, 2); &lt;BR /&gt; &lt;BR /&gt;  cout &amp;lt;&amp;lt; C[0].real &amp;lt;&amp;lt; "+" &amp;lt;&amp;lt; C[0].imag&amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt; cout &amp;lt;&amp;lt; C[1].real &amp;lt;&amp;lt; "+" &amp;lt;&amp;lt; C[1].imag&amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt; &lt;BR /&gt; return 0;&lt;BR /&gt;}&lt;BR /&gt;// its a cpp file&lt;BR /&gt;&lt;BR /&gt;build it with: &lt;BR /&gt;&lt;BR /&gt;icpc main.cpp -o results_t -static-intel -DMKL_ILP64 -m64 /Developer/opt/intel/composerxe-2011.4.184/mkl/lib/libmkl_intel_ilp64.a /Developer/opt/intel/composerxe-2011.4.184/mkl/lib/libmkl_intel_thread.a /Developer/opt/intel/composerxe-2011.4.184/mkl/lib/libmkl_core.a /Developer/opt/intel/composerxe-2011.4.184/compiler/lib/libiomp5.a -lpthread&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;//results are&lt;BR /&gt;&lt;BR /&gt;0+0&lt;BR /&gt;0+0&lt;BR /&gt;&lt;BR /&gt;&lt;/MKL.H&gt;&lt;/IOSTREAM&gt;</description>
    <pubDate>Tue, 09 Aug 2011 23:54:32 GMT</pubDate>
    <dc:creator>Sunny_Beast</dc:creator>
    <dc:date>2011-08-09T23:54:32Z</dc:date>
    <item>
      <title>problem with cblas_zgemm</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/problem-with-cblas-zgemm/m-p/773154#M788</link>
      <description>Dear service provider&lt;BR /&gt;&lt;BR /&gt;I am trying MKL 10.3 provided with c++ composer xe for mac.&lt;BR /&gt;&lt;BR /&gt;I was trying this simple code : for C = I*A;&lt;BR /&gt;&lt;BR /&gt;???? but getting C as all zeros&lt;BR /&gt;&lt;BR /&gt;#include &lt;IOSTREAM&gt;&lt;BR /&gt;#include &lt;MKL.H&gt;&lt;BR /&gt;using namespace std;&lt;BR /&gt;&lt;BR /&gt;int main () {&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; MKL_Complex16 A[2], I[4], C[2], alpha, beta;&lt;BR /&gt; &lt;BR /&gt; I[0].real = 1.0;I[0].imag = 1.0;&lt;BR /&gt; I[1].real = 1.0;I[1].imag = 1.0;&lt;BR /&gt; I[2].real = 1.0;I[2].imag = 1.0;&lt;BR /&gt; I[3].real = 1.0;I[3].imag = 1.0;&lt;BR /&gt;  &lt;BR /&gt; A[0].real = 10.0;A[0].imag = 1.0;&lt;BR /&gt; A[1].real = 11.0;A[1].imag = 11.0; &lt;BR /&gt; &lt;BR /&gt; alpha.real = 1.0; alpha.imag = 0.0;&lt;BR /&gt; beta.real = 0.0; beta.imag = 0.0;&lt;BR /&gt; &lt;BR /&gt; cblas_zgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 2, 2, 1, α, I, 2, A, 2, β, C, 2); &lt;BR /&gt; &lt;BR /&gt;  cout &amp;lt;&amp;lt; C[0].real &amp;lt;&amp;lt; "+" &amp;lt;&amp;lt; C[0].imag&amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt; cout &amp;lt;&amp;lt; C[1].real &amp;lt;&amp;lt; "+" &amp;lt;&amp;lt; C[1].imag&amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt; &lt;BR /&gt; return 0;&lt;BR /&gt;}&lt;BR /&gt;// its a cpp file&lt;BR /&gt;&lt;BR /&gt;build it with: &lt;BR /&gt;&lt;BR /&gt;icpc main.cpp -o results_t -static-intel -DMKL_ILP64 -m64 /Developer/opt/intel/composerxe-2011.4.184/mkl/lib/libmkl_intel_ilp64.a /Developer/opt/intel/composerxe-2011.4.184/mkl/lib/libmkl_intel_thread.a /Developer/opt/intel/composerxe-2011.4.184/mkl/lib/libmkl_core.a /Developer/opt/intel/composerxe-2011.4.184/compiler/lib/libiomp5.a -lpthread&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;//results are&lt;BR /&gt;&lt;BR /&gt;0+0&lt;BR /&gt;0+0&lt;BR /&gt;&lt;BR /&gt;&lt;/MKL.H&gt;&lt;/IOSTREAM&gt;</description>
      <pubDate>Tue, 09 Aug 2011 23:54:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/problem-with-cblas-zgemm/m-p/773154#M788</guid>
      <dc:creator>Sunny_Beast</dc:creator>
      <dc:date>2011-08-09T23:54:32Z</dc:date>
    </item>
    <item>
      <title>problem with cblas_zgemm</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/problem-with-cblas-zgemm/m-p/773155#M789</link>
      <description>What are the sizes of your matrices? &lt;BR /&gt;&lt;BR /&gt;From the call to cblas_zgemm one would conclude from the values given for the arguments m, n and k that matrix I is of size 2 X 1 and A is of size 1 X 2. But that would make the product I.A of size 2 X 2. However, the apparent size of matrix C is different. This discrepancy needs to be resolved.</description>
      <pubDate>Wed, 10 Aug 2011 12:09:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/problem-with-cblas-zgemm/m-p/773155#M789</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2011-08-10T12:09:53Z</dc:date>
    </item>
  </channel>
</rss>

