[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] eigen test fails on 32-bit (x86) Linux
From: |
Patrick Alken |
Subject: |
Re: [Help-gsl] eigen test fails on 32-bit (x86) Linux |
Date: |
Fri, 12 Aug 2016 08:51:07 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
Victor, sorry to take so long to apply your patch - it is now applied on
the git repository. Could you let me know if its working for you now?
Patrick
On 08/11/2016 02:40 PM, Victor Zverovich wrote:
> Hi Patrick and others,
>
> While testing GSL 2.1 I've noticed that poly_test has been fixed but
> eigen_test is still failing when compiled with -O3 on some platforms:
>
> FAIL: gen, direct eigenvalue(4) imag, random (-0.481216772353650846
> observed vs 0.481216772353650846 expected) [877968]
> FAIL: gen, direct eigenvalue(5) imag, random (0.481216772353650901
> observed vs -0.481216772353650846 expected) [877970]
> FAIL: gen, direct eigenvalue(15) imag, random (6.85872455924790447
> observed vs -6.85872455924790536 expected) [877990]
> FAIL: gen, direct eigenvalue(16) imag, random (-6.85872455924790536
> observed vs 6.85872455924790625 expected) [877992]
>
> Is it possible to fix eigen_test too e.g. by merging the patch
> I provided earlier?
>
> Thanks,
> Victor
>
> On Mon, Aug 18, 2014 at 4:11 PM address@hidden
> <mailto:address@hidden> <address@hidden
> <mailto:address@hidden>> wrote:
>
> Indeed, using the version of poly/test.c from the repository fixes
> the issue.
>
> Thanks,
> Victor
>
>
> On Mon, Aug 18, 2014 at 3:06 PM, Patrick Alken
> <address@hidden <mailto:address@hidden>>
> wrote:
>
> This should be fixed on the git repository (see bug #39055),
> though it may be that the tolerances need adjusting for your
> system.
>
>
> On 08/18/2014 04:02 PM, address@hidden
> <mailto:address@hidden> wrote:
>
> There is another test failure of a similar kind, but now
> without any -O
> flags:
>
> $ ./configure CFLAGS=
> $ make
> $ poly/test
> FAIL: z1.real, 15th-order polynomial
> (-0.999999999999994227 observed vs 1
> expected) [159]
> FAIL: z2.real, 15th-order polynomial (1.00000005616458409
> observed vs -1
> expected) [161]
> FAIL: z13.real, 15th-order polynomial (1.99999988977862886
> observed vs 2
> expected) [183]
> FAIL: z14.real, 15th-order polynomial (2.00000011022135338
> observed vs 2
> expected) [185]
>
> Victor
>
>
> On Mon, Aug 18, 2014 at 2:48 PM,
> address@hidden
> <mailto:address@hidden> <
> address@hidden
> <mailto:address@hidden>> wrote:
>
> Thanks for quick responses guys.
>
> Patrick, please find attached the patch that
> implements your suggestion
> which does fix the test failures. I've
> reused GSL_EIGEN_SORT_VAL_{ASC,DESC}, that were
> previously unused for
> complex numbers, for the new type of comparison.
>
> Victor
>
>
>
> On Mon, Aug 18, 2014 at 12:21 PM, Patrick Alken <
> address@hidden
> <mailto:address@hidden>> wrote:
>
> GSL is already sorting the eigenvalues based on
> magnitude, so the problem
> seems to be that with the extra -O3 optimization,
> the gsl_eigen_gen and
> gsl_eigen_genv routines are producing slightly
> different results, leading
> to a different sorting order. One way to fix this
> would be to sort by real
> part first and then by imaginary part, but it may
> be a little while until I
> can look into this further.
>
> Patrick
>
>
> On 08/18/2014 12:59 PM, Martin Jansche wrote:
>
> I'm not sure if GSL makes any guarantees about
> the direction of
> eigenvectors. It looks like the test might
> pass if one only looks at the
> magnitude of the values. Perhaps the test
> could be made robust against
> sign
> changes by looking at absolute values.
>
>
>
> On Mon, Aug 18, 2014 at 1:53 PM,
> address@hidden
> <mailto:address@hidden> <
> address@hidden
> <mailto:address@hidden>> wrote:
>
> Hello,
>
> I noticed that eigen test fails on 32-bit
> Linux (x86) when compiled with
> -O3 flag:
>
> $ ./configure CFLAGS="-O3"
> $ make
> $ eigen/test
> FAIL: gen, direct eigenvalue(4) imag,
> random (-0.481216772353650846
> observed vs 0.481216772353650846 expected)
> [877968]
> FAIL: gen, direct eigenvalue(5) imag,
> random (0.481216772353650901
> observed
> vs -0.481216772353650846 expected) [877970]
> FAIL: gen, direct eigenvalue(15) imag,
> random (6.85872455924790447
> observed
> vs -6.85872455924790536 expected) [877990]
> FAIL: gen, direct eigenvalue(16) imag,
> random (-6.85872455924790536
> observed vs 6.85872455924790625 expected)
> [877992]
>
> I'm using GSL version 1.16, 32-bit Ubuntu
> 10.04 and GCC 4.4.3.
>
> Best regards,
> Victor
>
>
>
>
>
>