<?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 pardiso(...) returns with -1 in the &amp;amp;error, but this doesn't help fix the problem in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-returns-with-1-in-the-amp-error-but-this-doesn-t-help/m-p/1426187#M33805</link>
    <description>&lt;P&gt;The code containing the following returns from pardiso with -1 in the error, saying 'something is wrong'.&lt;BR /&gt;&lt;BR /&gt;Obviously pardiso knows what is wrong.&amp;nbsp; &amp;nbsp;It is a shame it won't tell me.&lt;BR /&gt;&lt;BR /&gt;Furthermore there is a major lack of working examples of calling pardiso from C++ on Windows, so I can't even try another example to find out whether it is a source code problem, a link time problem, or a runtime problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a truely frustrating piece of software to use.&amp;nbsp; &amp;nbsp;Maybe that explains why all the major companies seem to be using another vendor's version -&amp;nbsp; I would to if I could get a license for it&amp;nbsp;&lt;A href="https://pardiso-project.org/manual/manual.pdf" target="_blank"&gt;https://pardiso-project.org/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;/Bevin&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;bool SolveforX__AX_equal_B__usingMKL(&lt;BR /&gt;SparseMatrixForMKL_FormatCSR &amp;amp; A,&lt;BR /&gt;DenseMatrixForMKLParadiso &amp;amp; X,&lt;BR /&gt;DenseMatrixForMKLParadiso &amp;amp; B)&lt;BR /&gt;{&lt;BR /&gt;CHECK(A.nRows == A.nCols); // A has to be symmetric&lt;BR /&gt;CHECK(A.nCols == X.nRows); // Since A X = B&lt;BR /&gt;CHECK(A.nRows == B.nRows);&lt;BR /&gt;CHECK(X.nCols == B.nCols);&lt;/P&gt;
&lt;P&gt;static size_t calls = 0;&lt;BR /&gt;if (!calls++) for (size_t n = 0; n &amp;lt; 64; n++) pt[n] = nullptr;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;static const MKL_INT maxfct = 1;&lt;BR /&gt;&lt;BR /&gt;static const MKL_INT mnum = 1;&lt;BR /&gt;const MKL_INT mtype = 2;&lt;BR /&gt;const MKL_INT *n;&lt;BR /&gt;const float *a;&lt;BR /&gt;const MKL_INT *ia;&lt;BR /&gt;const MKL_INT *ja;&lt;BR /&gt;A.cook(n, a, ia, ja);&lt;BR /&gt;CHECK(*n == A.nCols);&lt;BR /&gt;CHECK(*n == A.nRows);&lt;/P&gt;
&lt;P&gt;std::vector&amp;lt;MKL_INT&amp;gt; perm(*n);&lt;BR /&gt;std::fill(perm.begin(), perm.end(), 0);&lt;/P&gt;
&lt;P&gt;const MKL_INT nrhs = B.nCols;&lt;/P&gt;
&lt;P&gt;MKL_INT iparm[64];&lt;BR /&gt;{&lt;BR /&gt;for (size_t n = 0; n &amp;lt; 64; n++) iparm[n] = 0;&lt;BR /&gt;iparm[0] = 1; // we are filling in all the parameters&lt;BR /&gt;iparm[1] = 2; // Sequential nested dissection algorithm&lt;BR /&gt;iparm[7] = 2; // Maximum number of iterative refinement steps that the solver performs&lt;BR /&gt;iparm[9] = 13; // The default value for nonsymmetric matrices&lt;BR /&gt;iparm[10] = 1; // Enable scaling. Default for nonsymmetric matrices.&lt;BR /&gt;iparm[12] = 1; // Enable matching. Default for nonsymmetric matrices&lt;BR /&gt;iparm[17] = -1; // Enable reporting. The default value is -1.&lt;BR /&gt;iparm[26] = 1; // Enabble checking the input matrices&lt;BR /&gt;iparm[27] = 1; // single precision inputs and internal temporaries&lt;BR /&gt;iparm[34] = 1; // 1 means Row and col numbers start at 0, not 1&lt;BR /&gt;iparm[36] = 0; // Use CSR format for matrix storage.&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;MKL_INT msglvl = 1; // pardiso generates output, pardiso seems to modify this!&lt;BR /&gt;MKL_INT error = 0;&lt;/P&gt;
&lt;P&gt;auto const bData = B.data();&lt;BR /&gt;auto const xData = X.data();&lt;/P&gt;
&lt;P&gt;auto doPhase = [&amp;amp;](const MKL_INT phase) {&lt;BR /&gt;pardiso(&lt;BR /&gt;pt,&lt;BR /&gt;&amp;amp;maxfct,&lt;BR /&gt;&amp;amp;mnum,&lt;BR /&gt;&amp;amp;mtype,&lt;BR /&gt;&amp;amp;phase,&lt;BR /&gt;n,&lt;BR /&gt;a,&lt;BR /&gt;ia,&lt;BR /&gt;ja,&lt;BR /&gt;perm.data(),&lt;BR /&gt;&amp;amp;nrhs,&lt;BR /&gt;iparm,&lt;BR /&gt;&amp;amp;msglvl,&lt;BR /&gt;bData,&lt;BR /&gt;xData,&lt;BR /&gt;&amp;amp;error);&lt;/P&gt;
&lt;P&gt;CHECK(!error);&lt;BR /&gt;};&lt;/P&gt;
&lt;P&gt;doPhase(11);&lt;BR /&gt;doPhase(22);&lt;BR /&gt;doPhase(33);&lt;BR /&gt;doPhase(-1);&lt;/P&gt;
&lt;P&gt;return true;&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Sun, 30 Oct 2022 08:07:54 GMT</pubDate>
    <dc:creator>bevin_b_</dc:creator>
    <dc:date>2022-10-30T08:07:54Z</dc:date>
    <item>
      <title>pardiso(...) returns with -1 in the &amp;error, but this doesn't help fix the problem</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-returns-with-1-in-the-amp-error-but-this-doesn-t-help/m-p/1426187#M33805</link>
      <description>&lt;P&gt;The code containing the following returns from pardiso with -1 in the error, saying 'something is wrong'.&lt;BR /&gt;&lt;BR /&gt;Obviously pardiso knows what is wrong.&amp;nbsp; &amp;nbsp;It is a shame it won't tell me.&lt;BR /&gt;&lt;BR /&gt;Furthermore there is a major lack of working examples of calling pardiso from C++ on Windows, so I can't even try another example to find out whether it is a source code problem, a link time problem, or a runtime problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a truely frustrating piece of software to use.&amp;nbsp; &amp;nbsp;Maybe that explains why all the major companies seem to be using another vendor's version -&amp;nbsp; I would to if I could get a license for it&amp;nbsp;&lt;A href="https://pardiso-project.org/manual/manual.pdf" target="_blank"&gt;https://pardiso-project.org/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;/Bevin&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;bool SolveforX__AX_equal_B__usingMKL(&lt;BR /&gt;SparseMatrixForMKL_FormatCSR &amp;amp; A,&lt;BR /&gt;DenseMatrixForMKLParadiso &amp;amp; X,&lt;BR /&gt;DenseMatrixForMKLParadiso &amp;amp; B)&lt;BR /&gt;{&lt;BR /&gt;CHECK(A.nRows == A.nCols); // A has to be symmetric&lt;BR /&gt;CHECK(A.nCols == X.nRows); // Since A X = B&lt;BR /&gt;CHECK(A.nRows == B.nRows);&lt;BR /&gt;CHECK(X.nCols == B.nCols);&lt;/P&gt;
&lt;P&gt;static size_t calls = 0;&lt;BR /&gt;if (!calls++) for (size_t n = 0; n &amp;lt; 64; n++) pt[n] = nullptr;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;static const MKL_INT maxfct = 1;&lt;BR /&gt;&lt;BR /&gt;static const MKL_INT mnum = 1;&lt;BR /&gt;const MKL_INT mtype = 2;&lt;BR /&gt;const MKL_INT *n;&lt;BR /&gt;const float *a;&lt;BR /&gt;const MKL_INT *ia;&lt;BR /&gt;const MKL_INT *ja;&lt;BR /&gt;A.cook(n, a, ia, ja);&lt;BR /&gt;CHECK(*n == A.nCols);&lt;BR /&gt;CHECK(*n == A.nRows);&lt;/P&gt;
&lt;P&gt;std::vector&amp;lt;MKL_INT&amp;gt; perm(*n);&lt;BR /&gt;std::fill(perm.begin(), perm.end(), 0);&lt;/P&gt;
&lt;P&gt;const MKL_INT nrhs = B.nCols;&lt;/P&gt;
&lt;P&gt;MKL_INT iparm[64];&lt;BR /&gt;{&lt;BR /&gt;for (size_t n = 0; n &amp;lt; 64; n++) iparm[n] = 0;&lt;BR /&gt;iparm[0] = 1; // we are filling in all the parameters&lt;BR /&gt;iparm[1] = 2; // Sequential nested dissection algorithm&lt;BR /&gt;iparm[7] = 2; // Maximum number of iterative refinement steps that the solver performs&lt;BR /&gt;iparm[9] = 13; // The default value for nonsymmetric matrices&lt;BR /&gt;iparm[10] = 1; // Enable scaling. Default for nonsymmetric matrices.&lt;BR /&gt;iparm[12] = 1; // Enable matching. Default for nonsymmetric matrices&lt;BR /&gt;iparm[17] = -1; // Enable reporting. The default value is -1.&lt;BR /&gt;iparm[26] = 1; // Enabble checking the input matrices&lt;BR /&gt;iparm[27] = 1; // single precision inputs and internal temporaries&lt;BR /&gt;iparm[34] = 1; // 1 means Row and col numbers start at 0, not 1&lt;BR /&gt;iparm[36] = 0; // Use CSR format for matrix storage.&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;MKL_INT msglvl = 1; // pardiso generates output, pardiso seems to modify this!&lt;BR /&gt;MKL_INT error = 0;&lt;/P&gt;
&lt;P&gt;auto const bData = B.data();&lt;BR /&gt;auto const xData = X.data();&lt;/P&gt;
&lt;P&gt;auto doPhase = [&amp;amp;](const MKL_INT phase) {&lt;BR /&gt;pardiso(&lt;BR /&gt;pt,&lt;BR /&gt;&amp;amp;maxfct,&lt;BR /&gt;&amp;amp;mnum,&lt;BR /&gt;&amp;amp;mtype,&lt;BR /&gt;&amp;amp;phase,&lt;BR /&gt;n,&lt;BR /&gt;a,&lt;BR /&gt;ia,&lt;BR /&gt;ja,&lt;BR /&gt;perm.data(),&lt;BR /&gt;&amp;amp;nrhs,&lt;BR /&gt;iparm,&lt;BR /&gt;&amp;amp;msglvl,&lt;BR /&gt;bData,&lt;BR /&gt;xData,&lt;BR /&gt;&amp;amp;error);&lt;/P&gt;
&lt;P&gt;CHECK(!error);&lt;BR /&gt;};&lt;/P&gt;
&lt;P&gt;doPhase(11);&lt;BR /&gt;doPhase(22);&lt;BR /&gt;doPhase(33);&lt;BR /&gt;doPhase(-1);&lt;/P&gt;
&lt;P&gt;return true;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Sun, 30 Oct 2022 08:07:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-returns-with-1-in-the-amp-error-but-this-doesn-t-help/m-p/1426187#M33805</guid>
      <dc:creator>bevin_b_</dc:creator>
      <dc:date>2022-10-30T08:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: pardiso(...) returns with -1 in the &amp;error, but this doesn't help fix the problem</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-returns-with-1-in-the-amp-error-but-this-doesn-t-help/m-p/1426196#M33806</link>
      <description>&lt;P&gt;I finally stumbled across the fact that pardiso writes errors to stdout!&amp;nbsp; &amp;nbsp;It would have been helpful if the manual had mentioned this fact.&amp;nbsp; I work in VS environment creating tests and the stdout is not going somewhere that I usually look!&lt;BR /&gt;&lt;BR /&gt;Now I can see the error messages, I can see what my issues are and I have a trivial case working&lt;/P&gt;</description>
      <pubDate>Sun, 30 Oct 2022 10:01:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-returns-with-1-in-the-amp-error-but-this-doesn-t-help/m-p/1426196#M33806</guid>
      <dc:creator>bevin_b_</dc:creator>
      <dc:date>2022-10-30T10:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: pardiso(...) returns with -1 in the &amp;error, but this doesn't help fix the problem</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-returns-with-1-in-the-amp-error-but-this-doesn-t-help/m-p/1426994#M33815</link>
      <description>&lt;P&gt;Hi Bevin,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;&amp;nbsp;It would have been helpful if the manual had mentioned this fact. I work in VS environment creating tests and the stdout is not going somewhere that I usually look!&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;We regret the inconvenience caused.&lt;/P&gt;
&lt;P&gt;We are working on your issue and will get back to you soon with an update regarding the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;pardiso with -1 in the error, saying 'something is wrong'&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;According to the MKL developer reference manual if the error value is -1 it indicates that the input is inconsistent.&lt;/P&gt;
&lt;P&gt;You can refer to the below link for more details&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/sparse-solver-routines/onemkl-pardiso-parallel-direct-sparse-solver-iface/pardiso.html" target="_blank" rel="noopener"&gt;https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/sparse-solver-routines/onemkl-pardiso-parallel-direct-sparse-solver-iface/pardiso.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additionally, could you please let us know the MKL version you are using?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Vidya.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 06:28:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-returns-with-1-in-the-amp-error-but-this-doesn-t-help/m-p/1426994#M33815</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-11-02T06:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: pardiso(...) returns with -1 in the &amp;error, but this doesn't help fix the problem</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-returns-with-1-in-the-amp-error-but-this-doesn-t-help/m-p/1590902#M36049</link>
      <description>&lt;P&gt;Hi Bevin,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the examples of oneMKL Pardiso, we have many in the package at $MKLROOT/share/doc/mkl/examples/examples_core_c.zip (for oneMKL versions after 2024.0). You can find them in the sparse_directsolvers folder.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the error message, please refer to Vidya's post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Fengrui&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 22:39:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-returns-with-1-in-the-amp-error-but-this-doesn-t-help/m-p/1590902#M36049</guid>
      <dc:creator>Fengrui</dc:creator>
      <dc:date>2024-04-19T22:39:04Z</dc:date>
    </item>
  </channel>
</rss>

