<?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: Intel MKL Pardiso, LP64, and ILP64 Interfaces in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-Pardiso-LP64-and-ILP64-Interfaces/m-p/891318#M10444</link>
    <description>Well, that was underwhelming. I thought maybe Intel MKL team might have responded.&lt;BR /&gt;I'll just post to IPS.&lt;BR /&gt;-Brian&lt;BR /&gt;</description>
    <pubDate>Thu, 05 Mar 2009 23:04:22 GMT</pubDate>
    <dc:creator>brianlamm</dc:creator>
    <dc:date>2009-03-05T23:04:22Z</dc:date>
    <item>
      <title>Intel MKL Pardiso, LP64, and ILP64 Interfaces</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-Pardiso-LP64-and-ILP64-Interfaces/m-p/891317#M10443</link>
      <description>The Intel MKL user guide and the Intel MKL-supplied Fortran 90/95 interface to Pardiso (mkl_pardiso.f90) appear to be in contradiction.&lt;BR /&gt;&lt;BR /&gt;On page 3-5 of MKL User Guide it reads: &lt;BR /&gt;&lt;BR /&gt;"You may alternatively use other 64-bit types for the integer parameters that must be&lt;BR /&gt;64-bit in ILP64. For example, with Intel compilers, you may use types:&lt;BR /&gt; INTEGER(KIND=8) for Fortran&lt;BR /&gt; long long int for C/C++&lt;BR /&gt;Note that code written this way will &lt;STRONG&gt;not work&lt;/STRONG&gt; for the LP64 interface. Table 3-4 summarizes&lt;BR /&gt;usage of the integer types."&lt;BR /&gt;(bold mine)&lt;BR /&gt;&lt;BR /&gt;First, this seems odd: if one is using the ILP64 interface (linking to *ilp64* libraries and using /4I8 in build line), then simple INTEGER declarations are 8-byte (64 bit) by default, and so "INTEGER(KIND=8) for Fortran" is redundant (not needed). So that's confusing, and I would like clarification of why that statement is even there.&lt;BR /&gt;&lt;BR /&gt;Now, Pardiso is supposed to work with either the LP64 or the ILP64 interface. However, in the MKL-supplied .f90 file (in the MKL-provided interface directory) for the interface to Pardiso (mkl_pardiso.f90) there is, what amounts to, an explicit specification of INTEGER(KIND=8). This is in flat contradiction to the above-quoted verbiage out of the MKL User Guide. The User guide reads it does not go into specifics of what integer types are used where either the ILP64 or LP64 interface is used, and recommends to the reader to use the MKL-provided intefaces to determine what INTEGERs default to. So that's what I did, I looked into mkl_pardiso.f90, and in that file one finds:&lt;BR /&gt;&lt;BR /&gt; MODULE MKL_PARDISO_PRIVATE&lt;BR /&gt; TYPE MKL_PARDISO_HANDLE; INTEGER(&lt;STRONG&gt;KIND=8&lt;/STRONG&gt;) DUMMY; END TYPE&lt;BR /&gt; END MODULE MKL_PARDISO_PRIVATE&lt;BR /&gt;&lt;BR /&gt; MODULE MKL_PARDISO&lt;BR /&gt; USE MKL_PARDISO_PRIVATE&lt;BR /&gt;&lt;BR /&gt;!&lt;BR /&gt;! Subroutine prototype for PARDISO&lt;BR /&gt;!&lt;BR /&gt;&lt;BR /&gt; INTERFACE&lt;BR /&gt; SUBROUTINE PARDISO( PT, MAXFCT, MNUM, MTYPE, PHASE, N, A, IA, JA, PERM, NRHS, IPARM, MSGLVL, B, X, ERROR )&lt;BR /&gt; USE MKL_PARDISO_PRIVATE&lt;BR /&gt; TYPE(MKL_PARDISO_HANDLE), INTENT(INOUT) :: PT(*)&lt;BR /&gt; INTEGER,          INTENT(IN)    :: MAXFCT&lt;BR /&gt; INTEGER,          INTENT(IN)    :: MNUM&lt;BR /&gt; INTEGER,          INTENT(IN)    :: MTYPE&lt;BR /&gt; INTEGER,          INTENT(IN)    :: PHASE&lt;BR /&gt; INTEGER,          INTENT(IN)    :: N&lt;BR /&gt; INTEGER,          INTENT(IN)    :: IA(*)&lt;BR /&gt; INTEGER,          INTENT(IN)    :: JA(*)&lt;BR /&gt; INTEGER,          INTENT(IN)    :: PERM(*)&lt;BR /&gt; INTEGER,          INTENT(IN)    :: NRHS&lt;BR /&gt; INTEGER,          INTENT(INOUT) :: IPARM(*)&lt;BR /&gt; INTEGER,          INTENT(IN)    :: MSGLVL&lt;BR /&gt; INTEGER,          INTENT(OUT)   :: ERROR&lt;BR /&gt; REAL(KIND=8),             INTENT(IN)    :: A(*)&lt;BR /&gt; REAL(KIND=8),             INTENT(INOUT) :: B(*)&lt;BR /&gt; REAL(KIND=8),             INTENT(OUT)   :: X(*)&lt;BR /&gt; END SUBROUTINE PARDISO&lt;BR /&gt; END INTERFACE&lt;BR /&gt;&lt;BR /&gt; END MODULE MKL_PARDISO&lt;BR /&gt;&lt;BR /&gt;So, there it is, the Pardiso "pointer" "PT" is a derived type whose sole component is an &lt;STRONG&gt;8-byte&lt;/STRONG&gt; INTEGER regardless of whether ILP64 or LP64 interface is used, in direct contradiction to MKL User Guide's own warning this will &lt;STRONG&gt;not work&lt;/STRONG&gt; if used with LP64 interface, but this MKL-supplied Pardiso interface is advertised, in MKL User Guide, as being &lt;STRONG&gt;compatible&lt;/STRONG&gt; with both ILP64 and &lt;STRONG&gt;LP64&lt;/STRONG&gt; interfaces.&lt;BR /&gt;&lt;BR /&gt;So, which is correct, the MKL-supplied Fortran 90/95 interface or the User Guide?&lt;BR /&gt;&lt;BR /&gt;-Brian&lt;BR /&gt;</description>
      <pubDate>Sun, 01 Mar 2009 21:10:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-Pardiso-LP64-and-ILP64-Interfaces/m-p/891317#M10443</guid>
      <dc:creator>brianlamm</dc:creator>
      <dc:date>2009-03-01T21:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Intel MKL Pardiso, LP64, and ILP64 Interfaces</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-Pardiso-LP64-and-ILP64-Interfaces/m-p/891318#M10444</link>
      <description>Well, that was underwhelming. I thought maybe Intel MKL team might have responded.&lt;BR /&gt;I'll just post to IPS.&lt;BR /&gt;-Brian&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Mar 2009 23:04:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-Pardiso-LP64-and-ILP64-Interfaces/m-p/891318#M10444</guid>
      <dc:creator>brianlamm</dc:creator>
      <dc:date>2009-03-05T23:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Intel MKL Pardiso, LP64, and ILP64 Interfaces</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-Pardiso-LP64-and-ILP64-Interfaces/m-p/891319#M10445</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/357267"&gt;brianlamm&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;Well, that was underwhelming. I thought maybe Intel MKL team might have responded.&lt;BR /&gt;I'll just post to IPS.&lt;BR /&gt;-Brian&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P style="text-align: justify;"&gt;&lt;BR /&gt;Hi Brian, &lt;BR /&gt;&lt;BR /&gt;We will investigate this. Butthe Pardiso's pt pointer isvery special casefrom the ILPvs. LP point of view.&lt;BR /&gt;As you see in the manual, the parametermust be&lt;BR /&gt;INTEGER*4 for 32 -bit operating systems; // or 32 bit applicaton&lt;BR /&gt;INTEGER*8 for 64 -bit operating systems; // or 64 bit application, either ILP64or LP64. &lt;BR /&gt;Array, DIMENSION (64)&lt;BR /&gt;On entry, solver internal data address pointer. These addresses are passed to the solver and all related internal&lt;BR /&gt;memory management is organized through this pointer. &lt;BR /&gt;&lt;BR /&gt;Thus &lt;BR /&gt;C.. Internal solver memory pointer for 64-bit architectures&lt;BR /&gt;C.. INTEGER*8 pt(64)&lt;BR /&gt;C.. Internal solver memory pointer for 32-bit architectures&lt;BR /&gt;C.. INTEGER*4 pt(64)&lt;BR /&gt;C.. This is OK in both cases&lt;BR /&gt;INTEGER*8 pt(64)&lt;BR /&gt;&lt;BR /&gt;here we claimed the pt INTEGER(KIND=8) ismainly from the view of 32 bit vs. 64bit. &lt;BR /&gt;&lt;BR /&gt;Soas my unterstand,the&lt;STRONG&gt; "not work"&lt;/STRONG&gt; if used with LP64 interface here may mean&lt;BR /&gt;for most of other MKL functions, whichtake 32bit interger as parameter under LP interface, if claim &lt;BR /&gt; INTEGER(KIND=8) for Fortran&lt;BR /&gt; long long int for C/C++&lt;BR /&gt;to useLP64 interface library will cause error. But looks ambiguous here.I will check this again. &lt;BR /&gt;&lt;BR /&gt;For pardiso pt parameter, which require 64bit intergeras input whatever ILP 64 interface and LP64 interface,then we define it as INTEGER(KIND=8), as a result,it can workunder IA32, ILP64 and LP64 interface.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Ying&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2009 02:15:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-Pardiso-LP64-and-ILP64-Interfaces/m-p/891319#M10445</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2009-03-06T02:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Intel MKL Pardiso, LP64, and ILP64 Interfaces</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-Pardiso-LP64-and-ILP64-Interfaces/m-p/891320#M10446</link>
      <description>&lt;P&gt;Hi Brian,&lt;BR /&gt;&lt;BR /&gt;Let me also clarify this issue. pt is the special PARDISO parameter. Original PARDISO doc says that "...pt is the internal data address pointer. The integer length should be 4-byte on 32-bit operating memory an 8-byte on 64-bit operating systems". So the type of pt is determined by operating systems but not LP64 or ILP64 interfaces.&lt;/P&gt;
&lt;P&gt;Consequently, this interface will not work on IA32 systems, so there is a bug in the PARDISO docs.It will be fixed in nearest builds.&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Sergey&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2009 14:58:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-Pardiso-LP64-and-ILP64-Interfaces/m-p/891320#M10446</guid>
      <dc:creator>Sergey_P_Intel2</dc:creator>
      <dc:date>2009-03-06T14:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Intel MKL Pardiso, LP64, and ILP64 Interfaces</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-Pardiso-LP64-and-ILP64-Interfaces/m-p/891321#M10447</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Wow, from underwhelming to overwhelming, thanks much Ying and Sergey.&lt;BR /&gt;&lt;BR /&gt;I'm taking away from this defining the componenet "dummy" of the derived type "mkl_pardiso_handle" as INTEGER(8)) or INTEGER(SELECTED_INT_KIND(12)) will work with both the ILP and LP interfacs, and either of those interfaces are only use for an Intel64 or and IA64 target.&lt;BR /&gt;&lt;BR /&gt;But what I'm still confused about is whether using INTEGER(8) will allow Pardiso to work correctly on IA32 target, where neither LP nor ILP interfaces are used. It appears Ying posits yes and Sergey posits no.&lt;BR /&gt;&lt;BR /&gt;Thanks to you both for the helpful replies.&lt;BR /&gt;&lt;BR /&gt;-Brian &lt;BR /&gt;</description>
      <pubDate>Sat, 07 Mar 2009 15:06:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-Pardiso-LP64-and-ILP64-Interfaces/m-p/891321#M10447</guid>
      <dc:creator>brianlamm</dc:creator>
      <dc:date>2009-03-07T15:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Intel MKL Pardiso, LP64, and ILP64 Interfaces</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-Pardiso-LP64-and-ILP64-Interfaces/m-p/891322#M10448</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/357267"&gt;brianlamm&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;Wow, from underwhelming to overwhelming, thanks much Ying and Sergey.&lt;BR /&gt;&lt;BR /&gt;I'm taking away from this defining the componenet "dummy" of the derived type "mkl_pardiso_handle" as INTEGER(8)) or INTEGER(SELECTED_INT_KIND(12)) will work with both the ILP and LP interfacs, and either of those interfaces are only use for an Intel64 or and IA64 target.&lt;BR /&gt;&lt;BR /&gt;But what I'm still confused about is whether using INTEGER(8) will allow Pardiso to work correctly on IA32 target, where neither LP nor ILP interfaces are used. It appears Ying posits yes and Sergey posits no.&lt;BR /&gt;&lt;BR /&gt;Thanks to you both for the helpful replies.&lt;BR /&gt;&lt;BR /&gt;-Brian &lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Hi Brian, &lt;BR /&gt;&lt;BR /&gt;Thank you for pointing out this. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;From the view of test and programming, INTEGER(8) works on all architectures (&lt;STRONG&gt;IA32&lt;/STRONG&gt;, LP64, ILP64) practically. The explicit specification of INTEGER(KIND=8) in mkl_pardiso.f90cansimply the interface declaration.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But it is contradict with MKL documentations, &lt;BR /&gt;&lt;BR /&gt;Namely, MKL manual said:&lt;BR /&gt;&lt;BR /&gt;pt INTEGER*4 for 32 -bit operating systems;&lt;BR /&gt;&lt;BR /&gt;INTEGER*8 for 64 -bit operating systems;&lt;BR /&gt;&lt;BR /&gt;Let's take this as common rules. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;So from the theoretical point of view, Sergey is right. We shouldprovide F90 interface for IA32 with INTEGER (4) pt in order to coincide with other interfaces and MKL docs. Or mentionedthisin MKL documentation&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Ying &lt;BR /&gt;</description>
      <pubDate>Wed, 11 Mar 2009 09:05:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-Pardiso-LP64-and-ILP64-Interfaces/m-p/891322#M10448</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2009-03-11T09:05:51Z</dc:date>
    </item>
    <item>
      <title>The help file also says that</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-Pardiso-LP64-and-ILP64-Interfaces/m-p/891323#M10449</link>
      <description>&lt;P&gt;The help file also says that the memory pointer array PT must be initialized to zero. The integer component if the type MKL_PARDISO_HANDLE is called DUMMY. It is not initialized so presumably the user must add coding to do this?&lt;/P&gt;

&lt;P&gt;Why not be more explicit in the help file rather than make users dig around for the difinition of what MKL_PARDISO_HANDLE contains?&lt;/P&gt;

&lt;P&gt;Or perhaps modify the definition to integer(INT_PTR_KIND()) :: DUMMY = 0.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2016 08:56:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-Pardiso-LP64-and-ILP64-Interfaces/m-p/891323#M10449</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2016-12-16T08:56:00Z</dc:date>
    </item>
    <item>
      <title>Quote:Andrew Smith wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-Pardiso-LP64-and-ILP64-Interfaces/m-p/891324#M10450</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Andrew Smith wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The help file also says that the memory pointer array PT must be initialized to zero. The integer component if the type MKL_PARDISO_HANDLE is called DUMMY. It is not initialized so presumably the user must add coding to do this?&lt;/P&gt;

&lt;P&gt;Why not be more explicit in the help file rather than make users dig around for the difinition of what MKL_PARDISO_HANDLE contains?&lt;/P&gt;

&lt;P&gt;Or perhaps modify the definition to integer(INT_PTR_KIND()) :: DUMMY = 0.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;This is one of those instances where the declaration of the type of one of the arguments is no longer the same (in a compiler's view) as it was a few years ago. I, too, was caught unawares about the change when using one of the older Pardiso examples that I had modified and later attempted to use with a newer version of MKL.&lt;/P&gt;

&lt;P&gt;Changing the type declaration to add initialization to zero, as you suggested, will not be sufficient. That is because a program that uses Pardiso may solve more than one problem using Pardiso, and your suggested initialization will work only for the sequence of Pardiso calls pertaining to the first problem.&lt;/P&gt;

&lt;P&gt;As you can see in some the MKL example source files, you can do&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp;DO i = 1, 64&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PT(i)%DUMMY = 0&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp;END DO&lt;/P&gt;

&lt;P&gt;Or, if calling from C, call memset() to set the 256 (IA32) or 512 (X64) bytes to zero.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2016 09:31:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-Pardiso-LP64-and-ILP64-Interfaces/m-p/891324#M10450</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2016-12-16T09:31:11Z</dc:date>
    </item>
  </channel>
</rss>

