Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

classic Classic list List threaded Threaded
32 messages Options
Next » 12
Alex McMurchy Alex McMurchy
Reply | Threaded
Open this post in threaded view
|

Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

Hi All

I've pulled from git and git branch says I'm on

* master

first line of AutoGen is
> Running ./configure with '--disable-ccache --disable-gtk3
> --with-parallelism=3 --without-junit --without-gssapi --without-krb5
> --srcdir=/home/master/master --enable-option-checking=fatal'

When compiling LibreOffice I get a failed Unit test. The problem occurs
in  sc/qa/unit/functions_test.cxx with

> CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, rDoc.GetValue(1, 2, 0), 1e-14);

whilst testing sc/qa/unit/data/functions/fods/chiinv.fods. The code
sc/qa/unit/functions_test.cxx looks to me as though it's performed for
all these .fods test files so why it should fail on one and not the rest
is strange indeed.


Any suggestions on how I can resolve this problem will be appreciated.

Alex

The error is

> Testing
> file:///home/master/master/sc/qa/unit/data/functions/fods/chidist.fods:
> Tested
> file:///home/master/master/sc/qa/unit/data/functions/fods/chidist.fods:
> Pass (491ms)
> Testing
> file:///home/master/master/sc/qa/unit/data/functions/fods/chiinv.fods:
> /home/master/master/sc/qa/unit/functions_test.cxx:80:FunctionsTest::testFormulasFODS
> double equality assertion failed
> - Expected: 1
> - Actual  : 0
> - Delta   : 1e-14
>
> FunctionsTest::testFormulasFODS finished in: 18129ms
> functions_test.cxx:80:Assertion
> Test name: FunctionsTest::testFormulasFODS
> double equality assertion failed
> - Expected: 1
> - Actual  : 0
> - Delta   : 1e-14
>
> Failures !!!
> Run: 1   Failure total: 1   Failures: 1   Errors: 0
>
> Error: a unit test failed, please do one of:
> make CppunitTest_sc_functions_test CPPUNITTRACE="gdb --args"
>     # for interactive debugging on Linux
> make CppunitTest_sc_functions_test VALGRIND=memcheck
>     # for memory checking
> make CppunitTest_sc_functions_test DEBUGCPPUNIT=TRUE
>     # for exception catching
>
> make[1]: ***
> [/home/master/master/workdir/CppunitTest/sc_functions_test.test] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make: *** [build] Error 2
> Compilation of libreoffice failed with 2 at Wed Aug 31 09:29:33 BST 2016

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Eike Rathke-2 Eike Rathke-2
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

Hi Alex,

On Wednesday, 2016-08-31 19:30:35 +0100, Alex McMurchy wrote:

> When compiling LibreOffice I get a failed Unit test. The problem occurs in
> sc/qa/unit/functions_test.cxx with
>
> > CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, rDoc.GetValue(1, 2, 0), 1e-14);
>
> whilst testing sc/qa/unit/data/functions/fods/chiinv.fods. The code
> sc/qa/unit/functions_test.cxx looks to me as though it's performed for all
> these .fods test files so why it should fail on one and not the rest is
> strange indeed.

Ah, finally someone who hopefully can reproduce such error.. ;-)

> Any suggestions on how I can resolve this problem will be appreciated.

Please load that document in your built office instance, i.e.

./instdir/program/soffice ./sc/qa/unit/data/functions/fods/chidist.fods &

answer No to the question whether links should be updated, when loaded
hit Shift+Ctrl+F9 and tell us where / in which cell on the second sheet
(the first sheet is just the summary) it fails, and what the result of
the calculated formula (column A) in that row is.

Do not save the document as it is part of the repository's source tree
and could get committed by accident.

Which platform and compiler are you on btw?

  Eike

--
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice

signature.asc (836 bytes) Download Attachment
Alex McMurchy Alex McMurchy
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

Hi Eike

I've replicated the problem on -

Lubuntu 1404LTS (up to date as off a few days ago) - gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4

Slackware-Current (1402) hasn't been updated for a few months - gcc (GCC) 4.9.3

Yesterday once I understood what the actual problem was I raised two bug reports

  • Bug 101837 - EDITING: Calculation error for CHIINV function
  • Bug 101838 - Editing: Calculation error for MINVERSE function
In minverse.ods there was another issue, which I've not raised a bug, which was to do with a rounding error in Row 27 the actual result was 169841859430433 whereas the expected result is 169841859430434. Should I raise a bug report for this as well - so it can be tracked?

Alex



On 01/09/16 17:13, Eike Rathke wrote:
Hi Alex,

On Wednesday, 2016-08-31 19:30:35 +0100, Alex McMurchy wrote:

When compiling LibreOffice I get a failed Unit test. The problem occurs in
sc/qa/unit/functions_test.cxx with

CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, rDoc.GetValue(1, 2, 0), 1e-14);

whilst testing sc/qa/unit/data/functions/fods/chiinv.fods. The code
sc/qa/unit/functions_test.cxx looks to me as though it's performed for all
these .fods test files so why it should fail on one and not the rest is
strange indeed.

Ah, finally someone who hopefully can reproduce such error.. ;-)

Any suggestions on how I can resolve this problem will be appreciated.

Please load that document in your built office instance, i.e.

./instdir/program/soffice ./sc/qa/unit/data/functions/fods/chidist.fods &

answer No to the question whether links should be updated, when loaded
hit Shift+Ctrl+F9 and tell us where / in which cell on the second sheet
(the first sheet is just the summary) it fails, and what the result of
the calculated formula (column A) in that row is.

Do not save the document as it is part of the repository's source tree
and could get committed by accident.

Which platform and compiler are you on btw?

  Eike



_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Eike Rathke-2 Eike Rathke-2
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

Hi Alex,

On Friday, 2016-09-02 09:03:29 +0100, Alex McMurchy wrote:

> I've replicated the problem on -
>
> Lubuntu 1404LTS (up to date as off a few days ago) - gcc (Ubuntu
> 4.8.4-2ubuntu1~14.04.3) 4.8.4
>
> Slackware-Current (1402) hasn't been updated for a few months - gcc (GCC)
> 4.9.3

Good.

> Yesterday once I understood what the actual problem was I raised two bug
> reports
>
>  * Bug 101837 - EDITING: Calculation error for CHIINV function
>  * Bug 101838 - Editing: Calculation error for MINVERSE function

Thanks, though a heads-up here on the list would had been enough.
Usually we don't track build problems in the bug tracker.

> In minverse.ods there was another issue, which I've not raised a bug, which
> was to do with a rounding error in Row 27 the actual result was
> 169841859430433 whereas the expected result is 169841859430434. Should I
> raise a bug report for this as well - so it can be tracked?

Just add that to
https://bugs.documentfoundation.org/show_bug.cgi?id=101838

Thanks again

  Eike

--
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice

signature.asc (836 bytes) Download Attachment
Eike Rathke-2 Eike Rathke-2
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

In reply to this post by Alex McMurchy
Hi Alex,

On Wednesday, 2016-08-31 19:30:35 +0100, Alex McMurchy wrote:

> When compiling LibreOffice I get a failed Unit test. The problem occurs in
> sc/qa/unit/functions_test.cxx with

You could do us a favour, are you willing to invest some machine time
and try if passing either -msse or -msse2 as compiler flags would solve
the failing function tests problem? For this you'd need to do

make clean
make ENVCFLAGS=-msse ENVCFLAGSCXX=-msse && make sc.check

and if that still fails try

make clean
make ENVCFLAGS=-msse2 ENVCFLAGSCXX=-msse2 && make sc.check

Thanks
  Eike

--
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice

signature.asc (836 bytes) Download Attachment
Alex McMurchy Alex McMurchy
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

Hi Eike

No problem. Just started the compile.

Alex


On 07/09/16 21:37, Eike Rathke wrote:

> Hi Alex,
>
> On Wednesday, 2016-08-31 19:30:35 +0100, Alex McMurchy wrote:
>
>> When compiling LibreOffice I get a failed Unit test. The problem occurs in
>> sc/qa/unit/functions_test.cxx with
> You could do us a favour, are you willing to invest some machine time
> and try if passing either -msse or -msse2 as compiler flags would solve
> the failing function tests problem? For this you'd need to do
>
> make clean
> make ENVCFLAGS=-msse ENVCFLAGSCXX=-msse && make sc.check
>
> and if that still fails try
>
> make clean
> make ENVCFLAGS=-msse2 ENVCFLAGSCXX=-msse2 && make sc.check
>
> Thanks
>    Eike
>

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Alex McMurchy Alex McMurchy
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

In reply to this post by Eike Rathke-2
Hi Eike

This is what I ran.

> cd master
> make clean
> make ENVCFLAGS=-msse ENVCFLAGSCXX=-msse && make sc.check
> make clean
> make ENVCFLAGS=-msse2 ENVCFLAGSCXX=-msse2 && make sc.check

Both failed for the same reason.

btw. I ran the above tests on a 32bit Lubuntu 14.04 within VirtualBox.
The flags form /proc/cpuinfo are

> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 clflush mmx fxsr sse sse2 ht nx rdtscp constant_tsc
> pni ssse3
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 clflush mmx fxsr sse sse2 ht nx rdtscp constant_tsc
> pni ssse3
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 clflush mmx fxsr sse sse2 ht nx rdtscp constant_tsc
> pni ssse3
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 clflush mmx fxsr sse sse2 ht nx rdtscp constant_tsc
> pni ssse3

Is the problem just a 32bit issue?

Alex



On 07/09/16 21:37, Eike Rathke wrote:

> Hi Alex,
>
> On Wednesday, 2016-08-31 19:30:35 +0100, Alex McMurchy wrote:
>
>> When compiling LibreOffice I get a failed Unit test. The problem occurs in
>> sc/qa/unit/functions_test.cxx with
> You could do us a favour, are you willing to invest some machine time
> and try if passing either -msse or -msse2 as compiler flags would solve
> the failing function tests problem? For this you'd need to do
>
> make clean
> make ENVCFLAGS=-msse ENVCFLAGSCXX=-msse && make sc.check
>
> and if that still fails try
>
> make clean
> make ENVCFLAGS=-msse2 ENVCFLAGSCXX=-msse2 && make sc.check
>
> Thanks
>    Eike
>

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Eike Rathke-2 Eike Rathke-2
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

Hi Alex,

On Thursday, 2016-09-08 13:28:46 +0100, Alex McMurchy wrote:

> > [... -msse ...]
>
> Both failed for the same reason.

Pity.. ok, thanks for trying, we'll have to further investigate.

> Is the problem just a 32bit issue?

Yes. Only two tinderbox 32-bit builds (and your's) have the problem.

  Eike

--
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice

signature.asc (836 bytes) Download Attachment
Alex McMurchy Alex McMurchy
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

Hi Eike

Will it helpful if I installed Lubuntu 14.04 64bit and see if I get the
same problem?

Alex



On 08/09/16 16:01, Eike Rathke wrote:

> Hi Alex,
>
> On Thursday, 2016-09-08 13:28:46 +0100, Alex McMurchy wrote:
>
>>> [... -msse ...]
>> Both failed for the same reason.
> Pity.. ok, thanks for trying, we'll have to further investigate.
>
>> Is the problem just a 32bit issue?
> Yes. Only two tinderbox 32-bit builds (and your's) have the problem.
>
>    Eike
>

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Eike Rathke-2 Eike Rathke-2
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

Hi Alex,

On Friday, 2016-09-09 08:46:20 +0100, Alex McMurchy wrote:

> Will it helpful if I installed Lubuntu 14.04 64bit and see if I get the same
> problem?

Unlikely. The problem so far only showed up in 32-bit builds.
But thanks for offering.

  Eike

--
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice

signature.asc (836 bytes) Download Attachment
slacka slacka
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

This may be a regression, but I'm not seeing it with the 32-bit 5.1.4.2 official LibreOffice for Ubuntu 16.04. With minverse.fods, C10 changes to FALSE after pressing Shift+Ctrl+F9. With vdb.fods, C11 changes to FALSE after a force recalculate.

Interestingly the minverse.fods test also fails with Excel 2013 which calculates A10=-4.5E+15, while 32-bit calc comes to A10=-4.7E+16.

Excel also fails the vdb.fods test at C11. Both Excel and Calc can pass the failing vdb.fods test  by relaxing the rounding accuracy to 10.
Alex McMurchy Alex McMurchy
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

In reply to this post by Eike Rathke-2

Hi Eike

Is there anything else I can usefully do? Like

  1. either stepping through the code
  2. or bisecting the code

If stepping through where would be a good place to put the first breakpoint.

I beginning to wonder whether the problem is environmental and outside of LibreOffice.

Alex





On 09/09/16 09:44, Eike Rathke wrote:
Hi Alex,

On Friday, 2016-09-09 08:46:20 +0100, Alex McMurchy wrote:

Will it helpful if I installed Lubuntu 14.04 64bit and see if I get the same
problem?
Unlikely. The problem so far only showed up in 32-bit builds.
But thanks for offering.

  Eike



_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice


_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Eike Rathke-2 Eike Rathke-2
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

Hi Alex,

On Monday, 2016-09-12 20:09:27 +0100, Alex McMurchy wrote:

> Is there anything else I can usefully do? Like
>
> 1. either stepping through the code

Well, you can try, but it's a more general problem not restricted to
just one or two functions. Entry point for the CHIINV function would be
in sc/source/core/tool/interpr3.cxx ScInterpreter::ScChiInv()

> 2. or bisecting the code

That wouldn't gain anything. You'd just discover that the build error
goes away once bisecting removed the test documents ;-)

> I beginning to wonder whether the problem is environmental and outside of
> LibreOffice.

It's somehow related to how floating point doubles are handled on that
specific 32-bit platform. Different register width, different
instruction set, different compiler optimization; the range of possible
causes is wide.

  Eike

--
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice

signature.asc (836 bytes) Download Attachment
Eike Rathke-2 Eike Rathke-2
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

In reply to this post by slacka
Hi slacka,

On Sunday, 2016-09-11 01:09:30 -0700, slacka wrote:

> This may be a regression, but I'm not seeing it with the 32-bit 5.1.4.2
> official LibreOffice for Ubuntu 16.04. With minverse.fods, C10 changes to
> FALSE after pressing Shift+Ctrl+F9. With vdb.fods, C11 changes to FALSE
> after a force recalculate.

So you actually *do* see it. Or only not in chiinv.fods?

  Eike

--
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice

signature.asc (836 bytes) Download Attachment
Eike Rathke-2 Eike Rathke-2
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

In reply to this post by Eike Rathke-2
Hi Alex,

On Wednesday, 2016-09-14 08:56:21 +0200, Eike Rathke wrote:

> > 1. either stepping through the code
>
> Well, you can try, but it's a more general problem not restricted to
> just one or two functions. Entry point for the CHIINV function would be
> in sc/source/core/tool/interpr3.cxx ScInterpreter::ScChiInv()

If you want to get a working build without disabling all checks then you
can use
https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=b9a27d5856f60688456762bfcc29c38670009254

that disables the function tests for linux_x86 builds.

However, if you'd find a general solution that does not involve
disabling the tests that would be more than welcomed.

  Eike

--
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice

signature.asc (836 bytes) Download Attachment
Alex McMurchy Alex McMurchy
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

Hi Erike

Every so often I compile and test LibreOffice to ensure that no
regressions have occurred. I've encountered a few over the years that
have even got into the Still version of LibreOffice.

As to whatever CHIINV and MINVERSE does doesn't bother me I don't use
them at all. So, I just delete the offending test in the .fods file and
move on. I never push anything back. That way if any other tests fail
I'll know about them

On my day job I've got a deadline looming for this Friday, 16th August
2016. Once that's out of the way, I may have another look at CHIINV next
week. I'm intrigued why the same binary of LO 5.1.4.2 works on some
environments but not on others.

Alex

On 14/09/16 16:52, Eike Rathke wrote:

> Hi Alex,
>
> On Wednesday, 2016-09-14 08:56:21 +0200, Eike Rathke wrote:
>
>>> 1. either stepping through the code
>> Well, you can try, but it's a more general problem not restricted to
>> just one or two functions. Entry point for the CHIINV function would be
>> in sc/source/core/tool/interpr3.cxx ScInterpreter::ScChiInv()
> If you want to get a working build without disabling all checks then you
> can use
> https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=b9a27d5856f60688456762bfcc29c38670009254
>
> that disables the function tests for linux_x86 builds.
>
> However, if you'd find a general solution that does not involve
> disabling the tests that would be more than welcomed.
>
>    Eike
>

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
slacka slacka
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

In reply to this post by Eike Rathke-2
Eike Rathke-2 wrote
If you want to get a working build without disabling all checks then you
can use
https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=b9a27d5856f60688456762bfcc29c38670009254

that disables the function tests for linux_x86 builds.

However, if you'd find a general solution that does not involve
disabling the tests that would be more than welcomed.

  Eike
We are only failing 3 individual tests. And we fail the same tests Excel fails. Instead of disabling all test for x86 Linux , why not disable or change the rounding accuracy of the individual tests?

For example, CHIINV can be made to work with both x86, x86-64 and Excel by changing
C8=ROUND(A8,3)=ROUND(B8,3)
 
VDS can be made to work with x86, x86-64, and Excel by changing
C11=ROUND(A11,10)=ROUND(B11,10)

MINVERSE x86 and Excel get similar results. Unless there is some evidences we have the same bug in our x86 code as Excel, the test is invalid or the bug is with the x86-64 code. So shouldn’t we disable that individual test?


Eike Rathke-2 wrote
So you actually *do* see it. Or only not in chiinv.fods?
 
Sorry I was not clear. MINVERSE is the first test to fail on my AMD desktop.  CHIINV does fail but only when I run it manually. I assume the tests are not run sequentially. Are they? If they are something weird is going on and I can try disabling MINVERSE and VDS to see if that's enough for a successful  build.

Alex McMurchy Alex McMurchy
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

slaka wrote

We are only failing 3 individual tests. And we fail the same tests Excel
fails. Instead of disabling all test for x86 Linux , why not disable or
change the rounding accuracy of the individual tests? 

LO only seems to have problems only with numbers very close to approaching 1 i.e. 0.999999999999999

The results LO gives for 0.000000000000001 through to .99999999 appear to be consistent with what the Keisan online calculator returns at http://keisan.casio.com/exec/system/1180573197.

Personally I would either

  1. change the expected result to match what LO now returns;
  2. change the number so that it is not so close to 1 i.e. something like 0.999999
  3. introduce another test with a number approaching 0 i.e. 0.000000000000001
Alex



On 14/09/16 23:06, slacka wrote:
Eike Rathke-2 wrote
If you want to get a working build without disabling all checks then you
can use
https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=b9a27d5856f60688456762bfcc29c38670009254

that disables the function tests for linux_x86 builds.

However, if you'd find a general solution that does not involve
disabling the tests that would be more than welcomed.

  Eike
We are only failing 3 individual tests. And we fail the same tests Excel
fails. Instead of disabling all test for x86 Linux , why not disable or
change the rounding accuracy of the individual tests? 

For example, CHIINV can be made to work with both x86, x86-64 and Excel by
changing 
C8=ROUND(A8,3)=ROUND(B8,3) 
 
VDS can be made to work with x86, x86-64, and Excel by changing
C11=ROUND(A11,10)=ROUND(B11,10)

MINVERSE x86 and Excel get similar results. Unless there is some evidences
we have the same bug in our x86 code as Excel, the test is invalid or the
bug is with the x86-64 code. So shouldn’t we disable that individual test?



Eike Rathke-2 wrote
So you actually *do* see it. Or only not in chiinv.fods? 
 
Sorry I was not clear. MINVERSE is the first test to fail on my AMD desktop. 
CHIINV does fail but only when I run it manually. I assume the tests are not
run sequentially. Are they? If they are something weird is going on and I
can try disabling MINVERSE and VDS to see if that's enough for a successful 
build. 





--
View this message in context: http://nabble.documentfoundation.org/Test-File-sc-qa-unit-data-functions-fods-chiinv-fods-fails-with-Assertion-tp4192267p4193577.html
Sent from the Dev mailing list archive at Nabble.com.
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice


_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

In reply to this post by Eike Rathke-2
On 09/07/2016 10:37 PM, Eike Rathke wrote:

> You could do us a favour, are you willing to invest some machine time
> and try if passing either -msse or -msse2 as compiler flags would solve
> the failing function tests problem? For this you'd need to do
>
> make clean
> make ENVCFLAGS=-msse ENVCFLAGSCXX=-msse && make sc.check
>
> and if that still fails try
>
> make clean
> make ENVCFLAGS=-msse2 ENVCFLAGSCXX=-msse2 && make sc.check

Turns out, the relevant GCC switches are

   -mfpmath=sse -msse2

-mfpmath=sse (instead of the x86-32 default of -mfpmath=387) prevents
usage of the extended 80-bit precision for temporary results. (Which
caused e.g. the subtraction in ScChiDistFunction::GetValue,
sc/source/core/tool/interpr3.cxx, to produce results different from IEEE
double, causing the computation of CHIINV(0.999999999999999,
1.00000000000000E+001) in sc/qa/unit/data/functions/fods/chiinv.fods to
produce unexpected results.)
<https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc/x86-Options.html#x86-Options>
also claims: "The resulting code should be considerably faster [compared
to -mfpmath=387] in the majority of cases and avoid the numerical
instability problems of 387 code [...]"

But -mfpmath=sse only takes effect when compiling for an architecture
that actually supports the relevant SSE instructions (otherwise silently
falling back to the "387" instructions, it appears).  So we need an
additional -msse2 to enable the instructions relevant for 64-bit double
(-msse would only enable instructions relevant for 32-bit float).

SSE2 support reportedly got added with Pentium 4, around 2001.  Any
thoughts on whether we'd want to enforce that for 32-bit x86 Linux
builds (or already effectively enforce anyway)?  In which case we could
add the relevant flags to solenv/gbuild/platform/LINUX_INTEL_GCC.mk and
revert
<https://cgit.freedesktop.org/libreoffice/core/commit/?id=b9a27d5856f60688456762bfcc29c38670009254>
"sc: disable function test documents for 32-bit PLATFORMID=linux_x86" again.

(Notwithstanding the fact that tests that rely on Calc doing
computations in a specific way, when Calc doesn't give any guarantees of
how those computations should be carried out exactly AFAIK, are dubious
and a pain at best.)
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Alex McMurchy Alex McMurchy
Reply | Threaded
Open this post in threaded view
|

Re: Test File: sc/qa/unit/data/functions/fods/chiinv.fods: fails with Assertion

I shall give this a whirl.

Stephan Bergmann wrote

> Turns out, the relevant GCC switches are
>
>   -mfpmath=sse -msse2

Alex

On 16/09/16 11:05, Stephan Bergmann wrote:

> On 09/07/2016 10:37 PM, Eike Rathke wrote:
>> You could do us a favour, are you willing to invest some machine time
>> and try if passing either -msse or -msse2 as compiler flags would solve
>> the failing function tests problem? For this you'd need to do
>>
>> make clean
>> make ENVCFLAGS=-msse ENVCFLAGSCXX=-msse && make sc.check
>>
>> and if that still fails try
>>
>> make clean
>> make ENVCFLAGS=-msse2 ENVCFLAGSCXX=-msse2 && make sc.check
>
> Turns out, the relevant GCC switches are
>
>   -mfpmath=sse -msse2
>
> -mfpmath=sse (instead of the x86-32 default of -mfpmath=387) prevents
> usage of the extended 80-bit precision for temporary results. (Which
> caused e.g. the subtraction in ScChiDistFunction::GetValue,
> sc/source/core/tool/interpr3.cxx, to produce results different from
> IEEE double, causing the computation of CHIINV(0.999999999999999,
> 1.00000000000000E+001) in sc/qa/unit/data/functions/fods/chiinv.fods
> to produce unexpected results.)
> <https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc/x86-Options.html#x86-Options>
> also claims: "The resulting code should be considerably faster
> [compared to -mfpmath=387] in the majority of cases and avoid the
> numerical instability problems of 387 code [...]"
>
> But -mfpmath=sse only takes effect when compiling for an architecture
> that actually supports the relevant SSE instructions (otherwise
> silently falling back to the "387" instructions, it appears).  So we
> need an additional -msse2 to enable the instructions relevant for
> 64-bit double (-msse would only enable instructions relevant for
> 32-bit float).
>
> SSE2 support reportedly got added with Pentium 4, around 2001. Any
> thoughts on whether we'd want to enforce that for 32-bit x86 Linux
> builds (or already effectively enforce anyway)?  In which case we
> could add the relevant flags to
> solenv/gbuild/platform/LINUX_INTEL_GCC.mk and revert
> <https://cgit.freedesktop.org/libreoffice/core/commit/?id=b9a27d5856f60688456762bfcc29c38670009254>
> "sc: disable function test documents for 32-bit PLATFORMID=linux_x86"
> again.
>
> (Notwithstanding the fact that tests that rely on Calc doing
> computations in a specific way, when Calc doesn't give any guarantees
> of how those computations should be carried out exactly AFAIK, are
> dubious and a pain at best.)
> _______________________________________________
> LibreOffice mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/libreoffice

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
Next » 12