<?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 Hi Jing X in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131595#M25637</link>
    <description>&lt;P&gt;Hi Jing X&lt;BR /&gt;
	Thanks for your comment.&amp;nbsp;&lt;BR /&gt;
	I reproduce my problem at my attached FORTRAN codes, test_mtype1.f and test_mtype11.f. These codes are based on pardiso_unsym_f.f, which is provided by Intel. I make some small changes in my own codes, mainly change the structural of matrix A (Ax=b) to make it structurally symmetric. And also change some of the nonzero values of A to make its condition number larger. The error are estimated through calculating the maxval(abs(b_new-b)), b_new=Ax_new, and x_new is the result calculated by pardiso. The only difference between test_mtype11.f and test_mtype1.f is the value of parameter mtype, and other parameters are all the same. &amp;nbsp;In test_mtype11.f, mtype =11(default value for real and unsymmetric matrix). In test_mtype1.f, mtype =1(default value for real and structurally symmetric matrix). Since my matrix is real and structurally symmetric, it is expected that test test_mtype1.f should get better result. However, for test_mtype1.f , &amp;nbsp;maxval(abs(b_new-b))=2.49e-14, for test_mtype11.f , &amp;nbsp;maxval(abs(b_new-b))=8.88e-14. It means in some cases for real and structurally symmetric matrix, we can get better result if we set mtype to be 11.&amp;nbsp;&lt;BR /&gt;
	However, I also make some other tests, change some of the nonzero values of A and keep it as real and structurally symmetric matrix. And I can get better result when mtype=1, the default value for real and structurally symmetric matrix.&lt;BR /&gt;
	In a word, according to my tests, for real and structurally symmetric matrix, sometimes we can get better result when mtype=1, and sometimes we can get better result when mtype=11.&amp;nbsp;&lt;BR /&gt;
	Regards,&amp;nbsp;&lt;BR /&gt;
	rf.qian&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jun 2017 06:01:32 GMT</pubDate>
    <dc:creator>qian_r_</dc:creator>
    <dc:date>2017-06-22T06:01:32Z</dc:date>
    <item>
      <title>how to deal with real and structurally symmetric matrix's parameters in PARDISO</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131591#M25633</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;I want to use&amp;nbsp;&amp;nbsp;PARDISO&amp;nbsp;to solve a problem, in which the matrix is real and structurally symmetric. I read the PARDISO Version 5.0.0 &amp;nbsp;Reference Sheet — Fortran, and Parallel Sparse Direct Solver PARDISO | User Guide Version 5.0.0. I also lean some code which solve problem with symmetric or non-symmetric matrices. I know the parameter mtype need to be 1, since my matrix is real and structurally symmetric. But I do not know how to deal with other parameters.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Any help would be appreciated.&lt;/P&gt;

&lt;P&gt;Regards,&amp;nbsp;&lt;BR /&gt;
	rf.qian&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 03:33:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131591#M25633</guid>
      <dc:creator>qian_r_</dc:creator>
      <dc:date>2017-06-19T03:33:24Z</dc:date>
    </item>
    <item>
      <title>The MKL version of Pardiso is</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131592#M25634</link>
      <description>&lt;P&gt;The MKL version of Pardiso is not quite the same as Pardiso-5. Do not use the Pardiso-5 documentation if you intend to use MKL-Pardiso, and vice versa.&lt;/P&gt;

&lt;P&gt;Both come with ready-to-run examples for symmetric and unsymmetric problems. You could start with one of those and adapt the example source code to match your needs.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 15:35:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131592#M25634</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2017-06-19T15:35:01Z</dc:date>
    </item>
    <item>
      <title>Hi mecej4</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131593#M25635</link>
      <description>&lt;P&gt;Hi mecej4&lt;/P&gt;

&lt;P&gt;Thanks for your suggestions.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I learned the code pardiso_unsym_f.f provided by Intel, which was my own code based on. Firstly I didn’t change any parameter such as mtype, iparm. The result was pretty good. Since my matrix was real and structurally symmetric, then I changed the parameter mtype to be 1, which was suggested by Intel for real and structurally symmetric matrix. And I did not change any other parameters, because the reference from Intel did not say anything about that. I was surprised to find that the new result was worse than the first one. Maybe I need to try to change some other parameters.&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
	rf.qian&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 02:45:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131593#M25635</guid>
      <dc:creator>qian_r_</dc:creator>
      <dc:date>2017-06-20T02:45:45Z</dc:date>
    </item>
    <item>
      <title>Do you have test code that</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131594#M25636</link>
      <description>&lt;P&gt;Do you have test code that can reproduce your problem?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 00:01:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131594#M25636</guid>
      <dc:creator>Jing_Xu</dc:creator>
      <dc:date>2017-06-22T00:01:58Z</dc:date>
    </item>
    <item>
      <title>Hi Jing X</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131595#M25637</link>
      <description>&lt;P&gt;Hi Jing X&lt;BR /&gt;
	Thanks for your comment.&amp;nbsp;&lt;BR /&gt;
	I reproduce my problem at my attached FORTRAN codes, test_mtype1.f and test_mtype11.f. These codes are based on pardiso_unsym_f.f, which is provided by Intel. I make some small changes in my own codes, mainly change the structural of matrix A (Ax=b) to make it structurally symmetric. And also change some of the nonzero values of A to make its condition number larger. The error are estimated through calculating the maxval(abs(b_new-b)), b_new=Ax_new, and x_new is the result calculated by pardiso. The only difference between test_mtype11.f and test_mtype1.f is the value of parameter mtype, and other parameters are all the same. &amp;nbsp;In test_mtype11.f, mtype =11(default value for real and unsymmetric matrix). In test_mtype1.f, mtype =1(default value for real and structurally symmetric matrix). Since my matrix is real and structurally symmetric, it is expected that test test_mtype1.f should get better result. However, for test_mtype1.f , &amp;nbsp;maxval(abs(b_new-b))=2.49e-14, for test_mtype11.f , &amp;nbsp;maxval(abs(b_new-b))=8.88e-14. It means in some cases for real and structurally symmetric matrix, we can get better result if we set mtype to be 11.&amp;nbsp;&lt;BR /&gt;
	However, I also make some other tests, change some of the nonzero values of A and keep it as real and structurally symmetric matrix. And I can get better result when mtype=1, the default value for real and structurally symmetric matrix.&lt;BR /&gt;
	In a word, according to my tests, for real and structurally symmetric matrix, sometimes we can get better result when mtype=1, and sometimes we can get better result when mtype=11.&amp;nbsp;&lt;BR /&gt;
	Regards,&amp;nbsp;&lt;BR /&gt;
	rf.qian&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 06:01:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131595#M25637</guid>
      <dc:creator>qian_r_</dc:creator>
      <dc:date>2017-06-22T06:01:32Z</dc:date>
    </item>
    <item>
      <title>Here are my codes</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131596#M25638</link>
      <description>&lt;P&gt;Here are my codes&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;Regards,&amp;nbsp;&lt;/SPAN&gt;&lt;BR style="font-size: 12px;" /&gt;
	&lt;SPAN style="font-size: 12px;"&gt;rf.qian&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 06:10:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131596#M25638</guid>
      <dc:creator>qian_r_</dc:creator>
      <dc:date>2017-06-22T06:10:16Z</dc:date>
    </item>
    <item>
      <title>May I ask which version of</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131597#M25639</link>
      <description>&lt;P&gt;May I ask which version of mkl are you using?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 07:21:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131597#M25639</guid>
      <dc:creator>Jing_Xu</dc:creator>
      <dc:date>2017-06-23T07:21:44Z</dc:date>
    </item>
    <item>
      <title>Hi Jing X</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131598#M25640</link>
      <description>&lt;P&gt;Hi Jing X&lt;/P&gt;

&lt;P&gt;My ifort version is Intel Fortran Compiler Professional Edition 11.1 for Linux, mkl version is Intel® Math Kernel Library (Intel® MKL) 10.2 Update 4.&lt;BR /&gt;
	I hope these information would be helpful.&lt;/P&gt;

&lt;P&gt;Regards,&amp;nbsp;&lt;BR /&gt;
	rf.qian&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 15:06:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131598#M25640</guid>
      <dc:creator>qian_r_</dc:creator>
      <dc:date>2017-06-23T15:06:33Z</dc:date>
    </item>
    <item>
      <title>I've checked your codes. They</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131599#M25641</link>
      <description>&lt;P&gt;I've checked your codes.&amp;nbsp;&lt;SPAN style="font-size: 1em;"&gt;They are correct.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;I think&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px;"&gt;e-14 is close enough to be considered as 0, thus there are no differences between 2e-14 and 8e-14.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 01:45:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131599#M25641</guid>
      <dc:creator>Jing_Xu</dc:creator>
      <dc:date>2017-06-27T01:45:30Z</dc:date>
    </item>
    <item>
      <title>Hi Jing X</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131600#M25642</link>
      <description>&lt;P&gt;Hi Jing X&lt;/P&gt;

&lt;P&gt;Thanks for your help.&lt;/P&gt;

&lt;P&gt;I can show another example, test2_mtype1.f90 and test2_mtype11.f90.&lt;/P&gt;

&lt;P&gt;The only difference between test2_mtype1.f90 and test2_mtype11.f90 is the value of parameter mtype, and other parameters are all the same. &amp;nbsp;In test2_mtype11.f90, mtype =11(default value for real and unsymmetric matrix). In test2_mtype1.f90, mtype =1(default value for real and structurally symmetric matrix).&lt;/P&gt;

&lt;P&gt;The error are still estimated through calculating the maxval (abs (b_new-b)), b_new=A*x_new, and x_new is the result calculated by pardiso.&lt;/P&gt;

&lt;P&gt;Since my matrix A is real and structurally symmetric, it is expected that test2_mtype1.f90 should get better result. However, for test2_mtype1.f90 , &amp;nbsp;maxval(abs(b_new-b))=2.48e-4, for test2_mtype11.f90 , &amp;nbsp;maxval(abs(b_new-b))=1.25e-6. It means in some cases for real and structurally symmetric matrix, we can get better result if we set mtype to be 11.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;In test2_mytype1.f90 and test2_mtype11.f90, the construction of sparse matrix A may looks puzzling. However, I’m confident that A is structurally symmetric.&lt;/P&gt;

&lt;P&gt;I rewrite the matrix A in Matlab code calc_A_diff.m, and isequal(A, A’)/=0, which means A is not symmetric. In code calc_A_same.m, all the non-zero elements are set to be 1, and isequal (A, A’) =0. In conclusion, A is structurally symmetric matrix.&lt;/P&gt;

&lt;P&gt;Since in test2_mtype1.f90 and test2_mtype11.f90, matrix A is constructed in csr format, and in calc_A_diff.m, A is constructed in coo format. It is necessary to prove A in Fortran code and Matlab code are the same. So I write comp_csr_coo.f90, in which I calculate A*phi. The result of A(coo format)*phi is b_coo_line, the result of A(csr format)*phi is b_csr_line. And maxval (abs (b_csr_line-b_coo_line)) = 8.39e-14. Besides, the absolute value of all the non-zero elements in A is greater than 1, and all the elements in phi are 1, so the error of maxval (abs (b_csr_line-b_coo_line)) is negligible. So I think A constructed in coo format and A constructed in csr format are the same.&lt;/P&gt;

&lt;P&gt;Attached are my codes. And err_be002.txt is used to calculate b (Ax=b) in test2_mtype1.f90 and test2_mtype11.f90.&lt;/P&gt;

&lt;P&gt;Regards,&amp;nbsp;&lt;BR /&gt;
	rf.qian&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 05:58:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/how-to-deal-with-real-and-structurally-symmetric-matrix-s/m-p/1131600#M25642</guid>
      <dc:creator>qian_r_</dc:creator>
      <dc:date>2017-06-27T05:58:59Z</dc:date>
    </item>
  </channel>
</rss>

