Login  Register

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Posted by Ivan A. Cherkasov on Sep 07, 2016; 4:25am
URL: http://quantlib.414.s1.nabble.com/QuantLib-1-8-vc14-AdaptiveRungeKutta-testsuite-error-tp17619p17689.html

And here is what I've got for Debug (static runtime) x64:

Running 646 test cases...
marketmodel.cpp(3630): fatal error: in "QuantLib test suite/Market-model tests/QuantLib::detail::quantlib_test_case(&MarketModelTest::testPathwiseVegas)": caps Pathwise vega test fails : 1
 
Tests completed in 11 h 22 m 27 s
 
 
*** 1 failure is detected in the test module "Master Test Suite"

On Sep 6, 2016 1:58 PM, "Ivan A. Cherkasov" <[hidden email]> wrote:

Hello, Luigi.

Wasn't able to figure it out so far. I'm building with configuration:Release and Platform:x64.

On Sep 6, 2016 1:47 PM, <[hidden email]> wrote:
Send QuantLib-dev mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/quantlib-dev
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of QuantLib-dev digest..."


Today's Topics:

   1. Re: [Quantlib-users] QuantLib SWIG C# - Calling Conventions
      (cdecl/stdcall) issue (Fabrice Lecuyer)
   2. Building QuantLib for C# - Is stdcall needed? (Fabrice Lecuyer)
   3. Potential Bug (Thompson  Mark)
   4. Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta      testsuite error
      (Luigi Ballabio)


----------------------------------------------------------------------

Message: 1
Date: Thu, 11 Aug 2016 18:28:44 +1000
From: Fabrice Lecuyer <[hidden email]>
Subject: Re: [Quantlib-dev] [Quantlib-users] QuantLib SWIG C# -
        Calling Conventions (cdecl/stdcall) issue
To: Luigi Ballabio <[hidden email]>
Cc: [hidden email],
        [hidden email]
Message-ID:
        <CAOEeWn5YK072TgpBFA=[hidden email]>
Content-Type: text/plain; charset="utf-8"

Hi Luigi,

Thanks. I've made a pull request on Github. Note I've kept it as minimal as
possible, I haven't updated the examples as I do not see any use for it
(plus getting some warnings due to the main functions calling convention
mismatches), and made the solution build configuration only build QuantLib,
not the examples.

I'd still be interested in discussing with anyone who is developing in C#
to confirm this is how they circumvented the problem.

Regards,
Fabrice

On 1 August 2016 at 18:41, Luigi Ballabio <[hidden email]> wrote:

> Hello Fabrice,
>     yes, adding the configurations would be nice, thanks.
>
> Luigi
>
>
> On Sat, Jul 2, 2016 at 12:07 PM Fabrice Lecuyer <[hidden email]>
> wrote:
>
>> Hi all,
>>
>>
>>  (email already sent as a non member, apologies if it creates a duplicate)
>>
>>
>> I?ve been building QuantLib & QuantLib SWIG ?as is? with VS14 for use
>> with C# and came across an initial error when running in debug, where
>> visual studio breaks giving a PInvoke stack imbalance error, as described
>> in this old thread:
>>
>> https://sourceforge.net/p/quantlib/mailman/quantlib-
>> users/thread/33276539.post%40talk.nabble.com/#msg28797382
>>
>> I first tried the solution described in this thread (modifying the SWIG
>> generated file to add calling convention = cdecl) and all seemed ok for a
>> while.
>>
>> The next problem appeared when QuantLib C++ was throwing an error, the C#
>> wasn?t catching it and instead crashing with a memory imbalance error.
>> Again, this is described in the thread below, but this time without a
>> solution.
>>
>> In order to catch the thrown C++ error, I?ve had to revert to the
>> original SWIG generated C# source file, and instead build QuantLib C++
>> using the stdcall calling convention (default in VS14 proj files is cdecl).
>>
>> Now everything is good, but I just wanted to ask around to other C# users
>> if this is a problem they have had, if they solved it this way that I?m
>> safe to assume I won?t find another issue of the kind down the line, or if
>> I?m unnecessarily complicating things.
>>
>> If this is indeed the best solution, would adding build configurations
>> for stdcall be considered? Happy to provide the updated vcproj files if yes.
>>
>>
>>
>> Regards,
>>
>> Fabrice.
>> ------------------------------------------------------------
>> ------------------
>> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
>> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
>> present their vision of the future. This family event has something for
>> everyone, including kids. Get more information and register today.
>> http://sdm.link/attshape_______________________________________________
>> QuantLib-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 2
Date: Tue, 23 Aug 2016 22:04:39 +1000
From: Fabrice Lecuyer <[hidden email]>
Subject: [Quantlib-dev] Building QuantLib for C# - Is stdcall needed?
To: [hidden email],
        [hidden email]
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset="utf-8"

Hi all,


I'm trying to get a confirmation that building and using QuantLib in C#
requires QuantLib and potentially the Boost libraries built using the *stdcall
*calling convention due to SWIG generated files forcing stdcall and various
spurious issues when mismatching the calling conventions.

Could any user or dev of QuantLib-SWIG for C# confirm they are doing so,
share if they are circumventing the issue(s) another way, or even mention
if they are not seeing any issue at all when building QuantLib "normally"?

Any help would be much appreciated.

Regards,
Fabrice
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 3
Date: Sun, 28 Aug 2016 11:31:10 +0000
From: "Thompson  Mark" <[hidden email]>
Subject: [Quantlib-dev] Potential Bug
To: "[hidden email]"
        <[hidden email]>
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="utf-8"

Dear Quantlib Maintainers,

I?m an analyst trying to set QuantLib with Anaconda Python up on Mac OSX El Capitan 10.11.6.

0. After some strange ac file errors compiling, and a compile with pointer errors under testing, I finally got the lastest version of QuantLib to compile with ?brew?.
1. brew currently defaults to 1.7 I got brew to compile 1.8 by modifying the ruby formula.
2. The quantlib test-suite reports all tests passed


?
A. I downloaded  Quantlib-SWIG 1.8 and compiled and installed it.
B. I got a strange symbol when trying to import the library in python:

ImportError: dlopen(/Users/mark/anaconda/lib/python3.5/site-packages/QuantLib/_QuantLib.cpython-35m-darwin.so, 2): Symbol not found: __ZN8QuantLib10DateParser14parseFormattedERKSsS2_
  Referenced from: /Users/mark/anaconda/lib/python3.5/site-packages/QuantLib/_QuantLib.cpython-35m-darwin.so
  Expected in: flat namespace
 in /Users/mark/anaconda/lib/python3.5/site-packages/QuantLib/_QuantLib.cpython-35m-darwin.so

C. I get a similar error in when running the tests included in the Python director of QuantLib-SWIG-1.8.


D. I read that Removed DateParser::split method (deprecated in version 1.6). is this related?


I?d be happy to write a detailed OSX guide for 1.8 as the instructions, but would need help solving this last issue which I now think has to do with this DateParser change.

Any hints or suggestions?



-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 4
Date: Tue, 06 Sep 2016 09:44:55 +0000
From: Luigi Ballabio <[hidden email]>
Subject: Re: [Quantlib-dev] QuantLib-1.8 | vc14 | AdaptiveRungeKutta
        testsuite error
To: Peter Caspers <[hidden email]>, "Cherkasov, Ivan"
        <[hidden email]>
Cc: "[hidden email]"
        <[hidden email]>
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset="utf-8"

Hello Ivan,
    could you make any check on this?

Thanks,
    Luigi

On Thu, Jul 28, 2016 at 3:17 PM Peter Caspers <[hidden email]>
wrote:

> Hi Ivan, this is not OK. Can you first check the following: You seem to
> run the 64bit executable, but the platform displayed in the test suite is
> Win32. Something seems to have got mixed here. Regards, Peter
>
> On 28 Jul 2016, at 06:01, Cherkasov, Ivan <[hidden email]>
> wrote:
>
> Hello.
>
> I get two failing test cases for AdaptiveRungeKutta in vc14:
>
> 1>  Testing adaptive Runge Kutta...
> 1>unknown location : fatal error : in "QuantLib test suite/ode
> tests/QuantLib::detail::quantlib_test_case(&OdeTest::testAdaptiveRungeKutta)":
> class QuantLib::Error: Stepsize (3.1414) underflow in
> AdaptiveRungeKutta::rkqs
> 1>  c:\tmp\ql18_vc2015\quantlib-1.8\test-suite\utilities.hpp(74): last
> checkpoint
> 1>  Testing matrix exponential based on ode...
> 1>unknown location : fatal error : in "QuantLib test suite/ode
> tests/QuantLib::detail::quantlib_test_case(&OdeTest::testMatrixExponential)":
> class QuantLib::Error: Too many steps (10000) in AdaptiveRungeKutta
>
> Testsuite output is attached.
>
> Please advise if this is OK.
>
> Thank you.
>
> ------------------------------
> ?????????? ?????????? ????????????? ?????? ??? ???????? ??? ????????????
> ????, ? ???????? ??????????, ? ????? ????????? ???????????????? ????????.
> ????? ?????, ????????, ??????????????? ??? ?????? ????????????? ??????????
> ?????? ??? ????????? ????? ??????????? ?????????? ?????????. ???? ??
> ???????? ?????? ????????? ?? ??????, ??????? ???????? ?? ???? ???????????
> ????? ????????? ? ??????? ????????? ?? ????? ???????????? ? ????.
>
> This e-mail message and any attachment are for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information. Any unauthorized review, use, disclosure or distribution is
> prohibited. If you are not the intended recipient, please contact the
> sender by reply and destroy all copies of the original message and any
> attachments thereto.
> Unless specifically stated otherwise, this communication is for
> information purposes only and may not be considered as advice, is not an
> offer or solicitation with respect to any transaction or an advertisement,
> and does not form a fiduciary relationship. For details of the
> disseminating legal entity and terms relating to risks, other conditions,
> and your reliance on information contained herein, see
> http://www.capital.otkritie.com/en/disclaimer/. If you cannot access the
> link, please notify the sender by reply message and you will be sent the
> full contents of this notice. Otkritie Capital International Limited,
> authorized and regulated by the Financial Conduct Authority (FCA).
>
> <testsuite.txt>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> QuantLib-dev mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> QuantLib-dev mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

------------------------------------------------------------------------------


------------------------------

_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev


End of QuantLib-dev Digest, Vol 123, Issue 1
********************************************

------------------------------------------------------------------------------

_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev