<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — dsygv not working as expected]]></title>
		<link>https://forums.approximatrix.com/viewtopic.php?id=614</link>
		<atom:link href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=614&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in dsygv not working as expected.]]></description>
		<lastBuildDate>Thu, 23 Mar 2017 04:57:29 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: dsygv not working as expected]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2812#p2812</link>
			<description><![CDATA[<p>Is DGGBAL instead of DSYGV a solution for my issue </p><br /><p><a href="http://physics.oregonstate.edu/~landaur/nacphy/lapack/routines/dggbal.html">http://physics.oregonstate.edu/~landaur … ggbal.html</a></p>]]></description>
			<author><![CDATA[null@example.com (rkr)]]></author>
			<pubDate>Thu, 23 Mar 2017 04:57:29 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2812#p2812</guid>
		</item>
		<item>
			<title><![CDATA[Re: dsygv not working as expected]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2810#p2810</link>
			<description><![CDATA[<p>The condition of your A matrix is 2.2E+13, which does indicate poor conditioning.&nbsp; The largest value in the A matrix appears to be around 2E+18, and the problematic non-symmetric value is about 2E-04 in magnitude.&nbsp; This does indicate some numerical instability.</p><p>A double precision value can represent about 16 digits of precision.&nbsp; A problem arises, though, if you perform any arithmetic that won&#039;t fall within that precision range.&nbsp; For example, if you set <em>x=2.2E+13</em> and you add <em>2E-04</em> to <em>x</em>, the value of x will not change at all.</p><p>You could, in theory, use a higher precision in Fortran, although LAPACK doesn&#039;t provide those routines for higher-precision operations out of the box.&nbsp; I think it would be more productive to determine why your problem is leading to such a poorly conditioned matrix or to research a more general method of computing eigenvalues using LAPACK that doesn&#039;t rely on the <em>A</em> matrix being symmetric.&nbsp; I would be most concerned, though, with the input matrices&#039; conditioning.</p><p><em>EDIT: Looking at your Excel spreadsheets, it would appear that most of the errors are approaching machine precision errors.&nbsp; I&#039;m not sure how best to tackle the values not being exact as they should effectively be zero. Again, though, the matrix condition is quite poor.</em></p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Wed, 22 Mar 2017 12:32:39 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2810#p2810</guid>
		</item>
		<item>
			<title><![CDATA[Re: dsygv not working as expected]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2809#p2809</link>
			<description><![CDATA[<p>jeff, i am attaching little more details here.. the original A matrix is made of lot of 12x12 matrices as shown in attachment. in my program, matrices A1, A2 are generated, they are automatically assembled as shown. while this assemblage, there is some discrepancy happening - i found this when i performed the assemblage in excel. i tried to find the difference between the program o/p and my manual calcs - which should have given zeros - it is not happening, and so we have the cell L7 as -2.44140625E-04. i feel this is something due to precision control ?? please see the attached excel... will this mismatch be responsible for the error ? this doesnt appear while using mathcad?</p><p><a href="https://www.dropbox.com/s/ze5k298rjqqg22n/A%20matrix-checking.xlsx?dl=0">https://www.dropbox.com/s/ze5k298rjqqg2 … .xlsx?dl=0</a></p>]]></description>
			<author><![CDATA[null@example.com (rkr)]]></author>
			<pubDate>Wed, 22 Mar 2017 10:03:41 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2809#p2809</guid>
		</item>
		<item>
			<title><![CDATA[Re: dsygv not working as expected]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2808#p2808</link>
			<description><![CDATA[<p>thanks Jeff... that should be the issue then,</p><p>is there a way to get lower triangular matrix in mathcad ??</p><p>so, i think the issue here is with precision - any suggestion on how to tackle this... i am declaring my matrices as doubleprecision in fortran. eg:</p><p>doubleprecision,dimension(678,678)::kgap</p>]]></description>
			<author><![CDATA[null@example.com (rkr)]]></author>
			<pubDate>Wed, 22 Mar 2017 05:11:14 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2808#p2808</guid>
		</item>
		<item>
			<title><![CDATA[Re: dsygv not working as expected]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2804#p2804</link>
			<description><![CDATA[<p>As an example, Cell L7 has a value of <em>-2.44140625E-04</em>, but Cell G12 is <em>0</em>.&nbsp; There are additional examples of this non-symmetry that can be located relatively easily by subtracting the transpose of the lower triangular portion of the matrix from the upper triangular.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Tue, 21 Mar 2017 17:10:25 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2804#p2804</guid>
		</item>
		<item>
			<title><![CDATA[Re: dsygv not working as expected]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2803#p2803</link>
			<description><![CDATA[<p>Hi Jeff, A is symmetric, you can open the excel and have a quick look, please see the screenshot where i did comparison of mathcad with fortran - which means mathcad calculated eigen values for the A,B matrices - inturn means A is symmetric. the screenshot also shows cholesky decomposition of both matrices</p><p>below link show comparison of mathcad results with fortran output<br /><a href="https://www.dropbox.com/s/eynvb2clpk46gkn/comparison.JPG?dl=0">https://www.dropbox.com/s/eynvb2clpk46g … n.JPG?dl=0</a></p>]]></description>
			<author><![CDATA[null@example.com (rkr)]]></author>
			<pubDate>Tue, 21 Mar 2017 13:37:25 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2803#p2803</guid>
		</item>
		<item>
			<title><![CDATA[Re: dsygv not working as expected]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2802#p2802</link>
			<description><![CDATA[<p>When I load your matrices into Octave, it appears that A is not symmetric.&nbsp; Can you check that in Mathcad?</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Tue, 21 Mar 2017 13:13:09 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2802#p2802</guid>
		</item>
		<item>
			<title><![CDATA[Re: dsygv not working as expected]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2801#p2801</link>
			<description><![CDATA[<p>please see the matrices here. they work perfectly when called in mathcad..</p><p><a href="https://www.dropbox.com/s/djji2bq8lzi8h7d/A%20and%20B%20_matx.zip?dl=0">https://www.dropbox.com/s/djji2bq8lzi8h … x.zip?dl=0</a></p><br /><p>thanks Jeff.</p>]]></description>
			<author><![CDATA[null@example.com (rkr)]]></author>
			<pubDate>Tue, 21 Mar 2017 12:08:02 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2801#p2801</guid>
		</item>
		<item>
			<title><![CDATA[Re: dsygv not working as expected]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2800#p2800</link>
			<description><![CDATA[<p>Without seeing the actual matrix you&#039;re feeding to <em>DSYGV</em>, I really can&#039;t comment any further. Can you post them here?&nbsp; Are you sure that the matrices being provided to <em>DSYGV</em> are positive-definite to within machine precision?</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Tue, 21 Mar 2017 12:04:27 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2800#p2800</guid>
		</item>
		<item>
			<title><![CDATA[Re: dsygv not working as expected]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2799#p2799</link>
			<description><![CDATA[<p>jeff, actually those two matrices were created inside the pgrm, I took them into Mathcad and checked for Eigen values, they were giving me results which I was expecting, but dsygv is giving two negative Eigen values at the beginning. I don&#039;t understand why this is happening. I tried with 5 other matrix combinations&nbsp; - Mathcad and dsygv gave same/similar results.. all matrices here too was generated inside fortran using same code which I used for the error one..</p>]]></description>
			<author><![CDATA[null@example.com (rkr)]]></author>
			<pubDate>Tue, 21 Mar 2017 11:52:26 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2799#p2799</guid>
		</item>
		<item>
			<title><![CDATA[Re: dsygv not working as expected]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2798#p2798</link>
			<description><![CDATA[<p>yes, INFO gave zero.</p>]]></description>
			<author><![CDATA[null@example.com (rkr)]]></author>
			<pubDate>Tue, 21 Mar 2017 11:30:10 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2798#p2798</guid>
		</item>
		<item>
			<title><![CDATA[Re: dsygv not working as expected]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2797#p2797</link>
			<description><![CDATA[<p>When you call <a href="http://www.netlib.org/lapack/double/dsygv.f">DSYGV</a>, are you checking the output of the <em>INFO</em> argument?&nbsp; Is it returning 0 (successful) in Simply Fortran?</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Tue, 21 Mar 2017 11:27:34 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2797#p2797</guid>
		</item>
		<item>
			<title><![CDATA[dsygv not working as expected]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=2796#p2796</link>
			<description><![CDATA[<p>I am using fortran on windows machine. My program generates two matrices A and B – both square, symmetric and positive definite. These matrices were generated based on a problem input from my side into the fortran program. I tried 6 independent runs with slight variation in inputs – for 5 cases, it ran well, the eigen values were matching my independent calcs using a software and&nbsp; also with Mathcad. For the 6th case, the dsygv listing gives 2 negative numbers as eigen values which was not expected. I took these matrices in Mathcad, and I got the answers matching software calculations. So this means, the matrices A and B are ok. could you please assist me to find why they are not working with dsygv. While comparing the dsygv listing with Mathcad, I found that eigen value(3) in dsygv was matching eigenval(1) of mathcad, eigenval(4) was matching eigenval(2) of mathcad and so on.. looks like the 2 negative values got inserted in the listing - could some one explain why this is happening. the A and B matrices are generated inside fortran and solved using dsygv. In the 6th case, there is some discrepancy(only while using dsygv, it works as usual while using mathcad/or independent software) - any guidance is appreciated.</p>]]></description>
			<author><![CDATA[null@example.com (rkr)]]></author>
			<pubDate>Tue, 21 Mar 2017 07:00:01 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=2796#p2796</guid>
		</item>
	</channel>
</rss>
