<?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 zfeast_hrci initialization shows strange behaviour in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zfeast-hrci-initialization-shows-strange-behaviour/m-p/1061921#M21705</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Hi all,&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;i am working my way through the example zexample_sparse_rci_c.c. I have it working now for my matrix, BUT found a strange behaviour for the input arrays Aq and Sq:&lt;/P&gt;

&lt;P&gt;when declaring them like this:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;MKL_Complex16&amp;nbsp; Aq[M0SQUARE]&lt;/EM&gt;; (where MOSquare is an integer) everything works fine.&lt;/P&gt;

&lt;P&gt;When declaring them like&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;MKL_Complex16 *Sq = new MKL_Complex16[M0SQUARE];&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;the first call to zfeast_hrci&amp;nbsp; fails with:&lt;/P&gt;

&lt;P&gt;Thread #1 [feastTrial] 5489 [core: 2] (Suspended : Signal : SIGSEGV:Segmentation fault)&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;mkl_feast_zfeast_hrci() at 0x7ffff617fedf&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;zfeast_hrci_() at 0x7ffff7959141&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;testAddition() at feastTrial.cpp:251 0x4047da&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;0x0&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;. Strangely enough: when declaring workc and work with new .... no problems occur.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;What am I missing here?&lt;/P&gt;

&lt;P&gt;I want to have all memory on the heap in order to cope with LARGE matrices.&lt;/P&gt;</description>
    <pubDate>Sun, 27 Mar 2016 10:42:45 GMT</pubDate>
    <dc:creator>Christian_M_3</dc:creator>
    <dc:date>2016-03-27T10:42:45Z</dc:date>
    <item>
      <title>zfeast_hrci initialization shows strange behaviour</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zfeast-hrci-initialization-shows-strange-behaviour/m-p/1061921#M21705</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hi all,&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;i am working my way through the example zexample_sparse_rci_c.c. I have it working now for my matrix, BUT found a strange behaviour for the input arrays Aq and Sq:&lt;/P&gt;

&lt;P&gt;when declaring them like this:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;MKL_Complex16&amp;nbsp; Aq[M0SQUARE]&lt;/EM&gt;; (where MOSquare is an integer) everything works fine.&lt;/P&gt;

&lt;P&gt;When declaring them like&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;MKL_Complex16 *Sq = new MKL_Complex16[M0SQUARE];&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;the first call to zfeast_hrci&amp;nbsp; fails with:&lt;/P&gt;

&lt;P&gt;Thread #1 [feastTrial] 5489 [core: 2] (Suspended : Signal : SIGSEGV:Segmentation fault)&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;mkl_feast_zfeast_hrci() at 0x7ffff617fedf&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;zfeast_hrci_() at 0x7ffff7959141&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;testAddition() at feastTrial.cpp:251 0x4047da&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;0x0&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;. Strangely enough: when declaring workc and work with new .... no problems occur.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;What am I missing here?&lt;/P&gt;

&lt;P&gt;I want to have all memory on the heap in order to cope with LARGE matrices.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2016 10:42:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zfeast-hrci-initialization-shows-strange-behaviour/m-p/1061921#M21705</guid>
      <dc:creator>Christian_M_3</dc:creator>
      <dc:date>2016-03-27T10:42:45Z</dc:date>
    </item>
    <item>
      <title>Hi Christian, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zfeast-hrci-initialization-shows-strange-behaviour/m-p/1061922#M21706</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://software.intel.com/en-us/user/1076403" style="font-size: 11px; line-height: 16.5px; background-color: rgb(238, 238, 238);"&gt;Christian&lt;/A&gt;,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;how do you declare the&amp;nbsp;&lt;EM style="font-size: 12px; line-height: 18px;"&gt;M0SQUARE? &amp;nbsp;Could you please provide us one test case?&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM style="font-size: 12px; line-height: 18px;"&gt;I use the&amp;nbsp;&lt;/EM&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;zexample_sparse_rci_c.c -&amp;gt; covert to CPP file. &amp;nbsp;with&amp;nbsp;&lt;/SPAN&gt;&lt;EM style="font-size: 12px; line-height: 18px;"&gt;MKL_Complex16 *Sq = new MKL_Complex16[M0SQUARE];&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;&lt;I&gt;It seems work fine. &amp;nbsp;I attached the cpp code for your reference.&amp;nbsp;&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;&lt;I&gt;Best Regards,&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;&lt;I&gt;Ying&amp;nbsp;&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2016 07:47:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zfeast-hrci-initialization-shows-strange-behaviour/m-p/1061922#M21706</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2016-03-28T07:47:55Z</dc:date>
    </item>
    <item>
      <title>Hello Ying,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zfeast-hrci-initialization-shows-strange-behaviour/m-p/1061923#M21707</link>
      <description>&lt;P&gt;Hello Ying,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;MKL_INT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M0;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;if (dimension &amp;lt; 500)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;M0=dimension*0.5;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;M0=dimension*0.1;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;int workSize = M0*dimension;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;MKL_INT M0StartValue = M0;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;MKL_INT M0SQUARE = M0*M0;&lt;/P&gt;

&lt;P&gt;The values in my testcase are dimension=495, M0= 247 and so on.&lt;/P&gt;

&lt;P&gt;One more thing I forgot to mention:&lt;/P&gt;

&lt;P&gt;I use the gcc compiler, (4.8.4) on ubuntu linux.&lt;/P&gt;

&lt;P&gt;Thanks for your help.&lt;/P&gt;

&lt;P&gt;Christian&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2016 10:00:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zfeast-hrci-initialization-shows-strange-behaviour/m-p/1061923#M21707</guid>
      <dc:creator>Christian_M_3</dc:creator>
      <dc:date>2016-03-28T10:00:54Z</dc:date>
    </item>
    <item>
      <title>OK. It seems to me that</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zfeast-hrci-initialization-shows-strange-behaviour/m-p/1061924#M21708</link>
      <description>&lt;P&gt;OK. It seems to me that cannot mix the declaration/allocation types with my version of gcc&lt;/P&gt;

&lt;P&gt;(i.e. having&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;MKL_Complex16&amp;nbsp; Aq[M0SQUARE]&lt;/EM&gt;; (where MOSquare is an integer) everything works fine.&lt;/P&gt;

&lt;P&gt;and&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;MKL_Complex16 *Sq = new MKL_Complex16[M0SQUARE];&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;in the program&lt;/P&gt;

&lt;P&gt;)&lt;/P&gt;

&lt;P&gt;replacing all declarations with new [] helped.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;BUT now comes the next problem:&lt;/P&gt;

&lt;P&gt;When trying to delete those arrays, the program crashes when trying to delete [] Sq; claiming the pointer would be invalid.&lt;/P&gt;

&lt;P&gt;Any ideas why this happens? All other pointers can be deleted properly.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2016 17:31:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zfeast-hrci-initialization-shows-strange-behaviour/m-p/1061924#M21708</guid>
      <dc:creator>Christian_M_3</dc:creator>
      <dc:date>2016-03-28T17:31:23Z</dc:date>
    </item>
    <item>
      <title>Hi Christian, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zfeast-hrci-initialization-shows-strange-behaviour/m-p/1061925#M21709</link>
      <description>&lt;P&gt;Hi Christian,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;is there any special compiler option in your CPP code? &amp;nbsp; or is there any special code (for example, &lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;delete [] Sq in while loop)&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;in your CPP code?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I add&lt;/P&gt;

&lt;P&gt;&amp;nbsp;printf( "Max of (conjugate transposed of X)*X-I %.15e \n", smax);&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;delete [] Sq;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; return 0;&lt;BR /&gt;
	}&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp;tried the command;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;$&lt;/SPAN&gt;source /opt/intel/compilers_and_libraries_2016.2.181/linux/mkl/bin/mklvars.sh intel64&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;$&lt;/SPAN&gt;g++ zexample_sparse_rci_c.cpp &amp;nbsp;-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lm&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;hu5@ivb01-ub:~/Merry$ ./a.out&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; FEAST ZFEAST_HRCI EXAMPLE PROGRAM&lt;BR /&gt;
	Sparse matrix size &amp;nbsp;10&lt;BR /&gt;
	&amp;nbsp;Search interval [ 2.000000000000000e+00, 1.200000000000000e+01 ]&lt;BR /&gt;
	Intel MKL Extended Eigensolvers: complex double precision driver&lt;BR /&gt;
	Intel MKL Extended Eigensolvers: List of input parameters fpm(1:64)-- if different from default&lt;BR /&gt;
	Intel MKL Extended Eigensolvers: fpm(1)=1&lt;BR /&gt;
	Intel MKL Extended Eigensolvers: fpm(6)=1&lt;/P&gt;

&lt;P&gt;..&lt;/P&gt;

&lt;P&gt;It run fines. &amp;nbsp;&lt;/P&gt;

&lt;P&gt;yhu5@ivb01-ub:~/Merry$ g++ --version&lt;BR /&gt;
	g++ (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Could you provide us a test main cpp file, so we can debug at our sides?&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 08:36:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/zfeast-hrci-initialization-shows-strange-behaviour/m-p/1061925#M21709</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2016-03-29T08:36:40Z</dc:date>
    </item>
  </channel>
</rss>

