<?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 Hi Boyuan,Sorry I wasn't in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Input-parameter-error-in-MKL-zfeast-hcsrgv-function/m-p/1185556#M29549</link>
    <description>&lt;P&gt;Hi Boyuan,&lt;BR /&gt;Sorry I wasn't clear.&lt;BR /&gt;&lt;BR /&gt;No, I meant starting counting elements of the matrix (and start your ia array) from 1 not from 0, so that for instance your ia array should look like: ia[0] = 1, ia[1] = 25 + 1, ..., ia[num_rows] = nnz + 1.&lt;BR /&gt;Same applied to ja.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Maria&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jun 2020 01:02:42 GMT</pubDate>
    <dc:creator>MariaZh</dc:creator>
    <dc:date>2020-06-02T01:02:42Z</dc:date>
    <item>
      <title>Input parameter error in MKL zfeast_hcsrgv function</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Input-parameter-error-in-MKL-zfeast-hcsrgv-function/m-p/1185553#M29546</link>
      <description>&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;I'm trying to use the zfeast function according with the EIGEN library to solve a generalized eigenvalue problem. However I met some input parameter errors.&lt;/P&gt;&lt;P&gt;Let's denote the generalized eigenvalue problem as M*x=lambda*B*x. For the hermitian matrix M, it is the coefficient matrix from finite difference method and&amp;nbsp;&amp;nbsp;I reserved 25 non-zero elements in each row, although some of the reserved elements might be zero for certain rows. For the fourth input, &lt;EM&gt;ia&lt;/EM&gt;, whose description is:&lt;/P&gt;&lt;P&gt;Array of length &lt;EM&gt;n&lt;/EM&gt;+1,&amp;nbsp;containing indices of elements in the array &lt;EM&gt;a&lt;/EM&gt;,&amp;nbsp;such that &lt;EM&gt;ia&lt;/EM&gt;[&lt;EM&gt;i&lt;/EM&gt;-1]&amp;nbsp;is the index in the array&amp;nbsp;a of the first non-zero element from the row &lt;EM&gt;i .&amp;nbsp;&lt;/EM&gt;The value of the last element &lt;EM&gt;ia&lt;/EM&gt;[&lt;EM&gt;n&lt;/EM&gt;] is equal to the number of non-zeros plus one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here the array &lt;EM&gt;a&lt;/EM&gt; is the CRS format storage of the non-zero elements in M. Since I reserved each row 25 non-zero elements, ia[0] = 0 and ia[1] = 25. However, I got the following error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;***Input check: i=1, ia&amp;lt;i&amp;gt;=0, ia&amp;lt;i+1&amp;gt;=25 are incompatible.&lt;/P&gt;&lt;P&gt;==&amp;gt; INFO code =: -104&lt;/P&gt;&lt;P&gt;Intel MKL ERROR: Parameter 4 was incorrect on entry to zfeast_hgsrgv.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anyone help to clarify what's going on here? In my opinion the input array ia is as expected, but somehow I still got this error message. Any kind of feedback would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Boyuan&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 05:13:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Input-parameter-error-in-MKL-zfeast-hcsrgv-function/m-p/1185553#M29546</guid>
      <dc:creator>zhang__boyuan</dc:creator>
      <dc:date>2020-06-01T05:13:49Z</dc:date>
    </item>
    <item>
      <title>Hi Boyuan,Can you please try</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Input-parameter-error-in-MKL-zfeast-hcsrgv-function/m-p/1185554#M29547</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Boyuan,&lt;BR /&gt;Can you please try converting your matrices to 1-based indexing?&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Maria&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 19:02:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Input-parameter-error-in-MKL-zfeast-hcsrgv-function/m-p/1185554#M29547</guid>
      <dc:creator>MariaZh</dc:creator>
      <dc:date>2020-06-01T19:02:03Z</dc:date>
    </item>
    <item>
      <title>Quote:Zhukova, Maria (Intel)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Input-parameter-error-in-MKL-zfeast-hcsrgv-function/m-p/1185555#M29548</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Zhukova, Maria (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi&amp;nbsp;Boyuan,&lt;BR /&gt;Can you please try converting your matrices to 1-based indexing?&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Maria&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks Maria! Did you mean add a dummy number as the first element in arrays a, ia and ja ( as well as b, ib, jb) ?&lt;/P&gt;&lt;P&gt;Boyuan&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 00:26:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Input-parameter-error-in-MKL-zfeast-hcsrgv-function/m-p/1185555#M29548</guid>
      <dc:creator>zhang__boyuan</dc:creator>
      <dc:date>2020-06-02T00:26:51Z</dc:date>
    </item>
    <item>
      <title>Hi Boyuan,Sorry I wasn't</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Input-parameter-error-in-MKL-zfeast-hcsrgv-function/m-p/1185556#M29549</link>
      <description>&lt;P&gt;Hi Boyuan,&lt;BR /&gt;Sorry I wasn't clear.&lt;BR /&gt;&lt;BR /&gt;No, I meant starting counting elements of the matrix (and start your ia array) from 1 not from 0, so that for instance your ia array should look like: ia[0] = 1, ia[1] = 25 + 1, ..., ia[num_rows] = nnz + 1.&lt;BR /&gt;Same applied to ja.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Maria&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 01:02:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Input-parameter-error-in-MKL-zfeast-hcsrgv-function/m-p/1185556#M29549</guid>
      <dc:creator>MariaZh</dc:creator>
      <dc:date>2020-06-02T01:02:42Z</dc:date>
    </item>
    <item>
      <title>Quote:Zhukova, Maria (Intel)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Input-parameter-error-in-MKL-zfeast-hcsrgv-function/m-p/1185557#M29550</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Zhukova, Maria (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Boyuan,&lt;BR /&gt;Sorry I wasn't clear.&lt;/P&gt;&lt;P&gt;No, I meant starting counting elements of the matrix (and start your ia array) from 1 not from 0, so that for instance your ia array should look like: ia[0] = 1, ia[1] = 25 + 1, ..., ia[num_rows] = nnz + 1.&lt;BR /&gt;Same applied to ja.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Maria&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Maria,&lt;/P&gt;&lt;P&gt;Thanks for the clarification.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added 1 on all&amp;nbsp;elements in ia and ja except ia[num_rows] ( same to ib and jb). I think the previous info = -104 problem is solved. However, I met a new problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the following codes to achieve adding 1 on each element in ja&lt;/P&gt;&lt;P&gt;for (int i = 0; i &amp;lt; nonzerosM; i++) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *(M_Inner + i) = *(M_Inner + i) + 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;P&gt;where M_Inner is the pointer generated by EIGEN which can be thought as the ja here. After I implement the above codes, I got the error message when calling the function zfeast:&lt;/P&gt;&lt;P&gt;Exception thrown at 0x03F1E1B6 (mkl_core.dll) in TestProj.exe: 0xC0000005: Access violation writing location 0x0052A240. occurred&lt;/P&gt;&lt;P&gt;If I omit these lines, there is no problem when&amp;nbsp;calling zfeast but only with info = -105 which indicates that ja is in wrong format. In other words, the similiar adding 1 procedure on ia, ib and jb don't cause this access violation problem. It only happens when I try to manipulate ja.&lt;/P&gt;&lt;P&gt;I searched on Google, but since I'm kind of new to C++, I still can't solve this problem. Is there any suggestions you might want me to try?&lt;/P&gt;&lt;P&gt;I truly appreciate your kind help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Boyuan&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2020 00:42:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Input-parameter-error-in-MKL-zfeast-hcsrgv-function/m-p/1185557#M29550</guid>
      <dc:creator>zhang__boyuan</dc:creator>
      <dc:date>2020-06-06T00:42:10Z</dc:date>
    </item>
  </channel>
</rss>

