<?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 solve linear NxM system mkl ifort in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-linear-NxM-system-mkl-ifort/m-p/809785#M3769</link>
    <description>hi everyone,&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I would like to solve a general nxm system in fortran ifort intel using mkl libraries or lapack.&lt;/DIV&gt;&lt;DIV&gt;Is this possible?&lt;/DIV&gt;&lt;DIV&gt;what subroutine should I use?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The system is not quadratic (nxn) but a general system.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;thank you very much&lt;/DIV&gt;</description>
    <pubDate>Tue, 14 Feb 2012 20:54:58 GMT</pubDate>
    <dc:creator>diedro</dc:creator>
    <dc:date>2012-02-14T20:54:58Z</dc:date>
    <item>
      <title>solve linear NxM system mkl ifort</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-linear-NxM-system-mkl-ifort/m-p/809785#M3769</link>
      <description>hi everyone,&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I would like to solve a general nxm system in fortran ifort intel using mkl libraries or lapack.&lt;/DIV&gt;&lt;DIV&gt;Is this possible?&lt;/DIV&gt;&lt;DIV&gt;what subroutine should I use?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The system is not quadratic (nxn) but a general system.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;thank you very much&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Feb 2012 20:54:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-linear-NxM-system-mkl-ifort/m-p/809785#M3769</guid>
      <dc:creator>diedro</dc:creator>
      <dc:date>2012-02-14T20:54:58Z</dc:date>
    </item>
    <item>
      <title>solve linear NxM system mkl ifort</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-linear-NxM-system-mkl-ifort/m-p/809786#M3770</link>
      <description>First of all, you need to specify what you mean by "solve" when you have an overdetermined (more equations than unknowns) or underdetermined (too few equations to determine the unknowns) problem. &lt;BR /&gt;&lt;BR /&gt;In the former case, usually the norm of the residual is to be minimized; see the section &lt;I&gt;Linear Least Squares (LLS) Problems &lt;/I&gt;in the MKL Reference Manual.&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;In the latter case, if the variables have been suitably scaled, you may look for the solution of minimal norm, or you may look for the analytic center.&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Feb 2012 00:25:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-linear-NxM-system-mkl-ifort/m-p/809786#M3770</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2012-02-15T00:25:40Z</dc:date>
    </item>
    <item>
      <title>solve linear NxM system mkl ifort</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-linear-NxM-system-mkl-ifort/m-p/809787#M3771</link>
      <description>hi,&lt;DIV&gt;I am trying to apply a "moving last square" to get the gradient and second derivaive af a known distribution of value.&lt;/DIV&gt;&lt;DIV&gt;This means that my sytem isoverdetermined. I would like simple inverte the matrix to solve the problem. I red on MKL manual that this is more stable and precise.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;What do you suggest? Are there any subs that do this?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;tahnk you&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Feb 2012 09:49:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-linear-NxM-system-mkl-ifort/m-p/809787#M3771</guid>
      <dc:creator>diedro</dc:creator>
      <dc:date>2012-02-15T09:49:41Z</dc:date>
    </item>
    <item>
      <title>solve linear NxM system mkl ifort</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-linear-NxM-system-mkl-ifort/m-p/809788#M3772</link>
      <description>&lt;I&gt;&amp;gt; This means that my sytem isoverdetermined. &lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;May be so, depending on how you define "moving least square".&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;&amp;gt; I would like simple inverte 
the matrix to solve the problem.&lt;/I&gt; &lt;BR /&gt;&lt;BR /&gt;If the system is overdetermined, the matrix is not square and therefore has no inverse in the usual sense.&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;&amp;gt; I red on MKL manual that this is more 
stable and precise&lt;BR /&gt;&lt;BR /&gt;&lt;/I&gt;Overdetermined equations are usually solved in the least-square-residual sense using the A = Q R decomposition, where Q is orthogonal and R is upper-triangular. MKL provides routines (?gels?) to do this.</description>
      <pubDate>Wed, 15 Feb 2012 12:44:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-linear-NxM-system-mkl-ifort/m-p/809788#M3772</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2012-02-15T12:44:28Z</dc:date>
    </item>
    <item>
      <title>solve linear NxM system mkl ifort</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-linear-NxM-system-mkl-ifort/m-p/809789#M3773</link>
      <description>hi,&lt;DIV&gt;now it works&lt;/DIV&gt;&lt;DIV&gt;this is the porblem&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;[bash]PROGRAM solve_mn[/bash][bash]USE LAPACK95
IMPLICIT NONE
!                                    
!         |   .000000000  2.000000000 |
!         |  2.000000000 -1.000000000 |
! A    =  |  2.000000000 -1.000000000 |
!         |   .000000000  1.500000000 |
!         |  2.000000000 -1.000000000 |
!         |  2.000000000 -1.000000000 |
!                                    

!                       
! B    =  |  1.000000000 |
!         |  1.000000000 |
!         |       .      |
!         |       .      |
!         |       .      |
!         |       .      |
!                       



INTEGER       M
INTEGER       N
INTEGER       NB
INTEGER       info
CHARACTER*1   trans  !type solver

REAL,   ALLOCATABLE  ,DIMENSION(:,:) ::AA    !SYSTEM
REAL,   ALLOCATABLE  ,DIMENSION(:)   ::XX    !UNKNOWN
REAL,   ALLOCATABLE  ,DIMENSION(:)   ::BB    !KNOWN

M  = 6  !ROWS
N  = 2  !COLUMNS

ALLOCATE (AA    (M,N ))
ALLOCATE (BB    (M))
AA(:,:)  = 0.d0
BB(:)    = 0.d0
XX(:)    = 0.d0

!----------------------------------------------------------------------------------
AA(1,1) =  0.d0
AA(1,2) =  2.d0
AA(2,1) =  2.d0
AA(2,2) = -1.d0
AA(3,1) =  2.d0
AA(3,2) = -1.d0
AA(4,1) =  0.d0
AA(4,2) = -1.5d0
AA(5,1) =  2.d0
AA(5,2) = -1.d0
AA(6,1) =  2.d0
AA(6,2) = -1.d0
BB(1)   = 1.d0
BB(2)   = 1.d0
BB(3)   = 0.d0
BB(4)   = 0.d0
BB(5)   = 0.d0
BB(6)   = 0.d0

!----------------------------------------------------------------------------------

CALL GELS(AA,BB,'N',info)



ENDPROGRAM[/bash] &lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;THANKS&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Feb 2012 14:15:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-linear-NxM-system-mkl-ifort/m-p/809789#M3773</guid>
      <dc:creator>diedro</dc:creator>
      <dc:date>2012-02-15T14:15:26Z</dc:date>
    </item>
  </channel>
</rss>

