<?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: Heap Corruption and crash when calling pardiso in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Heap-Corruption-and-crash-when-calling-pardiso/m-p/869021#M8295</link>
    <description>Bulent makes a good point. PARDISO uses 1-based indexing in it's data structures.&lt;BR /&gt;-Todd&lt;BR /&gt;</description>
    <pubDate>Tue, 24 Jun 2008 05:40:47 GMT</pubDate>
    <dc:creator>Todd_R_Intel</dc:creator>
    <dc:date>2008-06-24T05:40:47Z</dc:date>
    <item>
      <title>Heap Corruption and crash when calling pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Heap-Corruption-and-crash-when-calling-pardiso/m-p/869019#M8293</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have hopefully linked pardiso correctly to my application? When I call pardiso (with phase=12) in the debug configuration, I recieve a debug error:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Microsoft Visual C++ Debug Library&lt;/P&gt;
&lt;P&gt;Debug Error!&lt;/P&gt;
&lt;P&gt;Program: c:&amp;#8;la&amp;#8;la...&lt;/P&gt;
&lt;P&gt;HEAP CORRUPTION DETECTED: before Normal block (#0) at 0x02150FD0.&lt;/P&gt;
&lt;P&gt;CRT detected that the application wrote to memory before the start of heap buffer. &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I am guessing that pardiso is somehow writing where is shouldn't be in memory?&lt;/P&gt;
&lt;P&gt;Has anybody seen this before? :&amp;lt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Any help / suggestions would be greatly appreciated. &lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Pete&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2008 21:53:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Heap-Corruption-and-crash-when-calling-pardiso/m-p/869019#M8293</guid>
      <dc:creator>mostlyAtNight</dc:creator>
      <dc:date>2008-06-23T21:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Heap Corruption and crash when calling pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Heap-Corruption-and-crash-when-calling-pardiso/m-p/869020#M8294</link>
      <description>&lt;P&gt;Pete&lt;/P&gt;
&lt;P&gt;I would suggest you first copy the PARDISO example in the manual into your program, and run your program with it. If you don't see any crash, then you may check the vectorsarrays you are passing into PARDISO in your code (for CC++ array index starts with 0. but for fortran it starts from 1)&lt;/P&gt;
&lt;P&gt;bulent&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2008 23:02:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Heap-Corruption-and-crash-when-calling-pardiso/m-p/869020#M8294</guid>
      <dc:creator>Alemdar__Bulent</dc:creator>
      <dc:date>2008-06-23T23:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Heap Corruption and crash when calling pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Heap-Corruption-and-crash-when-calling-pardiso/m-p/869021#M8295</link>
      <description>Bulent makes a good point. PARDISO uses 1-based indexing in it's data structures.&lt;BR /&gt;-Todd&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Jun 2008 05:40:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Heap-Corruption-and-crash-when-calling-pardiso/m-p/869021#M8295</guid>
      <dc:creator>Todd_R_Intel</dc:creator>
      <dc:date>2008-06-24T05:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Heap Corruption and crash when calling pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Heap-Corruption-and-crash-when-calling-pardiso/m-p/869022#M8296</link>
      <description>Hi there,&lt;BR /&gt;&lt;BR /&gt;Thank you both for your suggestions. &lt;BR /&gt;&lt;BR /&gt;The program I am trying to integrate Pardiso with is written in Fortran so should also have indexes starting at 1. I will make some kind of testing subroutine and copy in the example from the Pardiso manual. Hopefully this will validate that I am calling Pardiso correctly. &lt;BR /&gt;&lt;BR /&gt;I'll let you know how it goes. &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Jun 2008 09:00:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Heap-Corruption-and-crash-when-calling-pardiso/m-p/869022#M8296</guid>
      <dc:creator>mostlyAtNight</dc:creator>
      <dc:date>2008-06-24T09:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: Heap Corruption and crash when calling pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Heap-Corruption-and-crash-when-calling-pardiso/m-p/869023#M8297</link>
      <description>&lt;P class="MsoNormal"&gt;Hi there,&lt;BR /&gt;
&lt;BR /&gt;
I took your advice and put the example included in the manual into a
subroutine. The example runs fine. &lt;BR /&gt;
&lt;BR /&gt;
I thought that the problem (Heap corruption) may show itself if I changed the
example arrays to dynamically allocated arrays (located on the stack) rather
than statically defined (on the heap). The example still worked. &lt;BR /&gt;
&lt;BR /&gt;
I then included the line "use matrix_data" to let me have access to
the arrays containing the actual data I want to solve in my application. &lt;BR /&gt;
&lt;BR /&gt;
I then copied the line with the first call to Pardiso and replaced the
references to nDiag, aDiag, iaDiag and jaDiag with references to the matrix I
have been having problems with. When I debug the program, the first call
to Pardiso using the example data works fine, however, the second line still
generates a HEAP CORRUPTION error. &lt;BR /&gt;
&lt;BR /&gt;
Please see a copy of the source code and actual matrix data (attached). I have
combined both files which are written out. &lt;BR /&gt;
&lt;BR /&gt;
I am pretty stumped as the data seems fine, I seem to have referenced
everything correctly and the example is working. :&amp;lt;&lt;BR /&gt;
&lt;BR /&gt;
Does anyone have any suggestions to why this is not working? Could it be
something to do with calling conventions? It's currently set to
"Default". I am using IVF 10.1&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
&lt;BR /&gt;
Pete&lt;P&gt;&lt;/P&gt;&lt;/P&gt;

&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;subroutine diagnosePSolveRealData&lt;BR /&gt;  &lt;BR /&gt;    use program_flow_utilities&lt;BR /&gt;    use MKL_PARDISO&lt;BR /&gt;    use matrix_data&lt;BR /&gt;        &lt;BR /&gt;    ! INTEGER*8 ptDiag(64)&lt;BR /&gt;    TYPE(MKL_PARDISO_HANDLE), pointer :: ptDiag(:) =&amp;gt; null()&lt;BR /&gt;    integer, pointer :: idumDiag(:) =&amp;gt; null()&lt;BR /&gt;    real(KIND=8), pointer :: ddumDiag(:) =&amp;gt; null()&lt;BR /&gt;    INTEGER maxfctDiag, mnumDiag, mtypeDiag, phaseDiag, nDiag, nrhsDiag, errorDiag, msglvlDiag, intTemp&lt;BR /&gt;    INTEGER iparmDiag(64)&lt;BR /&gt;    INTEGER iaDiag(6)&lt;BR /&gt;    INTEGER jaDiag(13)&lt;BR /&gt;    REAL*8 aDiag(13)&lt;BR /&gt;    REAL*8 bDiag(5)&lt;BR /&gt;    REAL*8 xDiag(5)&lt;BR /&gt;    INTEGER iDiag&lt;BR /&gt;    REAL*8 waltime1Diag, waltime2Diag, doubleTemp&lt;BR /&gt;    &lt;BR /&gt;    DATA nDiag /5/, nrhsDiag /1/, maxfctDiag /1/, mnumDiag /1/&lt;BR /&gt;    DATA iaDiag /1,4,6,9,12,14/&lt;BR /&gt;    DATA jaDiag /1,2,4,1,2,3,4,5,1,3,4,2,5/&lt;BR /&gt;    DATA aDiag /1.d0, -1.d0, -3.d0, -2.d0, 5.d0, 4.d0, 6.d0, 4.d0, -4.d0, 2.d0, 7.d0, 8.d0, -5.d0/&lt;BR /&gt;    &lt;BR /&gt;    integer omp_get_max_threadsDiag&lt;BR /&gt;    external omp_get_max_threadsDiag&lt;BR /&gt;    &lt;BR /&gt;    do iDiag = 1, 64&lt;BR /&gt;      iparmDiag(iDiag) = 0&lt;BR /&gt;    end do&lt;BR /&gt;    &lt;BR /&gt;    iparmDiag(1) = 0 ! solver default&lt;BR /&gt;    iparmDiag(3) = 2&lt;BR /&gt;    &lt;BR /&gt;    !iparmDiag(1) = 1 ! no solver default&lt;BR /&gt;    !iparmDiag(2) = 2 ! fill-in reordering from METIS&lt;BR /&gt;    !! iparmDiag(3) = mkl_get_max_threads() ! numbers of processors, value of MKL_NUM_THREADS&lt;BR /&gt;    !iparmDiag(3) = 2&lt;BR /&gt;    !iparmDiag(4) = 0 ! no iterative-direct algorithm&lt;BR /&gt;    !iparmDiag(5) = 0 ! no user fill-in reducing permutation&lt;BR /&gt;    !iparmDiag(6) = 0 ! =0 solution on the first n compoments of x&lt;BR /&gt;    !iparmDiag(7) = 0 ! not in use&lt;BR /&gt;    !iparmDiag(8) = 9 ! numbers of i&lt;BR /&gt;    !iparmDiag(9) = 0 ! not in use&lt;BR /&gt;    !iparmDiag(10) = 13 ! perturbe the pivot elements with 1E-13&lt;BR /&gt;    !iparmDiag(11) = 1 ! use nonsymmetric permutation and scaling MPS&lt;BR /&gt;    !iparmDiag(12) = 0 ! not in use&lt;BR /&gt;    !iparmDiag(13) = 0 ! not in use&lt;BR /&gt;    !iparmDiag(14) = 0 ! Output: number of perturbed pivots&lt;BR /&gt;    !iparmDiag(15) = 0 ! not in use&lt;BR /&gt;    !iparmDiag(16) =
 0 ! not in use&lt;BR /&gt;    !iparmDiag(17) = 0 ! not in use&lt;BR /&gt;    !iparmDiag(18) = -1 ! Output: number of nonzeros in the factor LU&lt;BR /&gt;    !iparmDiag(19) = -1 ! Output: Mflops for LU factorization&lt;BR /&gt;    !iparmDiag(20) = 0 ! Output: Numbers of CG Iterations&lt;BR /&gt;    errorDiag = 0 ! initialize error flag&lt;BR /&gt;    msglvlDiag = 1 ! print statistical information&lt;BR /&gt;    mtypeDiag = 11 ! real unsymmetric&lt;BR /&gt;    &lt;BR /&gt;    !do iDiag = 1, 64&lt;BR /&gt;    !  ptDiag(i) = 0&lt;BR /&gt;    !end do&lt;BR /&gt;    &lt;BR /&gt;    allocate( ptDiag(64), idumDiag(0), ddumDiag(0), stat=istat )&lt;BR /&gt;    call check_allocate_status(istat)&lt;BR /&gt;    &lt;BR /&gt;    do iDiag = 1, 64&lt;BR /&gt;      ptDiag(iDiag)%DUMMY = 0&lt;BR /&gt;    end do&lt;BR /&gt;    &lt;BR /&gt;    ! iz contains the number of non zeros in the matrix&lt;BR /&gt;    ivect( (iv+1) ) = iz + 1&lt;BR /&gt;    &lt;BR /&gt;    phaseDiag = 11 ! only reordering and symbolic factorization&lt;BR /&gt;    &lt;BR /&gt;    ! Let's open a file and dump the matrix and other crap&lt;BR /&gt;    open (unit = 137, file = "c:!Tempmatrix_info.debug")&lt;BR /&gt;      write (137,*) "ptDiag : ", ptDiag&lt;BR /&gt;      write (137,*) "maxfctDiag : ", maxfctDiag&lt;BR /&gt;      write (137,*) "mnumDiag : ", mnumDiag&lt;BR /&gt;      write (137,*) "mtypeDiag : ", mtypeDiag&lt;BR /&gt;      write (137,*) "phaseDiag : ", phaseDiag&lt;BR /&gt;      write (137,*) "iv : ", iv&lt;BR /&gt;      write (137,*) "nrhsDiag : ", nrhsDiag&lt;BR /&gt;    close(137)&lt;BR /&gt;    &lt;BR /&gt;    open (unit = 137, file = "c:!Tempmatrices.csv")&lt;BR /&gt;      &lt;BR /&gt;      write (137,*) ","&lt;BR /&gt;      write (137,*) "aDiag"&lt;BR /&gt;      do iDiag = 1, iz&lt;BR /&gt;        write (137,*) aDouble(iDiag)&lt;BR /&gt;      end do&lt;BR /&gt;      &lt;BR /&gt;      write (137,*) ","&lt;BR /&gt;      write (137,*) "jvect"&lt;BR /&gt;      do iDiag = 1, iz&lt;BR /&gt;        write (137,*) jvect(iDiag)&lt;BR /&gt;      end do&lt;BR /&gt;      &lt;BR /&gt;      write (137,*) ","&lt;BR /&gt;      write (137,*) "ivect"&lt;BR /&gt;      do iDiag = 1, (iv+1)&lt;BR /&gt;        write (137,*) ivect(iDiag)&lt;BR /&gt;      end do&lt;BR /&gt;      &lt;BR /&gt;    close(137)&lt;BR /&gt;    &lt;BR /&gt;    CALL pardiso (ptDiag, maxfctDiag, mnumDiag, mtypeDiag, phaseDiag, nDiag, aDiag, iaDiag, jaDiag, idumDiag, nrhsDiag, iparmDiag, msglvlDiag, ddumDiag, ddumDiag, errorDiag)&lt;BR /&gt;    CALL pardiso (ptDiag, maxfctDiag, mnumDiag, mtypeDiag, phaseDiag, iv, aDouble, ivect, jvect, idumDiag, nrhsDiag, iparmDiag, msglvlDiag, ddumDiag, ddumDiag, errorDiag)&lt;BR /&gt;    &lt;BR /&gt;  end subroutine diagnosePSolveRealData&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Jun 2008 11:47:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Heap-Corruption-and-crash-when-calling-pardiso/m-p/869023#M8297</guid>
      <dc:creator>mostlyAtNight</dc:creator>
      <dc:date>2008-06-25T11:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Heap Corruption and crash when calling pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Heap-Corruption-and-crash-when-calling-pardiso/m-p/869024#M8298</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;I have managed to get a small standalone program running which demonstates this HEAP CORRUPTION. The solution files (Visual Studio 2005) are attached as well as a binary file containing the matrix itself. I manage to get a small ammount of output from Pardiso after the HEAP CORRUPTION. This is shown below:&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;&lt;FONT face="Arial"&gt;Starting...&lt;BR /&gt;*** error PARDISO ( reordering_phase) error_num= -180&lt;BR /&gt;*** error pardiso: reordering, symb. factorization&lt;BR /&gt;&lt;BR /&gt;================ PARDISO: solving a real nonsymmetric system ================&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Summary PARDISO: ( reorder to reorder )&lt;BR /&gt;================&lt;BR /&gt;&lt;BR /&gt;Times:&lt;BR /&gt;======&lt;BR /&gt;&lt;BR /&gt; Time fulladj: 0.000076 s&lt;BR /&gt; Time reorder: 1.602580 s&lt;BR /&gt; Time symbfct: 0.000112 s&lt;BR /&gt; Time malloc : -0.496202 s&lt;BR /&gt; Time total : 1.106669 s total - sum: 0.000102 s&lt;BR /&gt;&lt;BR /&gt;Statistics:&lt;BR /&gt;===========&lt;BR /&gt;&amp;lt; Parallel Direct Factorization with #processors: &amp;gt; 2&lt;BR /&gt;&amp;lt; Numerical Factorization with BLAS3 and O(n) synchronization &amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt; Linear system Ax = b&amp;gt; &lt;TRANSPOSE&gt;&lt;BR /&gt; #equations: 818&lt;BR /&gt; #non-zeros in A: 2618&lt;BR /&gt; non-zeros in A (%): 0.391258&lt;BR /&gt; #right-hand sides: 1&lt;BR /&gt;&lt;BR /&gt;&amp;lt; Factors L and U &amp;gt;&lt;BR /&gt; #columns for each panel: 96&lt;BR /&gt; #independent subgraphs: 0&lt;BR /&gt;&amp;lt; Preprocessing with state of the art partitioning metis&amp;gt;&lt;BR /&gt; #supernodes: 688&lt;BR /&gt; size of largest supernode:&amp;amp;
nbsp; 10&lt;BR /&gt; number of nonzeros in L 3921&lt;BR /&gt; number of nonzeros in U 2747&lt;BR /&gt; number of nonzeros in L+U 6668&lt;/TRANSPOSE&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;Does anyone have any ideas what's causing the HEAP CORRUPTION?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Jun 2008 13:57:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Heap-Corruption-and-crash-when-calling-pardiso/m-p/869024#M8298</guid>
      <dc:creator>mostlyAtNight</dc:creator>
      <dc:date>2008-06-25T13:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Heap Corruption and crash when calling pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Heap-Corruption-and-crash-when-calling-pardiso/m-p/869025#M8299</link>
      <description>&lt;P&gt;Hello, Pete!&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P&gt;PARDISO used compressed sparserow formatwhere array ja(*) contains column indices of sparse matrix A. The indices in each row must be sorted &lt;STRONG&gt;in increasing order&lt;/STRONG&gt; (see PARDISO documentation).Our matrix checker reported the following error:&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P&gt;*** Error (incorrect input matrix) error_num= 24&lt;BR /&gt;*** Input check: j=2617, ja(j)=689, ja(j+1)=405 are incompatible&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P&gt;Please check your matrix format. Probably it is the basis of your problem.&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P&gt;Sergey&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2008 05:35:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Heap-Corruption-and-crash-when-calling-pardiso/m-p/869025#M8299</guid>
      <dc:creator>Sergey_P_Intel2</dc:creator>
      <dc:date>2008-06-27T05:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Heap Corruption and crash when calling pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Heap-Corruption-and-crash-when-calling-pardiso/m-p/869026#M8300</link>
      <description>&lt;P&gt;Hi Sergey,&lt;/P&gt;
&lt;P&gt;Thanks for your reply, I had assumed that the existing solver in the code I am working on was also picky about having column indices in increasing order and therefore assumed they were being written in correctly. &lt;/P&gt;
&lt;P&gt;After a few other changes with libraries, it's working nicely now.&lt;/P&gt;
&lt;P&gt;Thanks again,&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Pete&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2008 21:09:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Heap-Corruption-and-crash-when-calling-pardiso/m-p/869026#M8300</guid>
      <dc:creator>mostlyAtNight</dc:creator>
      <dc:date>2008-06-30T21:09:13Z</dc:date>
    </item>
  </channel>
</rss>

