<?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 Can someone tell why pardiso in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-getdiag-problem/m-p/1111029#M24364</link>
    <description>&lt;P&gt;Can someone tell why pardiso_getdiag thinks that i have zeros on a diagonal?&lt;/P&gt;</description>
    <pubDate>Sun, 05 Mar 2017 11:47:03 GMT</pubDate>
    <dc:creator>Oleg_S_</dc:creator>
    <dc:date>2017-03-05T11:47:03Z</dc:date>
    <item>
      <title>pardiso_getdiag problem</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-getdiag-problem/m-p/1111024#M24359</link>
      <description>&lt;P&gt;Hello everyone!&lt;/P&gt;

&lt;P&gt;I am using pardiso to solve nonsymmetric system, but i don't get result that i expect. Today i tried&amp;nbsp;pardiso_getdiag to understand what is going on with diagonal after&amp;nbsp;&lt;SPAN style="color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;factorization and i noticed that pardiso thinks that i have zero elements on diagonal which is not true. And if size of the matrix rises i get more zeros. Matrix_checkers returns &lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 102); font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 13px; background-color: rgb(242, 242, 242);"&gt;MKL_SPARSE_CHECKER_SUCCESS. &lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;How can i solve this problem? I attached my matrix in csr format. Indexing starts from zero.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(102, 102, 102); font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 22:43:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-getdiag-problem/m-p/1111024#M24359</guid>
      <dc:creator>Oleg_S_</dc:creator>
      <dc:date>2017-03-03T22:43:01Z</dc:date>
    </item>
    <item>
      <title>Your matrix is fine, and I</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-getdiag-problem/m-p/1111025#M24360</link>
      <description>&lt;P&gt;Your matrix is fine, and I was able to obtain a solution of A x = b with b = 1 (all elements). I used the pardiso_unsym_f.f example code from the MKL distribution, modified to read your data files.&lt;/P&gt;

&lt;P&gt;Perhaps if you post your code one could spot problems with the Pardiso calls and arguments.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 02:04:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-getdiag-problem/m-p/1111025#M24360</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2017-03-04T02:04:46Z</dc:date>
    </item>
    <item>
      <title>*msglvl = 0;		//	Не выводить</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-getdiag-problem/m-p/1111026#M24361</link>
      <description>&lt;P&gt;Thanks for quick response. Here is my code:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;	*msglvl = 0;		//	Не выводить полезную информацию
	*mtype = 11;		//	Не симметричная реальная матрица
	for (int i = 0; i &amp;lt; 64; i++)
	{
		iparm&lt;I&gt; = 0;
	}
	iparm[0] = 1;         /* No solver default */
	iparm[1] = 0;         /* Fill-in reordering from METIS */
	iparm[2] = 2;
	iparm[3] = 0;         /* No iterative-direct algorithm */
	iparm[4] = 0;         /* No user fill-in reducing permutation */
	iparm[5] = 0;         /* Write solution into x */
	iparm[6] = 0;         /* Not in use */
	iparm[7] = 0;         /* Max numbers of iterative refinement steps */
	iparm[8] = 0;         /* Not in use */
	iparm[9] = 13;        /* Perturb the pivot elements with 1E-13 */
	iparm[10] = 0;        /* Use nonsymmetric permutation and scaling MPS */
	iparm[11] = 0;        /* Conjugate transposed/transpose solve */
	iparm[12] = 1;        /* Maximum weighted matching algorithm is switched-on (default for non-symmetric) */
	iparm[13] = 0;        /* Output: Number of perturbed pivots */
	iparm[14] = 0;        /* Not in use */
	iparm[15] = 0;        /* Not in use */
	iparm[16] = 0;        /* Not in use */
	iparm[17] = -1;       /* Output: Number of nonzeros in the factor LU */
	iparm[18] = -1;       /* Output: Mflops for LU factorization */
	iparm[19] = 0;        /* Output: Numbers of CG Iterations */
	iparm[26] = 1;
	iparm[34] = 1;
	iparm[55] = 1;

	MKL_INT nrhs = 1;     /* Number of right hand sides. */
	MKL_INT maxfct, mnum, phase, error;
	/* Auxiliary variables. */


	double ddum;          /* Double dummy */
	MKL_INT idum;         /* Integer dummy. */


	maxfct = 1;           /* Maximum number of numerical factorizations. */
	mnum = 1;         /* Which factorization to use. */
	//	msglvl = 1;           /* Print statistical information in file */
	error = 0;            /* Initialize error flag */
	/* -------------------------------------------------------------------- */
	/* .. Initialize the internal solver memory pointer. This is only */
	/* necessary for the FIRST call of the PARDISO solver. */
	/* -------------------------------------------------------------------- */
	for (int i = 0; i &amp;lt; 64; i++)
	{
		pt&lt;I&gt; = 0;
	}

	

	sparse_checker_error_values check_err_val;
	sparse_struct pt1;


	sparse_matrix_checker_init(&amp;amp;pt1);
	pt1.n = n;
	pt1.csr_ia = ia;
	pt1.csr_ja = ja;
	pt1.indexing = MKL_ZERO_BASED;
	pt1.matrix_structure = MKL_GENERAL_STRUCTURE;
	pt1.print_style = MKL_C_STYLE;
	pt1.message_level = MKL_PRINT;

	check_err_val = sparse_matrix_checker(&amp;amp;pt1);

	printf("Matrix check details: (%d, %d, %d)\n", pt1.check_result[0], pt1.check_result[1], pt1.check_result[2]);

	if (check_err_val == MKL_SPARSE_CHECKER_NONTRIANGULAR) {
		printf("Matrix check result: MKL_SPARSE_CHECKER_NONTRIANGULAR\n");
		error = 0;
	}
	else {
		if (check_err_val == MKL_SPARSE_CHECKER_SUCCESS) { printf("Matrix check result: MKL_SPARSE_CHECKER_SUCCESS\n"); }
		if (check_err_val == MKL_SPARSE_CHECKER_NON_MONOTONIC) { printf("Matrix check result: MKL_SPARSE_CHECKER_NON_MONOTONIC\n"); }
		if (check_err_val == MKL_SPARSE_CHECKER_OUT_OF_RANGE) { printf("Matrix check result: MKL_SPARSE_CHECKER_OUT_OF_RANGE\n"); }
		if (check_err_val == MKL_SPARSE_CHECKER_NONORDERED) { printf("Matrix check result: MKL_SPARSE_CHECKER_NONORDERED\n"); }
		error = 1;
	}

	
	phase = 11;
	PARDISO(pt, &amp;amp;maxfct, &amp;amp;mnum, &amp;amp;mtype, &amp;amp;phase,
		&amp;amp;n, a, ia, ja, &amp;amp;idum, &amp;amp;nrhs, iparm, &amp;amp;msglvl, &amp;amp;ddum, &amp;amp;ddum, &amp;amp;error);

	if (error != 0)
	{
		printf("\nERROR during symbolic factorization: %d", error);
		exit(1);
	}
	printf("\nReordering completed ... ");
	printf("\nNumber of nonzeros in factors = %d", iparm[17]);
	printf("\nNumber of factorization MFLOPS = %d", iparm[18]); fflush(0);
	/* -------------------------------------------------------------------- */
	/* .. Numerical factorization. */
	/* -------------------------------------------------------------------- */

	phase = 22;
	PARDISO(pt, &amp;amp;maxfct, &amp;amp;mnum, &amp;amp;mtype, &amp;amp;phase,
		&amp;amp;n, a, ia, ja, &amp;amp;idum, &amp;amp;nrhs, iparm, &amp;amp;msglvl, &amp;amp;ddum, &amp;amp;ddum, &amp;amp;error);
	if (error != 0)
	{
		system("pause");
		printf("\nERROR during numerical factorization: %d", error);
		exit(2);
	}
	
	double *df = NULL;
	double *da = NULL;
	MKL_INT er_d = 0;

	df = (double*)mkl_malloc(n * sizeof(double), 64);

	da = (double*)mkl_malloc(n * sizeof(double), 64);



	pardiso_getdiag(pt, df, da, &amp;amp;mnum, &amp;amp;er_d);
	printf("\nFirst\n");
	for (int i = 0; i &amp;lt; n; i++)
	{
		printf("d_fact[%d]= %lf d_a=%lf \n", i, df&lt;I&gt;, da&lt;I&gt;);
	}

	phase = 33;
	PARDISO(pt, &amp;amp;maxfct, &amp;amp;mnum, &amp;amp;mtype, &amp;amp;phase,
		&amp;amp;n, a, ia, ja, &amp;amp;idum, &amp;amp;nrhs, iparm, &amp;amp;msglvl, b, X, &amp;amp;error);
	if (error != 0)
	{
			printf("\nERROR during solution: %d", error);
			exit(3);
	}
	phase = -1;           /* Release internal memory. */
	PARDISO(pt, &amp;amp;maxfct, &amp;amp;mnum, &amp;amp;mtype, &amp;amp;phase,
		&amp;amp;n, &amp;amp;ddum, ia, ja, &amp;amp;idum, &amp;amp;nrhs,
		iparm, &amp;amp;msglvl, &amp;amp;ddum, &amp;amp;ddum, &amp;amp;error);&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;After pardiso_getdiag i see this: d_fact[41]= 4.269444 d_a=4.625000 d_fact[42]= 4.269444 d_a=4.625000 d_fact[43]= 37.925772 d_a=-0.000000 d_fact[44]= 37.924292 d_a=-0.000000 d_fact[45]= 8.519367 d_a=-0.000000 d_fact[46]= 4.189655 d_a=-0.000000 d_fact[47]= 2.036909 d_a=-0.000000 d_fact[48]= 0.412003 d_a=-0.000000 d_fact[49]= 0.402489 d_a=-0.000000&lt;/P&gt;

&lt;P&gt;I also attached my b vector. Maybe it would help.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 08:41:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-getdiag-problem/m-p/1111026#M24361</guid>
      <dc:creator>Oleg_S_</dc:creator>
      <dc:date>2017-03-04T08:41:57Z</dc:date>
    </item>
    <item>
      <title>Since you posted only a part</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-getdiag-problem/m-p/1111027#M24362</link>
      <description>&lt;P&gt;Since you posted only a part of the code, it is difficult to comment. Similarly, when you simply say "i don't get result that i expect" we are not told what you expect.&lt;/P&gt;

&lt;P&gt;When you report problems with code, it is usually necessary for you to give details of MKL and compiler version, OS, CPU model, etc.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 11:55:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-getdiag-problem/m-p/1111027#M24362</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2017-03-04T11:55:29Z</dc:date>
    </item>
    <item>
      <title>I'm running visual studio on</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-getdiag-problem/m-p/1111028#M24363</link>
      <description>&lt;P&gt;I'm running visual studio on win 7. I have MKL 2017 Update 2. I have intel compiler 2017.1.143. My cpu model is&amp;nbsp;&lt;SPAN style="font-variant-ligatures: no-common-ligatures"&gt;i7-3615QM&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 16:07:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-getdiag-problem/m-p/1111028#M24363</guid>
      <dc:creator>Oleg_S_</dc:creator>
      <dc:date>2017-03-04T16:07:09Z</dc:date>
    </item>
    <item>
      <title>Can someone tell why pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-getdiag-problem/m-p/1111029#M24364</link>
      <description>&lt;P&gt;Can someone tell why pardiso_getdiag thinks that i have zeros on a diagonal?&lt;/P&gt;</description>
      <pubDate>Sun, 05 Mar 2017 11:47:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-getdiag-problem/m-p/1111029#M24364</guid>
      <dc:creator>Oleg_S_</dc:creator>
      <dc:date>2017-03-05T11:47:03Z</dc:date>
    </item>
    <item>
      <title>I had not used pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-getdiag-problem/m-p/1111030#M24365</link>
      <description>&lt;P&gt;I had not used&amp;nbsp;pardiso_getdiag() before you brought it to my attention. The MKL document page contains the following contradictory statements:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;da: Array with a dimension of n. Contains diagonal elements of the initial matrix&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;and&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;Elements of da correspond to diagonal elements of matrix L computed during phase 22&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;It cannot be both (initial matrix A and L factor). So, MKL group, which is it? If the latter, how is &lt;STRONG&gt;da&lt;/STRONG&gt; different from &lt;STRONG&gt;df&lt;/STRONG&gt; ?&lt;/P&gt;

&lt;P&gt;Oleg: The solution of your equation set given by the dense Lapack solver DGESV agrees with the solution given by MKL-Pardiso, as well as Pardiso-5 from &lt;A href="https://community.intel.com/www.pardiso-project.org" target="_blank"&gt;www.pardiso-project.org&lt;/A&gt; . If you maintain that the results are incorrect you should &amp;nbsp;provide supporting arguments. Until I learn more about&amp;nbsp;&lt;SPAN style="font-size: 16.26px;"&gt;pardiso_getdiag()&amp;nbsp;&lt;/SPAN&gt;I would not not depend entirely on it to decide whether a solution is correct or not.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Mar 2017 13:47:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/pardiso-getdiag-problem/m-p/1111030#M24365</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2017-03-05T13:47:00Z</dc:date>
    </item>
  </channel>
</rss>

