<?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 dgels  acts strange.. in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgels-acts-strange/m-p/914885#M12482</link>
    <description>Hi:&lt;BR /&gt; when I used dgels to solve my problem, the result showwederror. So I compile a new small program to test it :&lt;BR /&gt;
&lt;P&gt;program test_dgels&lt;/P&gt;
&lt;P&gt;program test_dgels&lt;BR /&gt;!DEC$ OBJCOMMENT LIB:'mkl_solver_sequential.lib'&lt;BR /&gt;!DEC$ OBJCOMMENT LIB:'mkl_intel_c.lib'&lt;BR /&gt;!DEC$ OBJCOMMENT LIB:'mkl_sequential.lib'&lt;BR /&gt;!DEC$ OBJCOMMENT LIB:'mkl_core.lib'&lt;BR /&gt;!DEC$ OBJCOMMENT LIB:'mkl_lapack95.lib' &lt;BR /&gt;implicit none&lt;BR /&gt;! here we just check the subroutine dgels&lt;BR /&gt;! equation is 2x1+x2 = 3 / x1+2x2 = 5&lt;BR /&gt;integer ,parameter :: m = 2,n =2,nrhs =1&lt;BR /&gt;real*8 a(m,n),b(n,nrhs)&lt;BR /&gt;integer i,j,lwork,info,astat&lt;BR /&gt;integer,allocatable :: work(:)&lt;/P&gt;
&lt;P&gt;lwork=min (m, n)+max(1, m, n, nrhs)&lt;BR /&gt;allocate(work(max(1,lwork)),stat =astat)&lt;BR /&gt;if(astat .NE. 0) then&lt;BR /&gt; print *,'work allocate error happen!'&lt;BR /&gt;endif&lt;BR /&gt; &lt;BR /&gt;data a /2.d0,1.d0,1.d0,2.d0/&lt;BR /&gt;b =(3.d0,5.d0)&lt;BR /&gt;call dgels('N',2,2,1,a,2,b,2,work,lwork,info)&lt;BR /&gt;print *,a(1,1)*b(1,1)+a(1,2)*b(2,1)&lt;/P&gt;
&lt;P&gt;deallocate(work,stat = astat)&lt;BR /&gt;if(astat .NE. 0) then&lt;BR /&gt; print *,'work deallocate error happen!'&lt;BR /&gt;endif&lt;BR /&gt;stop&lt;BR /&gt;end&lt;/P&gt;
&lt;P&gt;the result was not 3.0 but 4.0&lt;BR /&gt;Why?&lt;BR /&gt;Any answer is appreciated,thanks!&lt;BR /&gt;P&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jan 2010 15:08:52 GMT</pubDate>
    <dc:creator>ppthelion</dc:creator>
    <dc:date>2010-01-05T15:08:52Z</dc:date>
    <item>
      <title>dgels  acts strange..</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgels-acts-strange/m-p/914885#M12482</link>
      <description>Hi:&lt;BR /&gt; when I used dgels to solve my problem, the result showwederror. So I compile a new small program to test it :&lt;BR /&gt;
&lt;P&gt;program test_dgels&lt;/P&gt;
&lt;P&gt;program test_dgels&lt;BR /&gt;!DEC$ OBJCOMMENT LIB:'mkl_solver_sequential.lib'&lt;BR /&gt;!DEC$ OBJCOMMENT LIB:'mkl_intel_c.lib'&lt;BR /&gt;!DEC$ OBJCOMMENT LIB:'mkl_sequential.lib'&lt;BR /&gt;!DEC$ OBJCOMMENT LIB:'mkl_core.lib'&lt;BR /&gt;!DEC$ OBJCOMMENT LIB:'mkl_lapack95.lib' &lt;BR /&gt;implicit none&lt;BR /&gt;! here we just check the subroutine dgels&lt;BR /&gt;! equation is 2x1+x2 = 3 / x1+2x2 = 5&lt;BR /&gt;integer ,parameter :: m = 2,n =2,nrhs =1&lt;BR /&gt;real*8 a(m,n),b(n,nrhs)&lt;BR /&gt;integer i,j,lwork,info,astat&lt;BR /&gt;integer,allocatable :: work(:)&lt;/P&gt;
&lt;P&gt;lwork=min (m, n)+max(1, m, n, nrhs)&lt;BR /&gt;allocate(work(max(1,lwork)),stat =astat)&lt;BR /&gt;if(astat .NE. 0) then&lt;BR /&gt; print *,'work allocate error happen!'&lt;BR /&gt;endif&lt;BR /&gt; &lt;BR /&gt;data a /2.d0,1.d0,1.d0,2.d0/&lt;BR /&gt;b =(3.d0,5.d0)&lt;BR /&gt;call dgels('N',2,2,1,a,2,b,2,work,lwork,info)&lt;BR /&gt;print *,a(1,1)*b(1,1)+a(1,2)*b(2,1)&lt;/P&gt;
&lt;P&gt;deallocate(work,stat = astat)&lt;BR /&gt;if(astat .NE. 0) then&lt;BR /&gt; print *,'work deallocate error happen!'&lt;BR /&gt;endif&lt;BR /&gt;stop&lt;BR /&gt;end&lt;/P&gt;
&lt;P&gt;the result was not 3.0 but 4.0&lt;BR /&gt;Why?&lt;BR /&gt;Any answer is appreciated,thanks!&lt;BR /&gt;P&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2010 15:08:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgels-acts-strange/m-p/914885#M12482</guid>
      <dc:creator>ppthelion</dc:creator>
      <dc:date>2010-01-05T15:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: dgels  acts strange..</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgels-acts-strange/m-p/914886#M12483</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/433393"&gt;ppthelion&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; when I used dgels to solve my problem, the result showwederror. So I compile a new small program to test it :&lt;BR /&gt;
&lt;P&gt;program test_dgels&lt;BR /&gt;!DEC$ OBJCOMMENT LIB:'mkl_solver_sequential.lib'&lt;BR /&gt;!DEC$ OBJCOMMENT LIB:'mkl_intel_c.lib'&lt;BR /&gt;!DEC$ OBJCOMMENT LIB:'mkl_sequential.lib'&lt;BR /&gt;!DEC$ OBJCOMMENT LIB:'mkl_core.lib'&lt;BR /&gt;!DEC$ OBJCOMMENT LIB:'mkl_lapack95.lib' &lt;BR /&gt;implicit none&lt;BR /&gt;! here we just check the subroutine dgels&lt;BR /&gt;! equation is 2x1+x2 = 3 / x2+2x1 = 5&lt;BR /&gt;real*8 a(2,2),b(2,1)&lt;BR /&gt;integer i,j,work,lwork,info&lt;BR /&gt;integer,parameter :: opt = 80&lt;/P&gt;
&lt;P&gt;lwork=160&lt;BR /&gt;work = 180 &lt;BR /&gt;data a /2.d0,1.d0,1.d0,3.d0/&lt;BR /&gt;b =(3.d0,5.d0)&lt;BR /&gt;call dgels('N',2,2,1,a,2,b,2,work,lwork,info)&lt;BR /&gt;print *,a(1,1)*b(1,1)+a(1,2)*b(2,1)&lt;BR /&gt;stop&lt;/P&gt;
&lt;P&gt;end&lt;BR /&gt;But the result was not 3.0 but 4.0&lt;BR /&gt;Why?&lt;BR /&gt;Any answer is appreciated,thanks!&lt;BR /&gt;P&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
- the equations are the same, isn't it?&lt;BR /&gt;2x1+x2 = 3 / x2+2x1 = 5&lt;BR /&gt;- work is a workspace array, its dimension max(1, lwork).&lt;BR /&gt;will it help?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Jan 2010 19:17:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgels-acts-strange/m-p/914886#M12483</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2010-01-05T19:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: dgels  acts strange..</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgels-acts-strange/m-p/914887#M12484</link>
      <description>&lt;DIV style="margin: 0px; height: auto;"&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;This problem has been solved,Thanks !&lt;/DIV&gt;
&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Jan 2010 00:55:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/dgels-acts-strange/m-p/914887#M12484</guid>
      <dc:creator>ppthelion</dc:creator>
      <dc:date>2010-01-06T00:55:42Z</dc:date>
    </item>
  </channel>
</rss>

