[eigen] Re: May be a bug in SelfAdjointEigenSolver - EigenSolver |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] Re: May be a bug in SelfAdjointEigenSolver - EigenSolver
- From: Jose Luis Blanco <joseluisblancoc@xxxxxxxxx>
- Date: Sat, 11 Dec 2010 17:30:36 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=8gB2/Ss9v/+qUMsiT9qJXCa4pUTJPUGmrfmYdAOCnDE=; b=roCmAnN2tf9R+sBFRz3wowIyCQBfI90k7yBu7rwqa3vHbFH1y29xvn7egXq7NEkk3Q 9Lc++y1dZ9fjj3DruJ66gsScnped9f8T2GvGi+4zQtyqTVkydcECqOtJJ+kvDdcNmvbG wJ/fkdx/7sM8joLrCJdaA7CCseRfBUTpe12SY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=xne1GNwglz/AFDYSyDB74lEVCdCT7YdvAEpit4gr5WT9rC40zTNmN1frciKRiODM2K oyO4TtAow9gxCcSPAgKvwwJwV6UuRPHrQ5njnznP2LZI5+hCjiYNMfjUIAMyVQMc2haw kJo8GkFaYapQjYR/p1bRGCW26WZ/xXNYCsjQw=
I forgot to say that I could send the code modified as you want to
continue debugging if you need to dump more information to cout...
JL
On Sat, Dec 11, 2010 at 5:26 PM, Jose Luis Blanco
<joseluisblancoc@xxxxxxxxx> wrote:
> Hi again,
>
> Doing unit testing for an Eigen-dependent library, I found what I
> think is a bug in either Eigen... or in the virtualization system the
> tests run on (Ubuntu PPA servers).
>
> It's about eigenvalues decomposition of a real symmetric 4x4 matrix.
> The unit tests (with Google Test gtests) did run on Ubuntu's PPA
> building machines for these architectures:
>
> - x86 --> all OK
> - amd64 (x86_64) --> Fail
> - lpia --> all OK
>
> The problematic test case didn't fail in my machine with GCC+linux
> 64bit nor with MSVC+Win32. It didn't fail as well in the PPA servers
> running upon x86 nor lpia, but *only in the amd64 machines*. It's been
> a long debugging since I can't reproduce the fail on my local machine
> (which is amd64!): it only fails on Launchpad's amd64 build servers.
>
> The complete log for an amd64 is in [1], but the relevant part is:
>
> ======================================================================
> void do_test_EigenVal4x4_sym_vs_generic_eigen() [with int ColRowOrder = 0]
> SelfAdjointEigenSolver:
> eigvecs:
> -0.440208 -0.710821 -0.0254769 0.547998
> -0.392351 0.674628 0.253235 0.571673
> -0.136391 -0.177049 0.92866 -0.296044
> 0.796037 -0.0909078 0.26984 0.534085
> eigvals:
> 0.975003
> 3.97658
> 7.0729
> 38.4097
>
> EigenSolver:
> eigvecs:
> (0.509673,0) (0.752303,0) (0.299386,0) (-2.22475,0)
> (0.591864,0) (-0.62003,0) (0.505669,0) (1.46388,0)
> (-0.302914,0) (0.230792,0) (0.109769,0) (-1.6662,0)
> (0.546052,0) (-0.0174474,0) (-0.803457,0) (0.0737898,0)
> eigvals:
> (37.5398,0)
> (5.03294,0)
> (1.2362,0)
> (6.62521,0)
>
> void do_test_EigenVal4x4_sym_vs_generic_eigen() [with int ColRowOrder = 1]
> SelfAdjointEigenSolver:
> eigvecs:
> 0.587602 -0.324628 -0.516793 0.531287
> 0.0488521 0.776559 0.184898 0.600318
> -0.325169 0.38677 -0.835326 -0.216576
> -0.739325 -0.376804 -0.0311285 0.557178
> eigvals:
> 0.612734
> 2.11465
> 10.7396
> 36.9672
>
> EigenSolver:
> eigvecs:
> (0.55922,0) (-0.309765,0) (0.175508,0) (-0.366926,0)
> (0.585747,0) (0.432738,0) (-0.839941,0) (-0.40577,0)
> (-0.207763,0) (0.80562,0) (-2.89354,0) (0.172306,0)
> (0.548642,0) (0.26699,0) (-0.858551,0) (0.877879,0)
> eigvals:
> (37.5398,0)
> (5.03294,0)
> (6.62521,0)
> (1.2362,0)
> ====================================================================
>
> The code for generating that is attached. For debugging, the unit test
> was modified to just show information to the console so I can show you
> these results from the server buildlogs.
>
> My conclusions:
>
> 1) I would expect the eigenvalues & eigenvectors of a *real symetric*
> matrix to be the same no matter they're computed with
> SelfAdjointEigenSolver or EigenSolver (right???). I mean, disregarding
> the order of the eigenvalues, that's not the point. You can see in the
> logs that the results are different for both solvers!
>
> 2) The results for the SelfAdjointEigenSolver aren't the same for
> RowMajor vs ColMajor. They are the same for the EigenSolver.
>
> 3) From the 4 combinations (SelfAdjointEigenSolver vs EigenSolver,
> ColMajor vs RowMajor), the only one giving the same results than
> MATLAB/octave is SelfAdjointEigenSolver + ColMajor.
>
>
> What do you think? Is there anything wrong in my code?
> I could just ignore this and remove the failing test cases from my
> library if you think it's a bug in the virtualization platforms...
>
> More info:
> - The version of Eigen is from 9/DEC/2010.
> - I also tested 2x2 and 3x3 eigen-decompositions and all work fine on
> all architectures. That's what made me think on a possible bug related
> to special SSE optimizations for 4x4 matrices (makes sense??)
>
> Regards,
> JL
>
> [1] http://launchpadlibrarian.net/60484561/buildlog_ubuntu-maverick-amd64..mrpt_1:0.9.3svn2312maverick-1~ppa1~maverick_FAILEDTOBUILD.txt.gz
>