help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] problem with selftest.c on x86 32-bit


From: Patrick Alken
Subject: Re: [Help-gsl] problem with selftest.c on x86 32-bit
Date: Mon, 01 Jun 2015 12:04:16 -0600
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Its often difficult to pick good error tolerances, due to algorithm complexity and the behavior of different compilers on different systems. Usually when we find a problem like this we just increase the tolerance slightly until the test passes.

Could you try increasing the tolerance

2 * 512.0 *  2.2204460492503131e-16

until the test passes, and let me know the final value you find? You should try playing with the 512.0 number (ie: try 1024.0 next). Then I can update it in the repository.

Thanks,
Patrick

On 05/29/2015 06:56 AM, Elena Ivanova wrote:
Dear Sir/Madam,
Could you help me with the selftest.c (see the attached file).
I've  received different results on sparc and intel for 32-b

Running the GSL self test suite I am seeing the following error when
running
on x86 32-bit:

make[3]: Entering directory `$(@D)/linalg'
FAIL:   LQ_update m(5,3) [88]
FAIL: LQ Rank-1 Update [97]
FAIL: test
==================
1 of 1 test failed
==================

The same test works just fine on 32-bit SPARC:

make[3]: Entering directory `$(@D)/linalg'
Completed [233845/233845]
PASS: test
=============
1 test passed
=============

The test failed with the following results:

     Expected: 0                         1
     Got     : 6.82121026329696178e-13   1.00000000000056843

i.e. an absolute error in the case of 0 expected is ~ 6.8e-13 (instead
of ~2.5e-13);   /2 * 512.0 *  2.2204460492503131e-16
a relative error in the case of 1 expected is ~ 5.7e-13  (instead of
~2.5e-13);            /2 * 512.0 *  2.2204460492503131e-16

The implementation in the cases of sparc and intel is different, because
of the different assembler code for sparc and intel.
Rounding also can be different.
Therefore, the absolute or relative error of the Strassen algorithm can
be different on different platforms.
The question is, which max value of error is acceptable.
I do not understand, why the barrier value is chosen

2 * 512.0 *  2.2204460492503131e-16

2.2204460492503131e-16  is a machine eps for double.
Why 2 * 512.0 * eps?
Maybe, this is too strong condition?
The calculating error should depend on the size of source matrices.
Could you explain this to me?

Thsnk you and best wishes,
Elena Ivanova.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]