<?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 Re: 64-bit interface PARDISO and PARDISO_64 in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/64-bit-interface-PARDISO-and-PARDISO-64/m-p/1682071#M37059</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yes, you are right. You can use pardisoinit with pardiso_64, if using ILP64 linking. However, with LP64 linking, using pardisoinit and pardiso_64 together is incorrect and might even result in a segfault.&amp;nbsp;In the future we might add pardisoinit_64, but currently we don't have it. As a workaround you could initialize the handles and iparm manually in this case, i.e., instead of pardisoinit you can do something like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;for ( i = 0; i &amp;lt; 64; i++ )
{
     pt[i] = 0;
}
for ( i = 0; i &amp;lt; 64; i++ )
{
     iparm[i] = 0;
}
iparam[0] = 1;
//Fill iparm values
 iparam[1] = 2;
 ...&lt;/LI-CODE&gt;&lt;P&gt;For default values of iparm, please refer to &lt;A href="https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2025-1/pardiso-iparm-parameter.html" target="_blank"&gt;pardiso iparm Parameter&lt;/A&gt;.&lt;SPAN&gt;&amp;nbsp;For examples on this kind of initialization please refer to oneMKL examples (in&amp;nbsp;&lt;FONT face="courier new,courier"&gt;share/doc/mkl/examples/examples_core_c.tgz)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding question 1 on templating and pardiso() function: Yes, you can use templating strategy for integer type and be careful with linking. However, since pardiso() function just uses one integer type depending on linking, it might not be that useful. It might be better to use MKL_INT instead.&lt;/P&gt;&lt;P&gt;The other possibility is to use pardiso() and pardiso_64() together with lp64 interface. With this approach, you could template for integer type and select between pardiso() and pardiso_64() variant depending on the integer type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this answers your questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
    <pubDate>Thu, 10 Apr 2025 16:15:56 GMT</pubDate>
    <dc:creator>c_sim</dc:creator>
    <dc:date>2025-04-10T16:15:56Z</dc:date>
    <item>
      <title>64-bit interface PARDISO and PARDISO_64</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/64-bit-interface-PARDISO-and-PARDISO-64/m-p/1680275#M37032</link>
      <description>&lt;P&gt;The signature of `pardiso` in `mkl_pardiso.h` reads&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;```c&lt;/P&gt;&lt;P&gt;void pardiso( _MKL_DSS_HANDLE_t pt, const MKL_INT *maxfct, const MKL_INT *mnum,&lt;BR /&gt;const MKL_INT *mtype, const MKL_INT *phase, const MKL_INT *n,&lt;BR /&gt;const void *a, const MKL_INT *ia, const MKL_INT *ja,&lt;BR /&gt;MKL_INT *perm, const MKL_INT *nrhs, MKL_INT *iparm,&lt;BR /&gt;const MKL_INT *msglvl, void *b, void *x, MKL_INT *error );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void pardiso_64( _MKL_DSS_HANDLE_t pt, const long long int *maxfct,&lt;BR /&gt;const long long int *mnum, const long long int *mtype,&lt;BR /&gt;const long long int *phase, const long long int *n,&lt;BR /&gt;const void *a, const long long int *ia,&lt;BR /&gt;const long long int *ja, long long int *perm,&lt;BR /&gt;const long long int *nrhs, long long int *iparm,&lt;BR /&gt;const long long int *msglvl, void *b, void *x,&lt;BR /&gt;long long int *error );&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;When using ilp64 interface, `MKL_INT` is `long long`, making the signatures indifferent.&lt;/P&gt;&lt;P&gt;Is this intended?&lt;/P&gt;&lt;P&gt;It makes more sense that `pardiso` is using 32-bit int, while `pardiso_64` uses 64-bit int, otherwise why two functions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it is intended and correct, does it mean `pardiso` can be called when ilp64 is used?&lt;/P&gt;&lt;P&gt;If it is not intended, shall `MKL_INT` be replaced by `int`?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 22:24:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/64-bit-interface-PARDISO-and-PARDISO-64/m-p/1680275#M37032</guid>
      <dc:creator>tlcfem</dc:creator>
      <dc:date>2025-04-03T22:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: 64-bit interface PARDISO and PARDISO_64</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/64-bit-interface-PARDISO-and-PARDISO-64/m-p/1680281#M37033</link>
      <description>&lt;P&gt;Howdy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the last few years, we have been introducing the xyz_64() interfaces, to be compared with the xyz() interface (xyz = pardiso in your case), with the intent that MKL_INT is used for integer arguments in xyz() APIs and MKL_INT64 is used for xyz_64().&amp;nbsp; Practically this means that for ilp64 linking, the arguments are exactly the same, as MKL_INT is a signed 64 bit integer with ilp64 and a signed 32 bit integer with lp64 and MKL_ILP64 is always a signed 64 bit integer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you happen to notices that the arguments are not the same for ilp64, then please let us know and it may be a bug on our part....&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The real useful intent was to allow users linking with oneMKL using lp64 to use 32 bit integers for calls to xyz and 64 bit integers for calls to xyz_64 in the same application.&amp;nbsp; This is especially important in sparse linear algebra (like pardiso) where the dimension and number of elements stored in the sparse matrix determines which integer type makes the most sense to use to represent it, with the recommendation to pick the smallest available integer type that can represent your matrix workload for get better performance.&lt;/P&gt;&lt;P&gt;So yes, in ilp64, they are essentially the same, but in lp64, it opens up a wider range of solutions.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Spencer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 23:03:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/64-bit-interface-PARDISO-and-PARDISO-64/m-p/1680281#M37033</guid>
      <dc:creator>Spencer_P_Intel</dc:creator>
      <dc:date>2025-04-03T23:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: 64-bit interface PARDISO and PARDISO_64</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/64-bit-interface-PARDISO-and-PARDISO-64/m-p/1680291#M37034</link>
      <description>&lt;P&gt;Thank you for the explanation.&lt;/P&gt;&lt;P&gt;Two follow-up questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. I presume it is then logical to use one single function in CPP templates, for example,&lt;/P&gt;&lt;P&gt;```cpp&lt;/P&gt;&lt;P&gt;template&amp;lt;int_t T&amp;gt; void solver_wrapper(...) {&lt;/P&gt;&lt;P&gt;T mtype;&lt;/P&gt;&lt;P&gt;T msglvl;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;pardiso(...);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;For T being either `int` or `long long`, assuming linking proper interface.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. The documentation states: `The &lt;SPAN class=""&gt;pardisoinit&lt;/SPAN&gt; routine cannot be used together with the &lt;SPAN class=""&gt;pardiso_64&lt;/SPAN&gt; routine.`, See: &lt;A href="https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2025-1/pardisoinit.html#GUID-C16BFBCA-EF1C-4CDB-BC73-41655B6DD8F5" target="_blank" rel="noopener"&gt;https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2025-1/pardisoinit.html#GUID-C16BFBCA-EF1C-4CDB-BC73-41655B6DD8F5&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If pardiso and pardiso_64 are identical with ilp64, what makes `&lt;SPAN class=""&gt;pardisoinit&lt;/SPAN&gt;` not accessible?&lt;/P&gt;&lt;P&gt;The signature is&lt;/P&gt;&lt;P&gt;```c&lt;/P&gt;&lt;P&gt;void pardisoinit( _MKL_DSS_HANDLE_t pt, const MKL_INT *mtype, MKL_INT *iparm );&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 23:47:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/64-bit-interface-PARDISO-and-PARDISO-64/m-p/1680291#M37034</guid>
      <dc:creator>tlcfem</dc:creator>
      <dc:date>2025-04-03T23:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: 64-bit interface PARDISO and PARDISO_64</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/64-bit-interface-PARDISO-and-PARDISO-64/m-p/1680292#M37035</link>
      <description>&lt;P&gt;Or maybe it means `&lt;SPAN class=""&gt;pardisoinit&lt;/SPAN&gt;` cannot be used to initialize buffers for `&lt;SPAN class=""&gt;pardiso_64&lt;/SPAN&gt;` with &lt;STRONG&gt;lp64&lt;/STRONG&gt; interface? (Guess it will only &lt;STRIKE&gt;allocate&lt;/STRIKE&gt; initialize half the size required?)&lt;/P&gt;&lt;P&gt;For ilp64 it is just fine?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 23:56:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/64-bit-interface-PARDISO-and-PARDISO-64/m-p/1680292#M37035</guid>
      <dc:creator>tlcfem</dc:creator>
      <dc:date>2025-04-03T23:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: 64-bit interface PARDISO and PARDISO_64</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/64-bit-interface-PARDISO-and-PARDISO-64/m-p/1682071#M37059</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yes, you are right. You can use pardisoinit with pardiso_64, if using ILP64 linking. However, with LP64 linking, using pardisoinit and pardiso_64 together is incorrect and might even result in a segfault.&amp;nbsp;In the future we might add pardisoinit_64, but currently we don't have it. As a workaround you could initialize the handles and iparm manually in this case, i.e., instead of pardisoinit you can do something like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;for ( i = 0; i &amp;lt; 64; i++ )
{
     pt[i] = 0;
}
for ( i = 0; i &amp;lt; 64; i++ )
{
     iparm[i] = 0;
}
iparam[0] = 1;
//Fill iparm values
 iparam[1] = 2;
 ...&lt;/LI-CODE&gt;&lt;P&gt;For default values of iparm, please refer to &lt;A href="https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2025-1/pardiso-iparm-parameter.html" target="_blank"&gt;pardiso iparm Parameter&lt;/A&gt;.&lt;SPAN&gt;&amp;nbsp;For examples on this kind of initialization please refer to oneMKL examples (in&amp;nbsp;&lt;FONT face="courier new,courier"&gt;share/doc/mkl/examples/examples_core_c.tgz)&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding question 1 on templating and pardiso() function: Yes, you can use templating strategy for integer type and be careful with linking. However, since pardiso() function just uses one integer type depending on linking, it might not be that useful. It might be better to use MKL_INT instead.&lt;/P&gt;&lt;P&gt;The other possibility is to use pardiso() and pardiso_64() together with lp64 interface. With this approach, you could template for integer type and select between pardiso() and pardiso_64() variant depending on the integer type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this answers your questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 16:15:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/64-bit-interface-PARDISO-and-PARDISO-64/m-p/1682071#M37059</guid>
      <dc:creator>c_sim</dc:creator>
      <dc:date>2025-04-10T16:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: 64-bit interface PARDISO and PARDISO_64</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/64-bit-interface-PARDISO-and-PARDISO-64/m-p/1682076#M37060</link>
      <description>&lt;P&gt;Thank you both&amp;nbsp;&lt;SPAN&gt;Spencer and Chris!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 16:35:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/64-bit-interface-PARDISO-and-PARDISO-64/m-p/1682076#M37060</guid>
      <dc:creator>tlcfem</dc:creator>
      <dc:date>2025-04-10T16:35:15Z</dc:date>
    </item>
  </channel>
</rss>

