<?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 for symmetric linear systems in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093768#M125001</link>
    <description>&lt;P&gt;&lt;FONT face="Courier New"&gt;for symmetric linear systems&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Courier New"&gt;Steve:&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Courier New"&gt;​There is a small error in the example for the non-symmetric matrix in the INTEL examples - it says symmetric in the FORTRAN text file.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Courier New"&gt;​John&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Mar 2016 17:51:35 GMT</pubDate>
    <dc:creator>JohnNichols</dc:creator>
    <dc:date>2016-03-02T17:51:35Z</dc:date>
    <item>
      <title>Cannot invert a matrix with IMSL routine LINDS</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093754#M124987</link>
      <description>&lt;P&gt;I am trying to use a standard IMSL routine LINDS to invert a positive definite matrix,.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I installed the IMSL library based on these instructions.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;A href="https://software.intel.com/en-us/articles/installing-and-using-the-imsl-libraries" target="_blank"&gt;https://software.intel.com/en-us/articles/installing-and-using-the-imsl-libraries&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Then I included the lines&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(102, 102, 102); font-family: 'Courier New', 'DejaVu Sans Mono', monospace, sans-serif; font-size: 14px; line-height: 22.4px;"&gt;INCLUDE 'link_fnl_shared.h'&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(102, 102, 102); font-family: 'Courier New', 'DejaVu Sans Mono', monospace, sans-serif; font-size: 14px; line-height: 22.4px;"&gt;use linds_int&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;in my program, before setting up the matrix to be inverted&lt;/P&gt;

&lt;P&gt;The program compiles without error, but when I debug it it, it exits without inverting the matrix. It &amp;nbsp;does not trigger a break &amp;nbsp;point, but it just stops.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Any help will be greatly appreciated. Thank you very much&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 22:38:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093754#M124987</guid>
      <dc:creator>Pratap__Sangeeta</dc:creator>
      <dc:date>2016-02-29T22:38:15Z</dc:date>
    </item>
    <item>
      <title>This would likely happen if</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093755#M124988</link>
      <description>&lt;P&gt;This would likely happen if you didn't set PATH to cover all dll you need at run time.&amp;nbsp; If your IMSL is the one bought as an option with ifort, that should happen if you open the ifort cmd window.&amp;nbsp; dependencywalker may be informative.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 23:05:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093755#M124988</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2016-02-29T23:05:21Z</dc:date>
    </item>
    <item>
      <title>No, I am using Intel Visual</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093756#M124989</link>
      <description>&lt;P&gt;No, I am using Intel Visual Fortran for Windows. Not sure where to look..&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 00:38:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093756#M124989</guid>
      <dc:creator>Pratap__Sangeeta</dc:creator>
      <dc:date>2016-03-01T00:38:18Z</dc:date>
    </item>
    <item>
      <title>When you run a Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093757#M124990</link>
      <description>&lt;P&gt;When you run a Fortran program in the Visual Studio debugger, you must first set a breakpoint on an executable statement. Otherwise, the program will run to completion and exit. If the program had a console window, that goes away too. My guess is that this is what is happening.&lt;/P&gt;

&lt;P&gt;Try this - select Debug &amp;gt; Start without debugging. &amp;nbsp;What happens?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 01:13:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093757#M124990</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-03-01T01:13:42Z</dc:date>
    </item>
    <item>
      <title>I ran the example given in</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093758#M124991</link>
      <description>&lt;P&gt;I ran the example given in the IMSL documentation for LINDS. I obtained the correct results and the test code ran with no errors.&lt;/P&gt;

&lt;P&gt;As Steve has stated, the normal sequence of events is for the program to run in the debugger to completion, i.e., until a STOP or END statement is executed, if no keyboard input is required. If you did run into difficulties when you ran your code, you will need to provide details of the test case, etc.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 09:18:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093758#M124991</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2016-03-01T09:18:50Z</dc:date>
    </item>
    <item>
      <title>When I start without</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093759#M124992</link>
      <description>&lt;P&gt;When I start without debugging, I get a message&amp;nbsp;&lt;/P&gt;

&lt;P&gt;*** TERMINAL ERROR 2 FROM LINDS. The required storage cannot be allocated. The workspace is based on N, where N=1258655008.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;The matrix I am inverting is 11 by 11.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Steve Lionel (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;When you run a Fortran program in the Visual Studio debugger, you must first set a breakpoint on an executable statement. Otherwise, the program will run to completion and exit. If the program had a console window, that goes away too. My guess is that this is what is happening.&lt;/P&gt;

&lt;P&gt;Try this - select Debug &amp;gt; Start without debugging. &amp;nbsp;What happens?&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 17:58:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093759#M124992</guid>
      <dc:creator>Pratap__Sangeeta</dc:creator>
      <dc:date>2016-03-01T17:58:56Z</dc:date>
    </item>
    <item>
      <title>Sounds as if you passed an</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093760#M124993</link>
      <description>&lt;P&gt;Sounds as if you passed an uninitialized variable. Please show us a small but complete test case.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 18:21:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093760#M124993</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-03-01T18:21:13Z</dc:date>
    </item>
    <item>
      <title>Here is the program</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093761#M124994</link>
      <description>&lt;P&gt;Here is the program&lt;/P&gt;

&lt;P&gt;If I write the whole program in the main program it runs fine. The problem arises when I do it in the subroutine.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you again for your time.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;______________&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;program Test&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; INCLUDE 'link_fnl_shared.h'&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; use linds_int&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; implicit none&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; integer nf, nt, i, j&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; parameter (nf=338, nt=11)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; real a(nf,nt), apa(nt, nt), apainv(nt, nt), eye(nt, nt)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; do i=1,nf&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do j=1,nt&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a(i,j)=real(i/j)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end do&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; end do&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; call getinv(a, nf, nt, apa, apainv)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; eye=matmul(apa, apainv)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; do i=1, nt&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; write(*,*) &amp;nbsp;eye(i,:)&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; pause&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; end do&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;end program Test&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; subroutine getinv(a, nf, nt, apa, apainv)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; external linds&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; integer nf, nt&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; real a(nf, nt), ap(nt, nf), apa(nt,nt), apainv(nt, nt)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; ap=transpose(a)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; apa=matmul(ap, a)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; call linds (apa, apainv)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; end&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2016 19:22:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093761#M124994</guid>
      <dc:creator>Pratap__Sangeeta</dc:creator>
      <dc:date>2016-03-01T19:22:19Z</dc:date>
    </item>
    <item>
      <title>You have some rather basic</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093762#M124995</link>
      <description>&lt;P&gt;You have some rather basic errors in your code, and it is to your benefit to read Fortran books and understand why your program did not work.&lt;/P&gt;

&lt;P&gt;You call a subroutine (LINDS) that requires an explicit interface, but you did not provide one. The "use linds_int" is not useful in a routine from which LINDS is &lt;EM&gt;not&lt;/EM&gt; called. On the other hand, it must be included in any routine that calls LINDS.&lt;/P&gt;

&lt;P&gt;Move the USE LINDS_INT statement from the main program to the subroutine GETINV, remove the EXTERNAL statement, and your program will work.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 03:14:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093762#M124995</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2016-03-02T03:14:00Z</dc:date>
    </item>
    <item>
      <title>Thank you for your help. It</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093763#M124996</link>
      <description>&lt;P&gt;Thank you for your help. It does indeed work.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Re. Fortran books, do you have a particular recommendation?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Finally, I find that the computation of the inverse is accurate when everything is declared as double precision (real*8), rather than real. When I declare&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;as real, the inverse multiplied by the matrix was off the identity matrix (diagonal was 1.007 for example, off diagonals were also non zero from the third decimal place ). &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;In comparison, the Numerical recipes routines ludcmp and lubksb performed well for real variables and I did not have this inaccuracy. .&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Is that s&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;omething one needs to be careful about in all IMSL routines or just this particular one?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Thank you again for your time and patience in answering my rather elementary question.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Best wishes&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 16:36:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093763#M124996</guid>
      <dc:creator>Pratap__Sangeeta</dc:creator>
      <dc:date>2016-03-02T16:36:05Z</dc:date>
    </item>
    <item>
      <title>The Lawrence book is NOT</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093766#M124999</link>
      <description>&lt;P&gt;The Lawrence book is NOT about Fortran - it's how to create Windows API applications in Compaq (and Intel) Visual Fortran.&lt;/P&gt;

&lt;P&gt;I mentioned some books in&amp;nbsp;https://software.intel.com/en-us/blogs/2013/12/30/doctor-fortran-in-its-a-modern-fortran-world&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 17:37:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093766#M124999</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-03-02T17:37:42Z</dc:date>
    </item>
    <item>
      <title>John, please mention the</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093769#M125002</link>
      <description>&lt;P&gt;John, please mention the example error in the MKL forum.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 19:01:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093769#M125002</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2016-03-02T19:01:46Z</dc:date>
    </item>
    <item>
      <title>Quote:Sangeeta P. wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093770#M125003</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Sangeeta P. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P style="font-size: 16.26px; line-height: 22.1727px;"&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I find that the computation of the inverse is accurate when everything is declared as double precision (real*8), rather than real. When I declare&amp;nbsp;as real, the inverse multiplied by the matrix was off the identity matrix (diagonal was 1.007 for example, off diagonals were also non zero from the third decimal place ). &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;In comparison, the Numerical recipes routines ludcmp and lubksb performed well for real variables and I did not have this inaccuracy. .&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Is that something one needs to be careful about in all IMSL routines or just this particular one?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The finding (regarding results with real*8 versus real) is somewhat unexpected. Please present the specific test case in detail. Most of the time, such discrepancies are caused by passing incorrect arguments to routines such as LINDS.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 01:20:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093770#M125003</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2016-03-03T01:20:54Z</dc:date>
    </item>
    <item>
      <title>There is *always* some round</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093772#M125005</link>
      <description>&lt;P&gt;There is *always* some round-off error when inverting a matrix using a finite-resolution algorithm. If it is ill-conditioned then the error will show up under a smaller resolution than when it is not. The observation that round-off is serious under REAL*4 than REAL*8 tells me that the reason might be&amp;nbsp;that the subject matrix is ill conditioned, rather than an algorithm error.&lt;/P&gt;

&lt;P&gt;Any&amp;nbsp;good text on numerical methods should discuss the conditioning concept.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 16:41:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093772#M125005</guid>
      <dc:creator>dboggs</dc:creator>
      <dc:date>2016-03-03T16:41:53Z</dc:date>
    </item>
    <item>
      <title>Dear all</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093773#M125006</link>
      <description>&lt;P&gt;Dear all&lt;/P&gt;

&lt;P&gt;Thanks for the comments and suggestions, especially on good reference books.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Here is my program using comparing LINDS and the routines LUDCMP&amp;amp; LUBKSB.&lt;/P&gt;

&lt;P&gt;They are not terribly different, but the latter is marginally better. Using REAL and REAL*8 creates a substantial difference. To get the latter, please just change the declarations on the main program and the&amp;nbsp;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;LUDCMP&amp;amp; LUBKSB subroutines.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;Thanks again everyone, for engaging with my problem.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;Sangeeta&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="line-height: 19.512px;"&gt;______________________________________________&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;program Test&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; INCLUDE 'link_fnl_shared.h'&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; use linds_int&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; implicit none&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; integer nf, nt, i, j&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; parameter (nf=338, nt=3)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; integer indx(nt)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; real a(nf,nt), ap(nt, nf), &amp;nbsp;apa(nt, nt), apainv(nt, nt), eye(nt, nt), b(nf,nt), bp(nt, nf), bpb(nt, nt), bpbinv(nt, nt), eyenew(nt,nt), d, perfecteye(nt, nt), norm_linds, norm_nr&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; do i=1,nf&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do j=1,nt&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a(i,j)=real(i/j)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b(i,j)=a(i,j)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end do&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; end do&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; ap=transpose(a)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; apa=matmul(ap, a)&lt;BR /&gt;
	&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; !Constructing inverse with LINDS&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; call linds (apa, apainv)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; eye=matmul(apa, apainv)&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; !Constructing inverse with LUDCMP &amp;amp; LUBKSB&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; bp=transpose(b)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; bpb=matmul(bp, b)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; !Initializing inverse and creating the accurate identity matrix perfecteye&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; do i=1, nt&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do j=1,nt&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bpbinv(i,j)=0.d0&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; perfecteye(i,j)=0.d0&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end do&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bpbinv(i,i)=1.d0&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; perfecteye(i,i)=1.d0&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; end do&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; call ludcmp(bpb, nt, nt, indx, d)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; do j=1, nt&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; call lubksb(bpb, nt, nt, indx, bpbinv(1, j))&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; end do&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; eyenew=matmul(apa, bpbinv)&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; !Comparing the distance between perfecteye and the identity matrix got by multiplying the matrix and the inverse&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; norm_linds=sum(abs(eye-perfecteye))&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; norm_nr=sum(abs(eyenew-perfecteye))&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; write(*,*) norm_linds, norm_nr&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; pause&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; end program Test&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;SUBROUTINE ludcmp(a,n,np,indx,d)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; INTEGER n,np,indx(n),NMAX&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; REAL d,a(np,np),TINY&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; PARAMETER (NMAX=500,TINY=1.0e-20)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; INTEGER i,imax,j,k&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; REAL aamax,dum,sum,vv(NMAX)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; d=1.&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; do 12 i=1,n&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aamax=0.&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do 11 j=1,n&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (abs(a(i,j)).gt.aamax) aamax=abs(a(i,j))&lt;BR /&gt;
	11 &amp;nbsp; &amp;nbsp; &amp;nbsp;continue&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (aamax.eq.0.) pause 'singular matrix in ludcmp'&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vv(i)=1./aamax&lt;BR /&gt;
	12 &amp;nbsp; &amp;nbsp;continue&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; do 19 j=1,n&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do 14 i=1,j-1&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sum=a(i,j)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do 13 k=1,i-1&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sum=sum-a(i,k)*a(k,j)&lt;BR /&gt;
	13 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;continue&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a(i,j)=sum&lt;BR /&gt;
	14 &amp;nbsp; &amp;nbsp; &amp;nbsp;continue&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aamax=0.&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do 16 i=j,n&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sum=a(i,j)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do 15 k=1,j-1&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sum=sum-a(i,k)*a(k,j)&lt;BR /&gt;
	15 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;continue&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a(i,j)=sum&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dum=vv(i)*abs(sum)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (dum.ge.aamax) then&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; imax=i&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aamax=dum&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; endif&lt;BR /&gt;
	16 &amp;nbsp; &amp;nbsp; &amp;nbsp;continue&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (j.ne.imax)then&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do 17 k=1,n&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dum=a(imax,k)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a(imax,k)=a(j,k)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a(j,k)=dum&lt;BR /&gt;
	17 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;continue&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; d=-d&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vv(imax)=vv(j)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; endif&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; indx(j)=imax&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(a(j,j).eq.0.)a(j,j)=TINY&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(j.ne.n)then&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dum=1./a(j,j)&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do 18 i=j+1,n&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a(i,j)=a(i,j)*dum&lt;BR /&gt;
	18 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;continue&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; endif&lt;BR /&gt;
	19 &amp;nbsp; &amp;nbsp;continue&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; return&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; END&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;SUBROUTINE lubksb(a,n,np,indx,b)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; INTEGER n,np,indx(n)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; REAL a(np,np),b(n)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; INTEGER i,ii,j,ll&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; REAL sum&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; ii=0&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; do 12 i=1,n&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ll=indx(i)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sum=b(ll)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b(ll)=b(i)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (ii.ne.0)then&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do 11 j=ii,i-1&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sum=sum-a(i,j)*b(j)&lt;BR /&gt;
	11 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;continue&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (sum.ne.0.) then&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ii=i&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; endif&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b(i)=sum&lt;BR /&gt;
	12 &amp;nbsp; &amp;nbsp;continue&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; do 14 i=n,1,-1&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sum=b(i)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; do 13 j=i+1,n&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sum=sum-a(i,j)*b(j)&lt;BR /&gt;
	13 &amp;nbsp; &amp;nbsp; &amp;nbsp;continue&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b(i)=sum/a(i,i)&lt;BR /&gt;
	14 &amp;nbsp; &amp;nbsp;continue&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; return&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; END&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 16:51:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093773#M125006</guid>
      <dc:creator>Pratap__Sangeeta</dc:creator>
      <dc:date>2016-03-03T16:51:38Z</dc:date>
    </item>
    <item>
      <title>I have this comment regarding</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093775#M125008</link>
      <description>&lt;P&gt;I have this comment regarding the first part of the program code in #20.&lt;/P&gt;

&lt;P&gt;You compute X = A&lt;SUP&gt;T&lt;/SUP&gt;A for a matrix A of size 338 X 3 and then find the inverse of X. For the particular matrix that you chose, i.e., a&lt;SUB&gt;ij&lt;/SUB&gt; = floor(i/j), the condition number of A is &amp;nbsp;about 930, and the condition number of X is the square of that, i.e., about 9 X 10&lt;SUP&gt;5&lt;/SUP&gt;. If you calculate X in single precision, that means that only one or two significant digits may be correct.&lt;/P&gt;

&lt;P&gt;Two further points to note: in general, it is bad to form the normal matrix X and then work with it. If your ultimate objective is to solve overdetermined linear equations A.x = b, for example, rather than forming X, use the well-known QR decomposition of A. Likewise, it is bad practice to form the inverse matrix explictly if your objective is to solve linear equations. When I say "bad", I mean (i) inefficient and (ii) inaccurate. Any book on numerical analysis and Wikipedia articles can provide you with details on why the "bad" happens.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2016 03:40:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093775#M125008</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2016-03-04T03:40:09Z</dc:date>
    </item>
    <item>
      <title>Fortran Books:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093764#M124997</link>
      <description>&lt;P&gt;Fortran Books:&lt;/P&gt;

&lt;P&gt;Lawrences - Compaq Visual Fortran is not bad - a bit dated&lt;/P&gt;

&lt;P&gt;The Metcalf and Reid books are all good -&amp;nbsp; a bit to academic at times.&lt;/P&gt;

&lt;P&gt;If you want to learn to program well - try Abelson and Sussman or Winston and Horne - all LISP - but if you LISP well - you are a long way forward.&lt;/P&gt;

&lt;P&gt;The old MICROSOFT Fortran manuals are wonderful if you can get them.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 17:30:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093764#M124997</guid>
      <dc:creator>JohnNichols</dc:creator>
      <dc:date>2016-03-02T17:30:45Z</dc:date>
    </item>
    <item>
      <title> </title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093765#M124998</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;In comparison, the Numerical recipes routines ludcmp and lubksb performed well for real variables and I did not have this inaccuracy. .&amp;nbsp;&lt;/P&gt;

&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;

&lt;P&gt;I have been playng with three inverters, one from Harrison in 1973, one from Conte and deBoore which is mid 70's and I just got through getting PARDISO to run with these problems.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;All gave the inversions to an accuracy of at least six figures and agreed.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;!===============================================================================
! Copyright 2004-2016 Intel Corporation All Rights Reserved.
!
! The source code,&amp;nbsp; information&amp;nbsp; and material&amp;nbsp; ("Material") contained&amp;nbsp; herein is
! owned by Intel Corporation or its&amp;nbsp; suppliers or licensors,&amp;nbsp; and&amp;nbsp; title to such
! Material remains with Intel&amp;nbsp; Corporation or its&amp;nbsp; suppliers or&amp;nbsp; licensors.&amp;nbsp; The
! Material&amp;nbsp; contains&amp;nbsp; proprietary&amp;nbsp; information&amp;nbsp; of&amp;nbsp; Intel or&amp;nbsp; its suppliers&amp;nbsp; and
! licensors.&amp;nbsp; The Material is protected by&amp;nbsp; worldwide copyright&amp;nbsp; laws and treaty
! provisions.&amp;nbsp; No part&amp;nbsp; of&amp;nbsp; the&amp;nbsp; Material&amp;nbsp;&amp;nbsp; may&amp;nbsp; be&amp;nbsp; used,&amp;nbsp; copied,&amp;nbsp; reproduced,
! modified, published,&amp;nbsp; uploaded, posted, transmitted,&amp;nbsp; distributed or disclosed
! in any way without Intel's prior express written permission.&amp;nbsp; No license under
! any patent,&amp;nbsp; copyright or other&amp;nbsp; intellectual property rights&amp;nbsp; in the Material
! is granted to&amp;nbsp; or&amp;nbsp; conferred&amp;nbsp; upon&amp;nbsp; you,&amp;nbsp; either&amp;nbsp;&amp;nbsp; expressly,&amp;nbsp; by implication,
! inducement,&amp;nbsp; estoppel&amp;nbsp; or&amp;nbsp; otherwise.&amp;nbsp; Any&amp;nbsp; license&amp;nbsp;&amp;nbsp; under such&amp;nbsp; intellectual
! property rights must be express and approved by Intel in writing.
!
! Unless otherwise agreed by Intel in writing,&amp;nbsp; you may not remove or alter this
! notice or&amp;nbsp; any&amp;nbsp; other&amp;nbsp; notice&amp;nbsp;&amp;nbsp; embedded&amp;nbsp; in&amp;nbsp; Materials&amp;nbsp; by&amp;nbsp; Intel&amp;nbsp; or Intel's
! suppliers or licensors in any way.
!===============================================================================

!===============================================================================
! Copyright 2004-2016 Intel Corporation All Rights Reserved.
!
! The source code,&amp;nbsp; information&amp;nbsp; and material&amp;nbsp; ("Material") contained&amp;nbsp; herein is
! owned by Intel Corporation or its&amp;nbsp; suppliers or licensors,&amp;nbsp; and&amp;nbsp; title to such
! Material remains with Intel&amp;nbsp; Corporation or its&amp;nbsp; suppliers or&amp;nbsp; licensors.&amp;nbsp; The
! Material&amp;nbsp; contains&amp;nbsp; proprietary&amp;nbsp; information&amp;nbsp; of&amp;nbsp; Intel or&amp;nbsp; its suppliers&amp;nbsp; and
! licensors.&amp;nbsp; The Material is protected by&amp;nbsp; worldwide copyright&amp;nbsp; laws and treaty
! provisions.&amp;nbsp; No part&amp;nbsp; of&amp;nbsp; the&amp;nbsp; Material&amp;nbsp;&amp;nbsp; may&amp;nbsp; be&amp;nbsp; used,&amp;nbsp; copied,&amp;nbsp; reproduced,
! modified, published,&amp;nbsp; uploaded, posted, transmitted,&amp;nbsp; distributed or disclosed
! in any way without Intel's prior express written permission.&amp;nbsp; No license under
! any patent,&amp;nbsp; copyright or other&amp;nbsp; intellectual property rights&amp;nbsp; in the Material
! is granted to&amp;nbsp; or&amp;nbsp; conferred&amp;nbsp; upon&amp;nbsp; you,&amp;nbsp; either&amp;nbsp;&amp;nbsp; expressly,&amp;nbsp; by implication,
! inducement,&amp;nbsp; estoppel&amp;nbsp; or&amp;nbsp; otherwise.&amp;nbsp; Any&amp;nbsp; license&amp;nbsp;&amp;nbsp; under such&amp;nbsp; intellectual
! property rights must be express and approved by Intel in writing.
!
! Unless otherwise agreed by Intel in writing,&amp;nbsp; you may not remove or alter this
! notice or&amp;nbsp; any&amp;nbsp; other&amp;nbsp; notice&amp;nbsp;&amp;nbsp; embedded&amp;nbsp; in&amp;nbsp; Materials&amp;nbsp; by&amp;nbsp; Intel&amp;nbsp; or Intel's
! suppliers or licensors in any way.
!===============================================================================

*&amp;nbsp;&amp;nbsp; Content : MKL PARDISO Fortran example
*
********************************************************************************
C----------------------------------------------------------------------
C Example program to show the use of the "PARDISO" routine
C for symmetric linear systems
C---------------------------------------------------------------------
C This program can be downloaded from the following site:
C &lt;A href="https://community.intel.com/www.pardiso-project.org" target="_blank"&gt;www.pardiso-project.org&lt;/A&gt;
C
C (C) Olaf Schenk, Department of Computer Science,
C University of Basel, Switzerland.
C Email: olaf.schenk@unibas.ch
C
C---------------------------------------------------------------------

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MODULE Solver
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTEGER, PARAMETER :: dp = selected_real_kind(15, 307)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REAL (KIND=dp) :: g = 9.806, pi = 3.14159265D0

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contains

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subroutine linsolve(n, error, nnz, a, ja, ia, b)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; implicit none
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; include 'mkl_pardiso.fi'

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTEGER :: n, nnz
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REAL (KIND=dp) :: x(n) ! Pardiso needs X(N) even if sol is returned in b
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REAL (KIND=dp) :: b(n)
C.. Internal solver memory pointer for 64-bit architectures
C.. INTEGER*8 pt(64)
C.. Internal solver memory pointer for 32-bit architectures
C.. INTEGER*4 pt(64)
C.. This is OK in both cases
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TYPE(MKL_PARDISO_HANDLE) pt(64)
C.. All other variables
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTEGER maxfct, mnum, mtype, phase, nrhs, msglvl
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTEGER iparm(64)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTEGER ia(nnz)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTEGER ja(nnz)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTEGER i, idum(1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REAL (KIND=dp) ::&amp;nbsp; ddum(1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer error
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REAL (KIND=dp) a(nnz)
C.. Fill all arrays containing matrix data.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATA nrhs /1/, maxfct /1/, mnum /1/
C..
C.. Setup PARDISO control parameter
C..
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DO i = 1, 64
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(i) = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END DO
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(1) = 1 ! no solver default
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(2) = 2 ! fill-in reordering from METIS
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(3) = 1 ! numbers of processors
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(4) = 0 ! no iterative-direct algorithm
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(5) = 0 ! no user fill-in reducing permutation
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(6) = 0 ! =0 solution on the first n components of x
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(7) = 0 ! not in use
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(8) = 9 ! numbers of iterative refinement steps
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(9) = 0 ! not in use
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(10) = 13 ! perturb the pivot elements with 1E-13
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(11) = 1 ! use nonsymmetric permutation and scaling MPS
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(12) = 0 ! not in use
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(13) = 1 ! maximum weighted matching algorithm is switched-on (default for non-symmetric)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(14) = 0 ! Output: number of perturbed pivots
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(15) = 0 ! not in use
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(16) = 0 ! not in use
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(17) = 0 ! not in use
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(18) = -1 ! Output: number of nonzeros in the factor LU
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(19) = -1 ! Output: Mflops for LU factorization
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(20) = 0 ! Output: Numbers of CG Iterations
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; error = 0 ! initialize error flag
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msglvl = 1 ! print statistical information
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mtype = 11 ! real unsymmetric
C.. Initialize the internal solver memory pointer. This is only
C necessary for the FIRST call of the PARDISO solver.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DO i = 1, 64
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pt(i)%DUMMY = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END DO
C.. Reordering and Symbolic Factorization, This step also allocates
C&amp;nbsp;&amp;nbsp; all memory that is necessary for the factorization
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; phase = 11 ! only reordering and symbolic factorization
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALL pardiso (pt, maxfct, mnum, mtype, phase, n, a, ia, ja,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;idum, nrhs, iparm, msglvl, ddum, ddum, error)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WRITE(*,*) 'Reordering completed ... '
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF (error .NE. 0) THEN
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WRITE(*,*) 'The following ERROR was detected: ', error
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STOP 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END IF
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WRITE(*,*) 'Number of nonzeros in factors = ',iparm(18)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WRITE(*,*) 'Number of factorization MFLOPS = ',iparm(19)
C.. Factorization.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; phase = 22 ! only factorization
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALL pardiso (pt, maxfct, mnum, mtype, phase, n, a, ia, ja,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;idum, nrhs, iparm, msglvl, ddum, ddum, error)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WRITE(*,*) 'Factorization completed ... '
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF (error .NE. 0) THEN
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WRITE(*,*) 'The following ERROR was detected: ', error
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STOP 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END IF
C.. Back substitution and iterative refinement
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iparm(8) = 2 ! max numbers of iterative refinement steps
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; phase = 33 ! only factorization
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALL pardiso (pt, maxfct, mnum, mtype, phase, n, a, ia, ja,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;idum, nrhs, iparm, msglvl, b, x, error)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WRITE(*,*) 'Solve completed ... '
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WRITE(*,*) 'The solution of the system is '
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DO i = 1, n
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WRITE(*,*) ' x(',i,') = ', x(i)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END DO
C.. Termination and release of memory
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; phase = -1 ! release internal memory
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CALL pardiso (pt, maxfct, mnum, mtype, phase, n, ddum, idum,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;idum, idum, nrhs, iparm, msglvl, ddum, ddum, error)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End subroutine linsolve

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end module
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 17:37:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093765#M124998</guid>
      <dc:creator>JohnNichols</dc:creator>
      <dc:date>2016-03-02T17:37:11Z</dc:date>
    </item>
    <item>
      <title>The driver routine for</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093767#M125000</link>
      <description>&lt;P&gt;The driver routine for PARDISO to take a square matrix and put it into the correct form is shown - it is not pretty - merely allows me to test LINSOLVE before I use it for real.&lt;/P&gt;

&lt;P&gt;ludcmp and lubksb ​--&amp;nbsp; PARDISO is a lot faster -- a.txt is the sample from the INTEL examples.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Lawrence is a good book --&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;!------------------------------------------------------------------------------------------------------------------------
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Test Problem
!
!------------------------------------------------------------------------------------------------------------------------
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ja(1) = 1
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ja(2) = 2
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ja(3) = 4
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ja(4) = 1
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ja(5) = 2
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ja(6) = 3
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ja(7) = 4
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ja(8) = 5
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ja(9) = 1
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ja(10) = 3
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ja(11) = 4
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ja(12) = 2
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ja(13) = 5

!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ia(1) = 1
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ia(2) = 4
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ia(3) = 6
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ia(4) = 9
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ia(5) = 12
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ia(6) = 14

!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a(1) = 1.d0
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a(2) = -1.d0
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a(3) = -3.d0
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a(4) = -2.d0
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a(5) = 5.d0
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a(6) = 4.d0
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a(7) = 6.d0
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a(8) = 4.d0
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a(9) = -4.d0
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a(10)= 2.d0
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a(11) = -7.d0
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a(12) = 8.d0
!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a(13) = -5.d0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
!DATA a
! 1&amp;nbsp; / 1.d0,-1.d0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -3.d0,
! 2&amp;nbsp;&amp;nbsp; -2.d0, 5.d0,
!&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.d0, 6.d0, 4.d0,
!&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp; -4.d0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.d0, 7.d0,
!&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8.d0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -5.d0/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PROGRAM pardiso_unsym

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; use Solver
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IMPLICIT NONE

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; include 'mkl_pardiso.fi'


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REAL (KIND=dp), ALLOCATABLE :: a(:), b(:), c(:,:), atemp(:)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer, allocatable :: ja(:), ia(:), iatemp(:), jatemp(:)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTEGER :: nnodes = 5
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer error, iaN
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer :: nnz = 200, istat, i, j , count
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer :: size = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer :: size1 = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer :: size2 = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer :: flag = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REAL (KIND=dp) :: delta = 0.000000000000001


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; open(1, file="a.txt", STATUS = 'old')

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; read(1,*)count
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nnodes = count&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iaN = count+1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ALLOCATE (a(nnz), ja(nnz), ia(iaN), jatemp(nnz), iatemp(iaN), b(count), c(count,count), atemp(nnz), STAT=istat)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF (istat.NE.0) THEN
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WRITE (*, *) '*** Could not allocate some arrays in LINSOLVE'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STOP
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END IF

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b = 1.0D0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a = 0.0d0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c = 0.0d0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iatemp = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jatemp = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; atemp = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ia = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ja = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do 200 i = 1, count
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flag = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do 300 j = 1, count
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; read(1,*)c(i,j)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(abs(c(i,j)) .gt. delta) then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write(*,*)c(i,j)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; size = size + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jatemp(size) = j
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iatemp(size1 + 1) = size+1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; atemp(size) = c(i,j)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(flag .eq. 0) then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; size1 = size1 + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iatemp(size1) = size

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write(*,*)size1, iatemp(size1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flag = 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endif
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endif
300&amp;nbsp;&amp;nbsp; end do

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !&amp;nbsp;&amp;nbsp;&amp;nbsp; write(*,400)(c(i,j),j=1,count)
400&amp;nbsp;&amp;nbsp; format(5(1x,F10.3))
200&amp;nbsp;&amp;nbsp; end do

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do 500 i = 1, count
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; read(1,*)b(i)
500&amp;nbsp;&amp;nbsp; end&amp;nbsp; do
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write(*,100)count, size
100&amp;nbsp;&amp;nbsp; Format(' Matrix Count :: ',i5, ' Size :: ',i5)


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call LinSolve(nnodes, nnz, error, atemp, jatemp, iatemp, b)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 17:48:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093767#M125000</guid>
      <dc:creator>JohnNichols</dc:creator>
      <dc:date>2016-03-02T17:48:33Z</dc:date>
    </item>
    <item>
      <title>for symmetric linear systems</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093768#M125001</link>
      <description>&lt;P&gt;&lt;FONT face="Courier New"&gt;for symmetric linear systems&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Courier New"&gt;Steve:&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Courier New"&gt;​There is a small error in the example for the non-symmetric matrix in the INTEL examples - it says symmetric in the FORTRAN text file.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Courier New"&gt;​John&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 17:51:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Cannot-invert-a-matrix-with-IMSL-routine-LINDS/m-p/1093768#M125001</guid>
      <dc:creator>JohnNichols</dc:creator>
      <dc:date>2016-03-02T17:51:35Z</dc:date>
    </item>
  </channel>
</rss>

