<?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 dss_solve_real in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dss-solve-real/m-p/879758#M9395</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am trying to do the following with the MKL direct sparse solver. (I am using Intel Fortran 11.0.066 and MKL 10.1.0)&lt;BR /&gt;&lt;BR /&gt;I have a symmetricpositive definite sparse matrix. After factoring it, I do&lt;BR /&gt;&lt;BR /&gt;1. solve with MKL_DSS_FORWARD_SOLVE optionfollowed by solve with MKL_DSS_BACKWARD_SOLVE option&lt;BR /&gt;2. solve with MKL_DSS_DEFAULTS options&lt;BR /&gt;&lt;BR /&gt;They should both give the same answer, but they don't. &lt;BR /&gt;&lt;BR /&gt;I have attached a file where the matrix I am using is diagonal A = [2 0; 0 2]&lt;BR /&gt;&lt;BR /&gt;Could you please tell me what I am doing wrong?&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;Siva&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;[cpp]include 'mkl_dss.f90'

program main

use mkl_dss

implicit none

type(MKL_DSS_HANDLE) :: hDSS

double precision :: values(3)
integer :: rowIndex(3), columns(3)
integer :: perm(2)

double precision :: rhs(2), x1(2), x2(2), x(2)

values = 0.d0
values(1) = 2.d0
values(2) = 0.d0
values(3) = 2.d0

columns(1) = 1
columns(2) = 2
columns(3) = 2

rowIndex(1) = 1
rowIndex(2) = 3
rowIndex(3) = 4

rhs(1) = 1.d0
rhs(2) = 0.d0

perm(1) = 1
perm(2) = 2

if (dss_create( hDSS, MKL_DSS_DEFAULTS ) .ne. MKL_DSS_SUCCESS) then
    print*,'Error creating'
    stop
endif

if (dss_define_structure( hDSS, MKL_DSS_SYMMETRIC, rowIndex, 2, 2, columns, 3) &amp;amp;
                                         .ne. MKL_DSS_SUCCESS)  then
    print*,'Error defining structure'
    stop
endif    

if (dss_reorder( hDSS, MKL_DSS_AUTO_ORDER, perm ) .ne. MKL_DSS_SUCCESS)  then
    print*,'Error reordering'
    stop
endif

if (dss_factor_real( hDSS, MKL_DSS_POSITIVE_DEFINITE, values ) &amp;amp;
                                         .ne. MKL_DSS_SUCCESS)  then
    print*,'Error factoring'
    stop
endif

if (dss_solve_real( hDSS, MKL_DSS_FORWARD_SOLVE, rhs, 1, x1 ) &amp;amp;
                                         .ne. MKL_DSS_SUCCESS)  then
    print*,'Error forward solving'
    stop
endif

print*,x1

if (dss_solve_real( hDSS, MKL_DSS_BACKWARD_SOLVE, x1, 1, x2 ) &amp;amp;
                                         .ne. MKL_DSS_SUCCESS)  then
    print*,'Error backward solving'
    stop
endif

print*,x2

if (dss_solve_real( hDSS, MKL_DSS_DEFAULTS, rhs, 1, x ) &amp;amp;
                                         .ne. MKL_DSS_SUCCESS)  then
    print*,'Error solving'
    stop
endif

print*,x

end program main[/cpp]&lt;/PRE&gt;</description>
    <pubDate>Mon, 16 Mar 2009 21:51:12 GMT</pubDate>
    <dc:creator>siva</dc:creator>
    <dc:date>2009-03-16T21:51:12Z</dc:date>
    <item>
      <title>dss_solve_real</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dss-solve-real/m-p/879758#M9395</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am trying to do the following with the MKL direct sparse solver. (I am using Intel Fortran 11.0.066 and MKL 10.1.0)&lt;BR /&gt;&lt;BR /&gt;I have a symmetricpositive definite sparse matrix. After factoring it, I do&lt;BR /&gt;&lt;BR /&gt;1. solve with MKL_DSS_FORWARD_SOLVE optionfollowed by solve with MKL_DSS_BACKWARD_SOLVE option&lt;BR /&gt;2. solve with MKL_DSS_DEFAULTS options&lt;BR /&gt;&lt;BR /&gt;They should both give the same answer, but they don't. &lt;BR /&gt;&lt;BR /&gt;I have attached a file where the matrix I am using is diagonal A = [2 0; 0 2]&lt;BR /&gt;&lt;BR /&gt;Could you please tell me what I am doing wrong?&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;Siva&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;[cpp]include 'mkl_dss.f90'

program main

use mkl_dss

implicit none

type(MKL_DSS_HANDLE) :: hDSS

double precision :: values(3)
integer :: rowIndex(3), columns(3)
integer :: perm(2)

double precision :: rhs(2), x1(2), x2(2), x(2)

values = 0.d0
values(1) = 2.d0
values(2) = 0.d0
values(3) = 2.d0

columns(1) = 1
columns(2) = 2
columns(3) = 2

rowIndex(1) = 1
rowIndex(2) = 3
rowIndex(3) = 4

rhs(1) = 1.d0
rhs(2) = 0.d0

perm(1) = 1
perm(2) = 2

if (dss_create( hDSS, MKL_DSS_DEFAULTS ) .ne. MKL_DSS_SUCCESS) then
    print*,'Error creating'
    stop
endif

if (dss_define_structure( hDSS, MKL_DSS_SYMMETRIC, rowIndex, 2, 2, columns, 3) &amp;amp;
                                         .ne. MKL_DSS_SUCCESS)  then
    print*,'Error defining structure'
    stop
endif    

if (dss_reorder( hDSS, MKL_DSS_AUTO_ORDER, perm ) .ne. MKL_DSS_SUCCESS)  then
    print*,'Error reordering'
    stop
endif

if (dss_factor_real( hDSS, MKL_DSS_POSITIVE_DEFINITE, values ) &amp;amp;
                                         .ne. MKL_DSS_SUCCESS)  then
    print*,'Error factoring'
    stop
endif

if (dss_solve_real( hDSS, MKL_DSS_FORWARD_SOLVE, rhs, 1, x1 ) &amp;amp;
                                         .ne. MKL_DSS_SUCCESS)  then
    print*,'Error forward solving'
    stop
endif

print*,x1

if (dss_solve_real( hDSS, MKL_DSS_BACKWARD_SOLVE, x1, 1, x2 ) &amp;amp;
                                         .ne. MKL_DSS_SUCCESS)  then
    print*,'Error backward solving'
    stop
endif

print*,x2

if (dss_solve_real( hDSS, MKL_DSS_DEFAULTS, rhs, 1, x ) &amp;amp;
                                         .ne. MKL_DSS_SUCCESS)  then
    print*,'Error solving'
    stop
endif

print*,x

end program main[/cpp]&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Mar 2009 21:51:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dss-solve-real/m-p/879758#M9395</guid>
      <dc:creator>siva</dc:creator>
      <dc:date>2009-03-16T21:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: dss_solve_real</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dss-solve-real/m-p/879759#M9396</link>
      <description>&lt;DIV style="margin:0px;"&gt;Got it, have to do&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;MKL_DSS_FORWARD_SOLVE+MKL_DSS_REFINEMENT_OFF&lt;/P&gt;
etc. (see pardiso and dss documentation)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&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/104382"&gt;siva@colorado.edu&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,&lt;BR /&gt;&lt;BR /&gt;I am trying to do the following with the MKL direct sparse solver. (I am using Intel Fortran 11.0.066 and MKL 10.1.0)&lt;BR /&gt;&lt;BR /&gt;I have a symmetricpositive definite sparse matrix. After factoring it, I do&lt;BR /&gt;&lt;BR /&gt;1. solve with MKL_DSS_FORWARD_SOLVE optionfollowed by solve with MKL_DSS_BACKWARD_SOLVE option&lt;BR /&gt;2. solve with MKL_DSS_DEFAULTS options&lt;BR /&gt;&lt;BR /&gt;They should both give the same answer, but they don't. &lt;BR /&gt;&lt;BR /&gt;I have attached a file where the matrix I am using is diagonal A = [2 0; 0 2]&lt;BR /&gt;&lt;BR /&gt;Could you please tell me what I am doing wrong?&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;Siva&lt;BR /&gt;&lt;BR /&gt;
&lt;/EM&gt;&lt;PRE&gt;&lt;EM&gt;[cpp]include 'mkl_dss.f90'

program main

use mkl_dss

implicit none

type(MKL_DSS_HANDLE) :: hDSS

double precision :: values(3)
integer :: rowIndex(3), columns(3)
integer :: perm(2)

double precision :: rhs(2), x1(2), x2(2), x(2)

values = 0.d0
values(1) = 2.d0
values(2) = 0.d0
values(3) = 2.d0

columns(1) = 1
columns(2) = 2
columns(3) = 2

rowIndex(1) = 1
rowIndex(2) = 3
rowIndex(3) = 4

rhs(1) = 1.d0
rhs(2) = 0.d0

perm(1) = 1
perm(2) = 2

if (dss_create( hDSS, MKL_DSS_DEFAULTS ) .ne. MKL_DSS_SUCCESS) then
    print*,'Error creating'
    stop
endif

if (dss_define_structure( hDSS, MKL_DSS_SYMMETRIC, rowIndex, 2, 2, columns, 3) &amp;amp;
                                         .ne. MKL_DSS_SUCCESS)  then
    print*,'Error defining structure'
    stop
endif    

if (dss_reorder( hDSS, MKL_DSS_AUTO_ORDER, perm ) .ne. MKL_DSS_SUCCESS)  then
    print*,'Error reordering'
    stop
endif

if (dss_factor_real( hDSS, MKL_DSS_POSITIVE_DEFINITE, values ) &amp;amp;
                                         .ne. MKL_DSS_SUCCESS)  then
    print*,'Error factoring'
    stop
endif

if (dss_solve_real( hDSS, MKL_DSS_FORWARD_SOLVE, rhs, 1, x1 ) &amp;amp;
                                         .ne. MKL_DSS_SUCCESS)  then
    print*,'Error forward solving'
    stop
endif

print*,x1

if (dss_solve_real( hDSS, MKL_DSS_BACKWARD_SOLVE, x1, 1, x2 ) &amp;amp;
                                         .ne. MKL_DSS_SUCCESS)  then
    print*,'Error backward solving'
    stop
endif

print*,x2

if (dss_solve_real( hDSS, MKL_DSS_DEFAULTS, rhs, 1, x ) &amp;amp;
                                         .ne. MKL_DSS_SUCCESS)  then
    print*,'Error solving'
    stop
endif

print*,x

end program main[/cpp]&lt;/EM&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Mar 2009 02:30:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dss-solve-real/m-p/879759#M9396</guid>
      <dc:creator>siva</dc:creator>
      <dc:date>2009-03-17T02:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: dss_solve_real</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dss-solve-real/m-p/879760#M9397</link>
      <description>&lt;DIV style="margin: 0px; height: auto;"&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Hi, Siva!&lt;/DIV&gt;
&lt;BR /&gt;Thank you for the question. Youhave found in MKL documentation the correct solution of the problem. Currently by default DSSperforms up to tworefinementstepsfor better accuracy.Butafter forward (and diagonal) substitutions this should lead to wrong solution because refinement isperformed with original matrix. So, refinement stepsare incompatible with forward (and diagonal) solving steps, butDSSprovides full controlof these parameters (&lt;EM&gt;MKL_DSS_REFINEMENT_OFF&lt;/EM&gt; and &lt;EM&gt;MKL_DSS_REFINEMENT_ON&lt;/EM&gt;, &lt;EM&gt;MKL_DSS_FORWARD_SOLVE&lt;/EM&gt; etc.). Of course, PARDISO isoperatedby corresponding &lt;EM&gt;iparm&lt;/EM&gt; values, too. &lt;BR /&gt;Probably it will be better to switch off refinement steps in the case of forward and diagonal solving steps, but in this case it will be impossible to switchthem &lt;EM&gt;ON&lt;/EM&gt; in somespecial cases, if any.&lt;BR /&gt;&lt;BR /&gt;With best regards,&lt;BR /&gt;Sergey</description>
      <pubDate>Tue, 17 Mar 2009 09:26:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dss-solve-real/m-p/879760#M9397</guid>
      <dc:creator>Sergey_P_Intel2</dc:creator>
      <dc:date>2009-03-17T09:26:20Z</dc:date>
    </item>
  </channel>
</rss>

