Bug 76140 - OpenCL: Xirr function failure in build ...
Summary: OpenCL: Xirr function failure in build ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.3.0 target:4.2.6
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-13 19:51 UTC by Michael Meeks
Modified: 2014-06-06 08:35 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
clinfo.txt (5.96 KB, text/plain)
2014-03-13 19:52 UTC, Michael Meeks
Details
hwinfo.txt (399.87 KB, text/plain)
2014-03-13 19:52 UTC, Michael Meeks
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2014-03-13 19:51:42 UTC
I compile libreoffice with 'make' from the top-level and:

Dynamic formual compiler: unhandled token: unhandled opcode at :0

Dynamic formual compiler: unhandled token: unhandled opcode at :0

Dynamic formual compiler: unhandled token: unhandled opcode at :0

Dynamic formual compiler: unhandled token: unhandled opcode at :0

Dynamic formual compiler: unhandled token: unhandled opcode at :0
opencl-test.cxx:3420:Assertion
Test name: ScOpenclTest::testFinancialXirrFormula
double equality assertion failed
- Expected: 1.04286406930622e-16
- Actual  : 1.40411934087164e-17
- Delta   : 1.04286406930622e-20

Failures !!!
Run: 222   Failure total: 1   Failures: 1   Errors: 0

Error: a unit test failed, please do one of:

export DEBUGCPPUNIT=TRUE            # for exception catching
export CPPUNITTRACE="gdb --args"    # for interactive debugging on Linux
export CPPUNITTRACE="\"[full path to devenv.exe]\" /debugexe" # for interactive debugging in Visual Studio
export VALGRIND=memcheck            # for memory checking

and retry using: make CppunitTest_sc_opencl_test

make[1]: *** [/data/opt/libreoffice/master/workdir/CppunitTest/sc_opencl_test.test] Error 1
make: *** [build] Error 2

I'm running openSUSE 13.1 32bit (ie. x86 mode) on x86_64 hardware.

I attach clinfo & hwinfo.

HTH.
Comment 1 Michael Meeks 2014-03-13 19:52:26 UTC
Created attachment 95743 [details]
clinfo.txt
Comment 2 Michael Meeks 2014-03-13 19:52:52 UTC
Created attachment 95744 [details]
hwinfo.txt
Comment 3 Kohei Yoshida 2014-03-17 21:31:23 UTC
AnalysisAddIn::getXirr() in scaddins/source/analysis/financial.cxx implements this.  This is a numerically very unstable algorithm similar to our goal seek function.
Comment 4 Commit Notification 2014-03-17 22:43:41 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ca25cdcb398f200ce5d53286eea02d49d8d1c5f4

fdo#76140: Reimplement XIRR OpenCL test.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Kohei Yoshida 2014-03-17 22:46:16 UTC
I tried to understand why Calc's results are often different than Excel's then quickly gave up.  The algorithm used in XIRR is much like goal seek's and is pretty much a black box.  Instead, I just focused on the OpenCL calculation results against Calc's internal interpreter, which is what the original test did anyway.

Hopefully my above commit will improve the situation.
Comment 6 Kohei Yoshida 2014-03-25 03:02:53 UTC
Michael said this fixes for him.  I'll mark it fixed.
Comment 7 Commit Notification 2014-06-06 08:35:11 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a6a51ef9dd991e11c90317f4d6c29dfb310e1a17&h=libreoffice-4-2

fdo#76140: Reimplement XIRR OpenCL test.


It will be available in LibreOffice 4.2.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.