<?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 zlange and Frobenius norm issue in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zlange-and-Frobenius-norm-issue/m-p/972570#M16824</link>
    <description>Hi,

I'm getting an incorrect result when I use zlange to compute the Frobenius norm. dlange and clange work fine, as well as the one and infinity norms for zlange. Below illustrates the problem.  For a 32-bit build I get a large random number and for a 64-bit build I get 0 for zlange. I'm using MKL 11.0 update 1 on Windows 8 64-bit. 

Any idea what I'm doing wrong?

Thanks,
Marcus

#include "mkl.h"
#include &lt;IOSTREAM&gt;

MKL_Complex16  complex16(double r, double i=0){
	MKL_Complex16 c = {r, i};
	return c;
}

MKL_Complex8 complex8(float r, float i=0){
	MKL_Complex8 c = {r, i};
	return c;
}

int _tmain(int argc, _TCHAR* argv[])
{
	int order = 3;
	double* dwork = new double[9];
	float* fwork = new float[9];
	char f = 'f';

	MKL_Complex16* c16 = new MKL_Complex16[9];
	c16[0] = complex16(-1.1);
	c16[1] = complex16( 0.0);
	c16[2] = complex16(-4.4);
	c16[3] = complex16(-2.2);
	c16[4] = complex16( 1.1);
	c16[5] = complex16( 5.5);
	c16[6] = complex16(-3.3);
	c16[7] = complex16( 2.2);
	c16[8] = complex16( 6.6);

	MKL_Complex8* c8 = new MKL_Complex8[9];
	c8[0] = complex8(-1.1f);
	c8[1] = complex8( 0.0f);
	c8[2] = complex8(-4.4f);
	c8[3] = complex8(-2.2f);
	c8[4] = complex8( 1.1f);
	c8[5] = complex8( 5.5f);
	c8[6] = complex8(-3.3f);
	c8[7] = complex8( 2.2f);
	c8[8] = complex8( 6.6f);

	double d[9] = {-1.1, 0.0, -4.4, -2.2, 1.1, 5.5, -3.3, 2.2, 6.6};

	double c16norm = zlange(&amp;amp;f, &amp;amp;order, &amp;amp;order, c16, &amp;amp;order, dwork);
	std::cout &amp;lt;&amp;lt; c16norm &amp;lt;&lt;:ENDL&gt;&lt;/:ENDL&gt;&lt;/IOSTREAM&gt;</description>
    <pubDate>Thu, 13 Dec 2012 10:01:10 GMT</pubDate>
    <dc:creator>Marcus_C_</dc:creator>
    <dc:date>2012-12-13T10:01:10Z</dc:date>
    <item>
      <title>zlange and Frobenius norm issue</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zlange-and-Frobenius-norm-issue/m-p/972570#M16824</link>
      <description>Hi,

I'm getting an incorrect result when I use zlange to compute the Frobenius norm. dlange and clange work fine, as well as the one and infinity norms for zlange. Below illustrates the problem.  For a 32-bit build I get a large random number and for a 64-bit build I get 0 for zlange. I'm using MKL 11.0 update 1 on Windows 8 64-bit. 

Any idea what I'm doing wrong?

Thanks,
Marcus

#include "mkl.h"
#include &lt;IOSTREAM&gt;

MKL_Complex16  complex16(double r, double i=0){
	MKL_Complex16 c = {r, i};
	return c;
}

MKL_Complex8 complex8(float r, float i=0){
	MKL_Complex8 c = {r, i};
	return c;
}

int _tmain(int argc, _TCHAR* argv[])
{
	int order = 3;
	double* dwork = new double[9];
	float* fwork = new float[9];
	char f = 'f';

	MKL_Complex16* c16 = new MKL_Complex16[9];
	c16[0] = complex16(-1.1);
	c16[1] = complex16( 0.0);
	c16[2] = complex16(-4.4);
	c16[3] = complex16(-2.2);
	c16[4] = complex16( 1.1);
	c16[5] = complex16( 5.5);
	c16[6] = complex16(-3.3);
	c16[7] = complex16( 2.2);
	c16[8] = complex16( 6.6);

	MKL_Complex8* c8 = new MKL_Complex8[9];
	c8[0] = complex8(-1.1f);
	c8[1] = complex8( 0.0f);
	c8[2] = complex8(-4.4f);
	c8[3] = complex8(-2.2f);
	c8[4] = complex8( 1.1f);
	c8[5] = complex8( 5.5f);
	c8[6] = complex8(-3.3f);
	c8[7] = complex8( 2.2f);
	c8[8] = complex8( 6.6f);

	double d[9] = {-1.1, 0.0, -4.4, -2.2, 1.1, 5.5, -3.3, 2.2, 6.6};

	double c16norm = zlange(&amp;amp;f, &amp;amp;order, &amp;amp;order, c16, &amp;amp;order, dwork);
	std::cout &amp;lt;&amp;lt; c16norm &amp;lt;&lt;:ENDL&gt;&lt;/:ENDL&gt;&lt;/IOSTREAM&gt;</description>
      <pubDate>Thu, 13 Dec 2012 10:01:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zlange-and-Frobenius-norm-issue/m-p/972570#M16824</guid>
      <dc:creator>Marcus_C_</dc:creator>
      <dc:date>2012-12-13T10:01:10Z</dc:date>
    </item>
    <item>
      <title>marcus,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zlange-and-Frobenius-norm-issue/m-p/972571#M16825</link>
      <description>marcus, 
I see the same resuilts on my side. At the first glance this is the error. Thanks for report. we will check the cause of the problem. 
--Gennady</description>
      <pubDate>Thu, 13 Dec 2012 12:10:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zlange-and-Frobenius-norm-issue/m-p/972571#M16825</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2012-12-13T12:10:06Z</dc:date>
    </item>
    <item>
      <title>Here is a shorter Fortran</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zlange-and-Frobenius-norm-issue/m-p/972572#M16826</link>
      <description>Here is a shorter Fortran version that also shows up the ZLANGE bug. The program prints out a different result every time that it is run, when MKL Version 11 is used. There is no problem with MKL Version 10.3.12.
[fortran]program dzlange
implicit none
complex*16 z(9)
real*8 zr(9),z16norm,wrk(9),zlange
integer :: m=9,n=1
data zr/-1.1d0,0.0d0,-4.4d0,-2.2d0,1.1d0,5.5d0,-3.3d0,2.2d0,6.6d0/
z=zr
z16norm=zlange('f',m,n,z,m,wrk)
write(*,*)z16norm
end program dzlange
[/fortran]</description>
      <pubDate>Thu, 13 Dec 2012 13:57:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zlange-and-Frobenius-norm-issue/m-p/972572#M16826</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2012-12-13T13:57:00Z</dc:date>
    </item>
    <item>
      <title>Yes, That's right. Thanks a</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zlange-and-Frobenius-norm-issue/m-p/972573#M16827</link>
      <description>Yes, That's right. Thanks a lot, mecej.  The problem has already escalated.</description>
      <pubDate>Thu, 13 Dec 2012 14:11:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zlange-and-Frobenius-norm-issue/m-p/972573#M16827</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2012-12-13T14:11:40Z</dc:date>
    </item>
    <item>
      <title>Hello,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zlange-and-Frobenius-norm-issue/m-p/972574#M16828</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;This issue has been fixed in MKL v.11.0 update 2 released yesterday.&lt;/P&gt;
&lt;P&gt;You can download this update from intel registration center and check the problem on your side.&lt;/P&gt;
&lt;P&gt;--Gennady&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2013 06:25:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zlange-and-Frobenius-norm-issue/m-p/972574#M16828</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2013-02-04T06:25:20Z</dc:date>
    </item>
    <item>
      <title>Works great. Thanks!</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zlange-and-Frobenius-norm-issue/m-p/972575#M16829</link>
      <description>&lt;P&gt;Works great. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2013 14:58:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zlange-and-Frobenius-norm-issue/m-p/972575#M16829</guid>
      <dc:creator>Marcus_C_</dc:creator>
      <dc:date>2013-02-04T14:58:43Z</dc:date>
    </item>
    <item>
      <title>Ok, thanks for the update.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zlange-and-Frobenius-norm-issue/m-p/972576#M16830</link>
      <description>&lt;P&gt;Ok, thanks for the update. the problem is closed.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2013 15:52:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zlange-and-Frobenius-norm-issue/m-p/972576#M16830</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2013-02-04T15:52:54Z</dc:date>
    </item>
  </channel>
</rss>

