<?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 : memory release problem (MKL 10.1.1.019) in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Pardiso-memory-release-problem-MKL-10-1-1-019/m-p/853887#M6768</link>
    <description>Hi, I am trying to use the Pardiso solver for the nonstationary Navier-Stokes equations.&lt;BR /&gt;The only problem is that the system memory is increasing constantly.&lt;BR /&gt;&lt;BR /&gt;I tried MKL_FreeBuffers(), but it was not working.&lt;BR /&gt;I am curious to know if the problem could be fixed.&lt;BR /&gt;Is anyone who use Pardiso solver to the dynamic PDE problems?&lt;BR /&gt;Any comment would be appreciated.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 30 Jan 2009 07:15:33 GMT</pubDate>
    <dc:creator>minos67paran_com</dc:creator>
    <dc:date>2009-01-30T07:15:33Z</dc:date>
    <item>
      <title>Pardiso : memory release problem (MKL 10.1.1.019)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Pardiso-memory-release-problem-MKL-10-1-1-019/m-p/853887#M6768</link>
      <description>Hi, I am trying to use the Pardiso solver for the nonstationary Navier-Stokes equations.&lt;BR /&gt;The only problem is that the system memory is increasing constantly.&lt;BR /&gt;&lt;BR /&gt;I tried MKL_FreeBuffers(), but it was not working.&lt;BR /&gt;I am curious to know if the problem could be fixed.&lt;BR /&gt;Is anyone who use Pardiso solver to the dynamic PDE problems?&lt;BR /&gt;Any comment would be appreciated.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Jan 2009 07:15:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Pardiso-memory-release-problem-MKL-10-1-1-019/m-p/853887#M6768</guid>
      <dc:creator>minos67paran_com</dc:creator>
      <dc:date>2009-01-30T07:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Pardiso : memory release problem (MKL 10.1.1.019)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Pardiso-memory-release-problem-MKL-10-1-1-019/m-p/853888#M6769</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/413338"&gt;minos67paran.com&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;Hi, I am trying to use the Pardiso solver for the nonstationary Navier-Stokes equations.&lt;BR /&gt;The only problem is that the system memory is increasing constantly.&lt;BR /&gt;&lt;BR /&gt;I tried MKL_FreeBuffers(), but it was not working.&lt;BR /&gt;I am curious to know if the problem could be fixed.&lt;BR /&gt;Is anyone who use Pardiso solver to the dynamic PDE problems?&lt;BR /&gt;Any comment would be appreciated.&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;
&lt;DIV&gt;Have you called it with the phase parameter set to -1? Think you need to do that to free the memory&lt;/DIV&gt;</description>
      <pubDate>Fri, 30 Jan 2009 10:11:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Pardiso-memory-release-problem-MKL-10-1-1-019/m-p/853888#M6769</guid>
      <dc:creator>euan</dc:creator>
      <dc:date>2009-01-30T10:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Pardiso : memory release problem (MKL 10.1.1.019)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Pardiso-memory-release-problem-MKL-10-1-1-019/m-p/853889#M6770</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/263475"&gt;euanw@smartmt.com&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;&lt;BR /&gt;
&lt;DIV&gt;Have you called it with the phase parameter set to -1? Think you need to do that to free the memory&lt;/DIV&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;Yes, I did. &lt;BR /&gt;The following is a part of code calling pardiso.&lt;BR /&gt;I modified pardiso example code in MKL.&lt;BR /&gt;(I found that the c-code example usefortran array convention(starts index 1 for *ia, *ja).)&lt;BR /&gt;If there are somthings missing, please make some comment.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;//----------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;Sparse : custom structure for a sparse matrix&lt;BR /&gt;SparseToPardisoRowNum( mat, ia ); SparseToPardisoMat( mat, ja, a ); : custom function which I believe there&lt;BR /&gt;is no problem...&lt;BR /&gt;&lt;BR /&gt;//-------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;int PARDISO_SOLVER_ICC(int nn, Sparse *mat, double *bb, double *xx )&lt;BR /&gt;{&lt;BR /&gt; /* Matrix data. */&lt;BR /&gt; MKL_INT n = ((MKL_INT) nn);&lt;BR /&gt; MKL_INT i, MKL_temp;&lt;BR /&gt; MKL_INT *ia, *ja;&lt;BR /&gt; double *a;&lt;/P&gt;
&lt;P&gt; ia = (MKL_INT *)malloc( (n+1)*sizeof(MKL_INT) );&lt;BR /&gt; MKL_temp = SparseToPardisoRowNum( mat, ia );&lt;BR /&gt;// printf("check point -5. %dn", MKL_temp);&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt; ja = (MKL_INT *)malloc( ia&lt;N&gt;*sizeof(MKL_INT) );&lt;BR /&gt; a = (double *)malloc( ia&lt;N&gt;*sizeof(double) );&lt;BR /&gt; MKL_temp = SparseToPardisoMat( mat, ja, a );&lt;BR /&gt; printf("Non-zeros of Pardiso mat = %dn", MKL_temp );&lt;BR /&gt;// printf("Non-zeros of Pardiso mat = %dn", SparseToPardisoMat( mat, ja, a ) );&lt;/N&gt;&lt;/N&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;// printf ("n");&lt;BR /&gt;// for (i = 0; i &amp;lt; n+1; i++) printf("ia[%d] = %dn", i, ia&lt;I&gt; );&lt;BR /&gt;// printf ("n");&lt;BR /&gt;// for (i = 0; i &amp;lt; ia&lt;N&gt;; i++) printf("ja[%d] = %dn", i, ja&lt;I&gt; );&lt;BR /&gt;// printf ("n");&lt;BR /&gt;// for (i = 0; i &amp;lt; ia&lt;N&gt;; i++) printf("a[%d] = %fn", i, a&lt;I&gt; );&lt;/I&gt;&lt;/N&gt;&lt;/I&gt;&lt;/N&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt; MKL_INT nnz = ia&lt;N&gt;;&lt;BR /&gt; MKL_INT mtype = 11; /* Real unsymmetric matrix */&lt;/N&gt;&lt;/P&gt;
&lt;P&gt; /* RHS and solution vectors. */&lt;BR /&gt; double *b, *x;&lt;BR /&gt; MKL_INT nrhs = 1; /* Number of right hand sides. */&lt;/P&gt;
&lt;P&gt; b = (double *)malloc( n*sizeof(double) );&lt;BR /&gt; x = (double *)malloc( n*sizeof(double) );&lt;/P&gt;
&lt;P&gt; /* Internal solver memory pointer pt, */&lt;BR /&gt; /* 32-bit: int pt[64]; 64-bit: long int pt[64] */&lt;BR /&gt; /* or void *pt[64] should be OK on both architectures */&lt;BR /&gt;// void *pt[64];&lt;BR /&gt; int pt[64];&lt;/P&gt;
&lt;P&gt; /* Pardiso control parameters. */&lt;BR /&gt; MKL_INT iparm[64];&lt;BR /&gt; MKL_INT maxfct, mnum, phase, error, msglvl;&lt;/P&gt;
&lt;P&gt; /* Auxiliary variables. */&lt;/P&gt;
&lt;P&gt; double ddum; /* Double dummy */&lt;BR /&gt; MKL_INT idum; /* Integer dummy. */&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt;/* .. Setup Pardiso control parameters. */&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt; for (i = 0; i &amp;lt; 64; i++) {&lt;BR /&gt; iparm&lt;I&gt; = 0;&lt;BR /&gt; }&lt;BR /&gt; iparm[0] = 1; /* No solver default */&lt;BR /&gt; iparm[1] = 2; /* Fill-in reordering from METIS */&lt;BR /&gt; /* Numbers of processors, value of OMP_NUM_THREADS */&lt;BR /&gt; iparm[2] = 1;&lt;BR /&gt; iparm[3] = 0; /* No iterative-direct algorithm */&lt;BR /&gt; iparm[4] = 0; /* No user fill-in reducing permutation */&lt;BR /&gt; iparm[5] = 0; /* Write solution into x */&lt;BR /&gt; iparm[6] = 0; /* Not in use */&lt;BR /&gt; iparm[7] = 2; /* Max numbers of iterative refinement steps */&lt;BR /&gt; iparm[8] = 0; /* Not in use */&lt;BR /&gt; iparm[9] = 13; /* Perturb the pivot elements with 1E-13 */&lt;BR /&gt; iparm[10] = 1; /* Use nonsymmetric permutation and scaling MPS */&lt;BR /&gt; iparm[11] = 0; /* Not in use */&lt;BR /&gt; iparm[12] = 1; /* Maximum weighted matching algorithm is switched-on (default for non-symmetric) */&lt;BR /&gt; iparm[13] = 0; /* Output: Number of perturbed pivots */&lt;BR /&gt; iparm[14] = 0; /* Not in use */&lt;BR /&gt; iparm[15] = 0; /* Not in use */&lt;BR /&gt; iparm[16] = 0; /* Not in use */&lt;BR /&gt; iparm[17] = -1; /* Output: Number of nonzeros in the factor LU */&lt;BR /&gt; iparm[18] = -1; /* Output: Mflops for LU factorization */&lt;BR /&gt; iparm[19] = 0; /* Output: Numbers of CG Iterations */&lt;BR /&gt; maxfct = 1; /* Maximum number of numerical factorizations. */&lt;BR /&gt; mnum = 1; /* Which factorization to use. */&lt;BR /&gt; msglvl = 1; /* Print statistical information in file */&lt;BR /&gt; error = 0; /* Initialize error flag */&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt;/* .. Initialize the internal solver memory pointer. This is only */&lt;BR /&gt;/* necessary for the FIRST call of the PARDISO solver. */&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt; for (i = 0; i &amp;lt; 64; i++) {&lt;BR /&gt; pt&lt;I&gt; = 0;&lt;BR /&gt; }&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt;/* .. Reordering and Symbolic Factorization. This step also allocates */&lt;BR /&gt;/* all memory that is necessary for the factorization. */&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt; phase = 11;&lt;BR /&gt; PARDISO (pt, &amp;amp;maxfct, &amp;amp;mnum, &amp;amp;mtype, &amp;amp;phase,&lt;BR /&gt; &amp;amp;n, a, ia, ja, &amp;amp;idum, &amp;amp;nrhs,&lt;BR /&gt; iparm, &amp;amp;msglvl, &amp;amp;ddum, &amp;amp;ddum, &amp;amp;error);&lt;BR /&gt; if (error != 0) {&lt;BR /&gt; printf("nERROR during symbolic factorization: %d", error);&lt;BR /&gt; exit(1);&lt;BR /&gt; }&lt;BR /&gt; printf("nReordering completed ... ");&lt;BR /&gt; printf("nNumber of nonzeros in factors = %d", iparm[17]);&lt;BR /&gt; printf("nNumber of factorization MFLOPS = %d", iparm[18]);&lt;/P&gt;
&lt;P&gt; printf("check point 2. n" );&lt;/P&gt;
&lt;P&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt;/* .. Numerical factorization. */&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt; phase = 22;&lt;BR /&gt; PARDISO (pt, &amp;amp;maxfct, &amp;amp;mnum, &amp;amp;mtype, &amp;amp;phase,&lt;BR /&gt; &amp;amp;n, a, ia, ja, &amp;amp;idum, &amp;amp;nrhs,&lt;BR /&gt; iparm, &amp;amp;msglvl, &amp;amp;ddum, &amp;amp;ddum, &amp;amp;error);&lt;BR /&gt; if (error != 0) {&lt;BR /&gt; printf("nERROR during numerical factorization: %d", error);&lt;BR /&gt; exit(2);&lt;BR /&gt; }&lt;BR /&gt; printf("nFactorization completed ...n ");&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt;/* .. Back substitution and iterative refinement. */&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt; phase = 33;&lt;BR /&gt;// iparm[7] = 1; /* Max numbers of iterative refinement steps. */&lt;BR /&gt; iparm[7] = 2; /* Max numbers of iterative refinement steps. */&lt;/P&gt;
&lt;P&gt; /* Set right hand side. */&lt;BR /&gt; for (i = 0; i &amp;lt; n; i++) {&lt;BR /&gt; b&lt;I&gt; = bb&lt;I&gt;;&lt;BR /&gt; }&lt;BR /&gt; PARDISO (pt, &amp;amp;maxfct, &amp;amp;mnum, &amp;amp;mtype, &amp;amp;phase,&lt;BR /&gt; &amp;amp;n, a, ia, ja, &amp;amp;idum, &amp;amp;nrhs,&lt;BR /&gt; iparm, &amp;amp;msglvl, b, x, &amp;amp;error);&lt;BR /&gt; if (error != 0) {&lt;BR /&gt; printf("nERROR during solution: %d", error);&lt;BR /&gt; exit(3);&lt;BR /&gt; }&lt;BR /&gt; printf("nSolve completed ... ");&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;
printf("nThe solution of the system is: ");&lt;BR /&gt; for (i = 0; i &amp;lt; n; i++) {&lt;BR /&gt; xx&lt;I&gt; = x&lt;I&gt;;&lt;BR /&gt;// printf("n x [%d] = %24.16e", i, x&lt;I&gt; );&lt;BR /&gt; }&lt;BR /&gt; printf ("n");&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt;/* .. Termination and release of memory. */&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt; phase = -1; /* Release internal memory. */&lt;BR /&gt; PARDISO (pt, &amp;amp;maxfct, &amp;amp;mnum, &amp;amp;mtype, &amp;amp;phase,&lt;BR /&gt; &amp;amp;n, &amp;amp;ddum, ia, ja, &amp;amp;idum, &amp;amp;nrhs,&lt;BR /&gt; iparm, &amp;amp;msglvl, &amp;amp;ddum, &amp;amp;ddum, &amp;amp;error);&lt;BR /&gt; return 0;&lt;BR /&gt; printf("n PARDISO_SOLVER done !");&lt;/P&gt;
&lt;P&gt; MKL_FreeBuffers();&lt;/P&gt;
&lt;P&gt; free(ia);&lt;BR /&gt; free(ja);&lt;/P&gt;
&lt;P&gt; free(a);&lt;BR /&gt; free(b);&lt;BR /&gt; free(x);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;</description>
      <pubDate>Fri, 30 Jan 2009 16:55:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Pardiso-memory-release-problem-MKL-10-1-1-019/m-p/853889#M6770</guid>
      <dc:creator>minos67paran_com</dc:creator>
      <dc:date>2009-01-30T16:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Pardiso : memory release problem (MKL 10.1.1.019)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Pardiso-memory-release-problem-MKL-10-1-1-019/m-p/853890#M6771</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;hi,&lt;/DIV&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;i think you're doing the "return 0" at the end of your program before freeing your memory. I would have thought the compiler would have warned you of this, but then again I'm used to C# which tends to be more friendly&lt;/DIV&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/413338"&gt;minos67paran.com&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;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;Yes, I did. &lt;BR /&gt;The following is a part of code calling pardiso.&lt;BR /&gt;I modified pardiso example code in MKL.&lt;BR /&gt;(I found that the c-code example usefortran array convention(starts index 1 for *ia, *ja).)&lt;BR /&gt;If there are somthings missing, please make some comment.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;//----------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;Sparse : custom structure for a sparse matrix&lt;BR /&gt;SparseToPardisoRowNum( mat, ia ); SparseToPardisoMat( mat, ja, a ); : custom function which I believe there&lt;BR /&gt;is no problem...&lt;BR /&gt;&lt;BR /&gt;//-------------------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;int PARDISO_SOLVER_ICC(int nn, Sparse *mat, double *bb, double *xx )&lt;BR /&gt;{&lt;BR /&gt; /* Matrix data. */&lt;BR /&gt; MKL_INT n = ((MKL_INT) nn);&lt;BR /&gt; MKL_INT i, MKL_temp;&lt;BR /&gt; MKL_INT *ia, *ja;&lt;BR /&gt; double *a;&lt;/P&gt;
&lt;P&gt; ia = (MKL_INT *)malloc( (n+1)*sizeof(MKL_INT) );&lt;BR /&gt; MKL_temp = SparseToPardisoRowNum( mat, ia );&lt;BR /&gt;// printf("check point -5. %dn", MKL_temp);&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt; ja = (MKL_INT *)malloc( ia&lt;N&gt;*sizeof(MKL_INT) );&lt;BR /&gt; a = (double *)malloc( ia&lt;N&gt;*sizeof(double) );&lt;BR /&gt; MKL_temp = SparseToPardisoMat( mat, ja, a );&lt;BR /&gt; printf("Non-zeros of Pardiso mat = %dn", MKL_temp );&lt;BR /&gt;// printf("Non-zeros of Pardiso mat = %dn", SparseToPardisoMat( mat, ja, a ) );&lt;/N&gt;&lt;/N&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;// printf ("n");&lt;BR /&gt;// for (i = 0; i &amp;lt; n+1; i++) printf("ia[%d] = %dn", i, ia&lt;I&gt; );&lt;BR /&gt;// printf ("n");&lt;BR /&gt;// for (i = 0; i &amp;lt; ia&lt;N&gt;; i++) printf("ja[%d] = %dn", i, ja&lt;I&gt; );&lt;BR /&gt;// printf ("n");&lt;BR /&gt;// for (i = 0; i &amp;lt; ia&lt;N&gt;; i++) printf("a[%d] = %fn", i, a&lt;I&gt; );&lt;/I&gt;&lt;/N&gt;&lt;/I&gt;&lt;/N&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt; MKL_INT nnz = ia&lt;N&gt;;&lt;BR /&gt; MKL_INT mtype = 11; /* Real unsymmetric matrix */&lt;/N&gt;&lt;/P&gt;
&lt;P&gt; /* RHS and solution vectors. */&lt;BR /&gt; double *b, *x;&lt;BR /&gt; MKL_INT nrhs = 1; /* Number of right hand sides. */&lt;/P&gt;
&lt;P&gt; b = (double *)malloc( n*sizeof(double) );&lt;BR /&gt; x = (double *)malloc( n*sizeof(double) );&lt;/P&gt;
&lt;P&gt; /* Internal solver memory pointer pt, */&lt;BR /&gt; /* 32-bit: int pt[64]; 64-bit: long int pt[64] */&lt;BR /&gt; /* or void *pt[64] should be OK on both architectures */&lt;BR /&gt;// void *pt[64];&lt;BR /&gt; int pt[64];&lt;/P&gt;
&lt;P&gt; /* Pardiso control parameters. */&lt;BR /&gt; MKL_INT iparm[64];&lt;BR /&gt; MKL_INT maxfct, mnum, phase, error, msglvl;&lt;/P&gt;
&lt;P&gt; /* Auxiliary variables. */&lt;/P&gt;
&lt;P&gt; double ddum; /* Double dummy */&lt;BR /&gt; MKL_INT idum; /* Integer dummy. */&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt;/* .. Setup Pardiso control parameters. */&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt; for (i = 0; i &amp;lt; 64; i++) {&lt;BR /&gt; iparm&lt;I&gt; = 0;&lt;BR /&gt; }&lt;BR /&gt; iparm[0] = 1; /* No solver default */&lt;BR /&gt; iparm[1] = 2; /* Fill-in reordering from METIS */&lt;BR /&gt; /* Numbers of processors, value of OMP_NUM_THREADS */&lt;BR /&gt; iparm[2] = 1;&lt;BR /&gt; iparm[3] = 0; /* No iterative-direct algorithm */&lt;BR /&gt; iparm[4] = 0; /* No user fill-in reducing permutation */&lt;BR /&gt; iparm[5] = 0; /* Write solution into x */&lt;BR /&gt; iparm[6] = 0; /* Not in use */&lt;BR /&gt; iparm[7] = 2; /* Max numbers of iterative refinement steps */&lt;BR /&gt; iparm[8] = 0; /* Not in use */&lt;BR /&gt; iparm[9] = 13; /* Perturb the pivot elements with 1E-13 */&lt;BR /&gt; iparm[10] = 1; /* Use nonsymmetric permutation and scaling MPS */&lt;BR /&gt; iparm[11] = 0; /* Not in use */&lt;BR /&gt; iparm[12] = 1; /* Maximum weighted matching algorithm is switched-on (default for non-symmetric) */&lt;BR /&gt; iparm[13] = 0; /* Output: Number of perturbed pivots */&lt;BR /&gt; iparm[14] = 0; /* Not in use */&lt;BR /&gt; iparm[15] = 0; /* Not in use */&lt;BR /&gt; iparm[16] = 0; /* Not in use */&lt;BR /&gt; iparm[17] = -1; /* Output: Number of nonzeros in the factor LU */&lt;BR /&gt; iparm[18] = -1; /* Output: Mflops for LU factorization */&lt;BR /&gt; iparm[19] = 0; /* Output: Numbers of CG Iterations */&lt;BR /&gt; maxfct = 1; /* Maximum number of numerical factorizations. */&lt;BR /&gt; mnum = 1; /* Which factorization to use. */&lt;BR /&gt; msglvl = 1; /* Print statistical information in file */&lt;BR /&gt; error = 0; /* Initialize error flag */&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt;/* .. Initialize the internal solver memory pointer. This is only */&lt;BR /&gt;/* necessary for the FIRST call of the PARDISO solver. */&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt; for (i = 0; i &amp;lt; 64; i++) {&lt;BR /&gt; pt&lt;I&gt; = 0;&lt;BR /&gt; }&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt;/* .. Reordering and Symbolic Factorization. This step also allocates */&lt;BR /&gt;/* all memory that is necessary for the factorization. */&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt; phase = 11;&lt;BR /&gt; PARDISO (pt, &amp;amp;maxfct, &amp;amp;mnum, &amp;amp;mtype, &amp;amp;phase,&lt;BR /&gt; &amp;amp;n, a, ia, ja, &amp;amp;idum, &amp;amp;nrhs,&lt;BR /&gt; iparm, &amp;amp;msglvl, &amp;amp;ddum, &amp;amp;ddum, &amp;amp;error);&lt;BR /&gt; if (error != 0) {&lt;BR /&gt; printf("nERROR during symbolic factorization: %d", error);&lt;BR /&gt; exit(1);&lt;BR /&gt; }&lt;BR /&gt; printf("nReordering completed ... ");&lt;BR /&gt; printf("nNumber of nonzeros in factors = %d", iparm[17]);&lt;BR /&gt; printf("nNumber of factorization MFLOPS = %d", iparm[18]);&lt;/P&gt;
&lt;P&gt; printf("check point 2. n" );&lt;/P&gt;
&lt;P&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt;/* .. Numerical factorization. */&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt; phase = 22;&lt;BR /&gt; PARDISO (pt, &amp;amp;maxfct, &amp;amp;mnum, &amp;amp;mtype, &amp;amp;phase,&lt;BR /&gt; &amp;amp;n, a, ia, ja, &amp;amp;idum, &amp;amp;nrhs,&lt;BR /&gt; iparm, &amp;amp;msglvl, &amp;amp;ddum, &amp;amp;ddum, &amp;amp;error);&lt;BR /&gt; if (error != 0) {&lt;BR /&gt; printf("nERROR during numerical factorization: %d", error);&lt;BR /&gt; exit(2);&lt;BR /&gt; }&lt;BR /&gt; printf("nFactorization completed ...n ");&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt;/* .. Back substitution and iterative refinement. */&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt; phase = 33;&lt;BR /&gt;// iparm[7] = 1; /* Max numbers of iterative refinement steps. */&lt;BR /&gt; iparm[7] = 2; /* Max numbers of iterative refinement steps. */&lt;/P&gt;
&lt;P&gt; /* Set right hand side. */&lt;BR /&gt; for (i = 0; i &amp;lt; n; i++) {&lt;BR /&gt; b&lt;I&gt; = bb&lt;I&gt;;&lt;BR /&gt; }&lt;BR /&gt; PARDISO (pt, &amp;amp;maxfct, &amp;amp;mnum, &amp;amp;mtype, &amp;amp;phase,&lt;BR /&gt; &amp;amp;n, a, ia, ja, &amp;amp;idum, &amp;amp;nrhs,&lt;BR /&gt; iparm, &amp;amp;msglvl, b, x, &amp;amp;error);&lt;BR /&gt; if (error != 0) {&lt;BR /&gt; printf("nERROR during solution: %d", error);&lt;BR /&gt; exit(3);&lt;BR /&gt; }&lt;BR /&gt; printf("nSolve completed ... ");&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;
printf("nThe solution of the system is: ");&lt;BR /&gt; for (i = 0; i &amp;lt; n; i++) {&lt;BR /&gt; xx&lt;I&gt; = x&lt;I&gt;;&lt;BR /&gt;// printf("n x [%d] = %24.16e", i, x&lt;I&gt; );&lt;BR /&gt; }&lt;BR /&gt; printf ("n");&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt;/* .. Termination and release of memory. */&lt;BR /&gt;/* -------------------------------------------------------------------- */&lt;BR /&gt; phase = -1; /* Release internal memory. */&lt;BR /&gt; PARDISO (pt, &amp;amp;maxfct, &amp;amp;mnum, &amp;amp;mtype, &amp;amp;phase,&lt;BR /&gt; &amp;amp;n, &amp;amp;ddum, ia, ja, &amp;amp;idum, &amp;amp;nrhs,&lt;BR /&gt; iparm, &amp;amp;msglvl, &amp;amp;ddum, &amp;amp;ddum, &amp;amp;error);&lt;BR /&gt; return 0;&lt;BR /&gt; printf("n PARDISO_SOLVER done !");&lt;/P&gt;
&lt;P&gt; MKL_FreeBuffers();&lt;/P&gt;
&lt;P&gt; free(ia);&lt;BR /&gt; free(ja);&lt;/P&gt;
&lt;P&gt; free(a);&lt;BR /&gt; free(b);&lt;BR /&gt; free(x);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/EM&gt;&lt;I&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Jan 2009 19:14:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Pardiso-memory-release-problem-MKL-10-1-1-019/m-p/853890#M6771</guid>
      <dc:creator>euan</dc:creator>
      <dc:date>2009-01-30T19:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Pardiso : memory release problem (MKL 10.1.1.019)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Pardiso-memory-release-problem-MKL-10-1-1-019/m-p/853891#M6772</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/263475"&gt;euanw@smartmt.com&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;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Thank you euanw!&lt;BR /&gt;&lt;BR /&gt;After changing the function from int type to void type, the trouble is resolved.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 31 Jan 2009 09:52:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Pardiso-memory-release-problem-MKL-10-1-1-019/m-p/853891#M6772</guid>
      <dc:creator>minos67paran_com</dc:creator>
      <dc:date>2009-01-31T09:52:56Z</dc:date>
    </item>
  </channel>
</rss>

