QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Cherkasov, Ivan

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).

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

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

testsuite.txt (53K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Peter Caspers-4
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
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Luigi Ballabio
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

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

_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Ivan A. Cherkasov
In reply to this post by Cherkasov, Ivan

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
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Ivan A. Cherkasov

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
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Ivan A. Cherkasov
In reply to this post by Ivan A. Cherkasov

I was able to reproduce the test case failure in a standalone repro (crashes in release x64 only), please see attached along with the compiler and linker commands.

It fails on:
x = 3.15
rk_real(ode3_, y30, 0.0, x)

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

repro_rk.cpp (988 bytes) Download Attachment
CL.command.1.tlog (972 bytes) Download Attachment
link.command.1.tlog (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Peter Caspers-4
Hi,

I can not reproduce this (I am using vc12 though), with your code and x=3.15 I get

y3=-0.00840725 exact3=-0.00840725

What do you mean by this example code “crashes”? Do you get a wrong result or is it “really” crashing?

Regards
Peter

On 07 Sep 2016, at 13:44, Ivan A. Cherkasov <[hidden email]> wrote:

I was able to reproduce the test case failure in a standalone repro (crashes in release x64 only), please see attached along with the compiler and linker commands.

It fails on:
x = 3.15
rk_real(ode3_, y30, 0.0, x)

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
********************************************
<repro_rk.cpp><CL.command.1.tlog><link.command.1.tlog>------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Ivan A. Cherkasov

Yes, release x64 version crashes with the "program stopped working" dialog. Maybe, because of the QL_FAIL (repro doesn't catch anything).

I used boost 1.61.0 if that matters.

On Sep 7, 2016 5:42 PM, "Peter Caspers" <[hidden email]> wrote:
Hi,

I can not reproduce this (I am using vc12 though), with your code and x=3.15 I get

y3=-0.00840725 exact3=-0.00840725

What do you mean by this example code “crashes”? Do you get a wrong result or is it “really” crashing?

Regards
Peter

On 07 Sep 2016, at 13:44, Ivan A. Cherkasov <[hidden email]> wrote:

I was able to reproduce the test case failure in a standalone repro (crashes in release x64 only), please see attached along with the compiler and linker commands.

It fails on:
x = 3.15
rk_real(ode3_, y30, 0.0, x)

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
********************************************
<repro_rk.cpp><CL.command.1.tlog><link.command.1.tlog>------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Peter Caspers-4
ok, can you catch std::exception and send what() then, maybe that gives a hint.
Peter

On 07 Sep 2016, at 16:30, Ivan A. Cherkasov <[hidden email]> wrote:

Yes, release x64 version crashes with the "program stopped working" dialog. Maybe, because of the QL_FAIL (repro doesn't catch anything).

I used boost 1.61.0 if that matters.

On Sep 7, 2016 5:42 PM, "Peter Caspers" <[hidden email]> wrote:
Hi,

I can not reproduce this (I am using vc12 though), with your code and x=3.15 I get

y3=-0.00840725 exact3=-0.00840725

What do you mean by this example code “crashes”? Do you get a wrong result or is it “really” crashing?

Regards
Peter

On 07 Sep 2016, at 13:44, Ivan A. Cherkasov <[hidden email]> wrote:

I was able to reproduce the test case failure in a standalone repro (crashes in release x64 only), please see attached along with the compiler and linker commands.

It fails on:
x = 3.15
rk_real(ode3_, y30, 0.0, x)

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
********************************************
<repro_rk.cpp><CL.command.1.tlog><link.command.1.tlog>------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Ivan A. Cherkasov

Looks like this:


x = 3.14
rk_real(ode3_, y30, 0.0, x)
y3 = 0.00159265, -0.999999,
x = 3.15
rk_real(ode3_, y30, 0.0, x)
Stepsize (3.1414) underflow in AdaptiveRungeKutta::rkqs
x = 3.16
rk_real(ode3_, y30, 0.0, x)
Stepsize (3.1414) underflow in AdaptiveRungeKutta::rkqs

 

On Sep 7, 2016 6:35 PM, "Peter Caspers" <[hidden email]> wrote:
ok, can you catch std::exception and send what() then, maybe that gives a hint.
Peter

On 07 Sep 2016, at 16:30, Ivan A. Cherkasov <[hidden email]> wrote:

Yes, release x64 version crashes with the "program stopped working" dialog. Maybe, because of the QL_FAIL (repro doesn't catch anything).

I used boost 1.61.0 if that matters.

On Sep 7, 2016 5:42 PM, "Peter Caspers" <[hidden email]> wrote:
Hi,

I can not reproduce this (I am using vc12 though), with your code and x=3.15 I get

y3=-0.00840725 exact3=-0.00840725

What do you mean by this example code “crashes”? Do you get a wrong result or is it “really” crashing?

Regards
Peter

On 07 Sep 2016, at 13:44, Ivan A. Cherkasov <[hidden email]> wrote:

I was able to reproduce the test case failure in a standalone repro (crashes in release x64 only), please see attached along with the compiler and linker commands.

It fails on:
x = 3.15
rk_real(ode3_, y30, 0.0, x)

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
********************************************
<repro_rk.cpp><CL.command.1.tlog><link.command.1.tlog>------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Ivan A. Cherkasov

I rebuilt with /Od option (optimization disabled) and the repro ran successfully.

On Sep 7, 2016 7:23 PM, "Ivan A. Cherkasov" <[hidden email]> wrote:

Looks like this:


x = 3.14
rk_real(ode3_, y30, 0.0, x)
y3 = 0.00159265, -0.999999,
x = 3.15
rk_real(ode3_, y30, 0.0, x)
Stepsize (3.1414) underflow in AdaptiveRungeKutta::rkqs
x = 3.16
rk_real(ode3_, y30, 0.0, x)
Stepsize (3.1414) underflow in AdaptiveRungeKutta::rkqs

 

On Sep 7, 2016 6:35 PM, "Peter Caspers" <[hidden email]> wrote:
ok, can you catch std::exception and send what() then, maybe that gives a hint.
Peter

On 07 Sep 2016, at 16:30, Ivan A. Cherkasov <[hidden email]> wrote:

Yes, release x64 version crashes with the "program stopped working" dialog. Maybe, because of the QL_FAIL (repro doesn't catch anything).

I used boost 1.61.0 if that matters.

On Sep 7, 2016 5:42 PM, "Peter Caspers" <[hidden email]> wrote:
Hi,

I can not reproduce this (I am using vc12 though), with your code and x=3.15 I get

y3=-0.00840725 exact3=-0.00840725

What do you mean by this example code “crashes”? Do you get a wrong result or is it “really” crashing?

Regards
Peter

On 07 Sep 2016, at 13:44, Ivan A. Cherkasov <[hidden email]> wrote:

I was able to reproduce the test case failure in a standalone repro (crashes in release x64 only), please see attached along with the compiler and linker commands.

It fails on:
x = 3.15
rk_real(ode3_, y30, 0.0, x)

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
********************************************
<repro_rk.cpp><CL.command.1.tlog><link.command.1.tlog>------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Ivan A. Cherkasov

Also works with /O2 /Ob0 (w/o inlines)

On Sep 7, 2016 9:47 PM, "Ivan A. Cherkasov" <[hidden email]> wrote:

I rebuilt with /Od option (optimization disabled) and the repro ran successfully.

On Sep 7, 2016 7:23 PM, "Ivan A. Cherkasov" <[hidden email]> wrote:

Looks like this:


x = 3.14
rk_real(ode3_, y30, 0.0, x)
y3 = 0.00159265, -0.999999,
x = 3.15
rk_real(ode3_, y30, 0.0, x)
Stepsize (3.1414) underflow in AdaptiveRungeKutta::rkqs
x = 3.16
rk_real(ode3_, y30, 0.0, x)
Stepsize (3.1414) underflow in AdaptiveRungeKutta::rkqs

 

On Sep 7, 2016 6:35 PM, "Peter Caspers" <[hidden email]> wrote:
ok, can you catch std::exception and send what() then, maybe that gives a hint.
Peter

On 07 Sep 2016, at 16:30, Ivan A. Cherkasov <[hidden email]> wrote:

Yes, release x64 version crashes with the "program stopped working" dialog. Maybe, because of the QL_FAIL (repro doesn't catch anything).

I used boost 1.61.0 if that matters.

On Sep 7, 2016 5:42 PM, "Peter Caspers" <[hidden email]> wrote:
Hi,

I can not reproduce this (I am using vc12 though), with your code and x=3.15 I get

y3=-0.00840725 exact3=-0.00840725

What do you mean by this example code “crashes”? Do you get a wrong result or is it “really” crashing?

Regards
Peter

On 07 Sep 2016, at 13:44, Ivan A. Cherkasov <[hidden email]> wrote:

I was able to reproduce the test case failure in a standalone repro (crashes in release x64 only), please see attached along with the compiler and linker commands.

It fails on:
x = 3.15
rk_real(ode3_, y30, 0.0, x)

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
********************************************
<repro_rk.cpp><CL.command.1.tlog><link.command.1.tlog>------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Peter Caspers-4
Can you post the full compiler command line (you find that under C++ / Command Line), I can not provoke the error no matter what optimization flags I use

/FR".\build\vc120\x64\Release\" /GS /W3 /Gy /Zc:wchar_t /I"..\.." /Zi /Gm- /Ox /Ob2 /Fd".\build\vc120\x64\Release\" /fp:fast /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_SCL_SECURE_NO_DEPRECATE" /D "_CRT_SECURE_NO_DEPRECATE" /D "_MBCS" /fp:except /errorReport:prompt /GF /WX- /Zc:forScope /GR /Gd /MD /Fa".\build\vc120\x64\Release\" /EHsc /nologo /Fo".\build\vc120\x64\Release\" /Ot /Fp".\build\vc120\x64\Release\BermudanSwaption.pch” 
On 07 Sep 2016, at 19:59, Ivan A. Cherkasov <[hidden email]> wrote:

Also works with /O2 /Ob0 (w/o inlines)




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

_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Ivan A. Cherkasov

Hello.
 
This failed for me (CL.command.1.tlog):
 
^C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
/c /IC:\BIN\BOOST_1_61_0 /I"C:\TMP\QL18_VC2015\QUANTLIB-1.8" /Zi /nologo /W3 /WX- /sdl /O2 /Oi /GL /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"X64\RELEASE\\" /Fd"X64\RELEASE\VC140.PDB" /Gd /TP C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
 
This worked for me:
 
^C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
/c /IC:\BIN\BOOST_1_61_0 /I"C:\TMP\QL18_VC2015\QUANTLIB-1.8" /Zi /nologo /W3 /WX- /sdl /O2 /Ob0 /Ot /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"X64\RELEASE\\" /Fd"X64\RELEASE\VC140.PDB" /Gd /TP C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
 
I’m using “Version 14.0.25422.01 Update 3”.
 
I rebuilt from scratch using QuantLib-1.8.tar.gz and QuantLib_vc14.sln, the only thing I changed in the project settings is the C/C++ -> Optimization -> Inline Function Expansion = Disabled (/Ob0). It succeeded, test suite log attached.

On Sep 7, 2016 10:00 PM, "Peter Caspers" <[hidden email]> wrote:
Can you post the full compiler command line (you find that under C++ / Command Line), I can not provoke the error no matter what optimization flags I use

/FR".\build\vc120\x64\Release\" /GS /W3 /Gy /Zc:wchar_t /I"..\.." /Zi /Gm- /Ox /Ob2 /Fd".\build\vc120\x64\Release\" /fp:fast /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_SCL_SECURE_NO_DEPRECATE" /D "_CRT_SECURE_NO_DEPRECATE" /D "_MBCS" /fp:except /errorReport:prompt /GF /WX- /Zc:forScope /GR /Gd /MD /Fa".\build\vc120\x64\Release\" /EHsc /nologo /Fo".\build\vc120\x64\Release\" /Ot /Fp".\build\vc120\x64\Release\BermudanSwaption.pch” 
On 07 Sep 2016, at 19:59, Ivan A. Cherkasov <[hidden email]> wrote:

Also works with /O2 /Ob0 (w/o inlines)




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

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

testsuite.log (53K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Peter Caspers-4
Hi,

I don’t see an issue with /Ob2 on VC12. This all looks like a bug in the VC14 - code optimization to me, nothing we can (or should) really fix in the code?

Regards
Peter

On 08 Sep 2016, at 09:19, Ivan A. Cherkasov <[hidden email]> wrote:

Hello.
 
This failed for me (CL.command.1.tlog):
 
^C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
/c /IC:\BIN\BOOST_1_61_0 /I"C:\TMP\QL18_VC2015\QUANTLIB-1.8" /Zi /nologo /W3 /WX- /sdl /O2 /Oi /GL /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"X64\RELEASE\\" /Fd"X64\RELEASE\VC140.PDB" /Gd /TP C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
 
This worked for me:
 
^C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
/c /IC:\BIN\BOOST_1_61_0 /I"C:\TMP\QL18_VC2015\QUANTLIB-1.8" /Zi /nologo /W3 /WX- /sdl /O2 /Ob0 /Ot /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"X64\RELEASE\\" /Fd"X64\RELEASE\VC140.PDB" /Gd /TP C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
 
I’m using “Version 14.0.25422.01 Update 3”.
 
I rebuilt from scratch using QuantLib-1.8.tar.gz and QuantLib_vc14.sln, the only thing I changed in the project settings is the C/C++ -> Optimization -> Inline Function Expansion = Disabled (/Ob0). It succeeded, test suite log attached.

On Sep 7, 2016 10:00 PM, "Peter Caspers" <[hidden email]> wrote:
Can you post the full compiler command line (you find that under C++ / Command Line), I can not provoke the error no matter what optimization flags I use

/FR".\build\vc120\x64\Release\" /GS /W3 /Gy /Zc:wchar_t /I"..\.." /Zi /Gm- /Ox /Ob2 /Fd".\build\vc120\x64\Release\" /fp:fast /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_SCL_SECURE_NO_DEPRECATE" /D "_CRT_SECURE_NO_DEPRECATE" /D "_MBCS" /fp:except /errorReport:prompt /GF /WX- /Zc:forScope /GR /Gd /MD /Fa".\build\vc120\x64\Release\" /EHsc /nologo /Fo".\build\vc120\x64\Release\" /Ot /Fp".\build\vc120\x64\Release\BermudanSwaption.pch” 
On 07 Sep 2016, at 19:59, Ivan A. Cherkasov <[hidden email]> wrote:

Also works with /O2 /Ob0 (w/o inlines)



<testsuite.log>


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

_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Luigi Ballabio
Except it's not good if VC14 fails in the default configuration...


On Thu, Sep 8, 2016 at 2:19 PM Peter Caspers <[hidden email]> wrote:
Hi,

I don’t see an issue with /Ob2 on VC12. This all looks like a bug in the VC14 - code optimization to me, nothing we can (or should) really fix in the code?

Regards
Peter

On 08 Sep 2016, at 09:19, Ivan A. Cherkasov <[hidden email]> wrote:

Hello.
 
This failed for me (CL.command.1.tlog):
 
^C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
/c /IC:\BIN\BOOST_1_61_0 /I"C:\TMP\QL18_VC2015\QUANTLIB-1.8" /Zi /nologo /W3 /WX- /sdl /O2 /Oi /GL /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"X64\RELEASE\\" /Fd"X64\RELEASE\VC140.PDB" /Gd /TP C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
 
This worked for me:
 
^C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
/c /IC:\BIN\BOOST_1_61_0 /I"C:\TMP\QL18_VC2015\QUANTLIB-1.8" /Zi /nologo /W3 /WX- /sdl /O2 /Ob0 /Ot /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"X64\RELEASE\\" /Fd"X64\RELEASE\VC140.PDB" /Gd /TP C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
 
I’m using “Version 14.0.25422.01 Update 3”.
 
I rebuilt from scratch using QuantLib-1.8.tar.gz and QuantLib_vc14.sln, the only thing I changed in the project settings is the C/C++ -> Optimization -> Inline Function Expansion = Disabled (/Ob0). It succeeded, test suite log attached.

On Sep 7, 2016 10:00 PM, "Peter Caspers" <[hidden email]> wrote:
Can you post the full compiler command line (you find that under C++ / Command Line), I can not provoke the error no matter what optimization flags I use

/FR".\build\vc120\x64\Release\" /GS /W3 /Gy /Zc:wchar_t /I"..\.." /Zi /Gm- /Ox /Ob2 /Fd".\build\vc120\x64\Release\" /fp:fast /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_SCL_SECURE_NO_DEPRECATE" /D "_CRT_SECURE_NO_DEPRECATE" /D "_MBCS" /fp:except /errorReport:prompt /GF /WX- /Zc:forScope /GR /Gd /MD /Fa".\build\vc120\x64\Release\" /EHsc /nologo /Fo".\build\vc120\x64\Release\" /Ot /Fp".\build\vc120\x64\Release\BermudanSwaption.pch” 
On 07 Sep 2016, at 19:59, Ivan A. Cherkasov <[hidden email]> wrote:

Also works with /O2 /Ob0 (w/o inlines)



<testsuite.log>

------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Peter Caspers-4
Yes. Ivan, could you try to put

__declspec(noinline)

before the rkqs and rkck and operator() functions and see if it works then?

On 08 Sep 2016, at 14:22, Luigi Ballabio <[hidden email]> wrote:

Except it's not good if VC14 fails in the default configuration...


On Thu, Sep 8, 2016 at 2:19 PM Peter Caspers <[hidden email]> wrote:
Hi,

I don’t see an issue with /Ob2 on VC12. This all looks like a bug in the VC14 - code optimization to me, nothing we can (or should) really fix in the code?

Regards
Peter

On 08 Sep 2016, at 09:19, Ivan A. Cherkasov <[hidden email]> wrote:

Hello.
 
This failed for me (CL.command.1.tlog):
 
^C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
/c /IC:\BIN\BOOST_1_61_0 /I"C:\TMP\QL18_VC2015\QUANTLIB-1.8" /Zi /nologo /W3 /WX- /sdl /O2 /Oi /GL /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"X64\RELEASE\\" /Fd"X64\RELEASE\VC140.PDB" /Gd /TP C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
 
This worked for me:
 
^C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
/c /IC:\BIN\BOOST_1_61_0 /I"C:\TMP\QL18_VC2015\QUANTLIB-1.8" /Zi /nologo /W3 /WX- /sdl /O2 /Ob0 /Ot /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"X64\RELEASE\\" /Fd"X64\RELEASE\VC140.PDB" /Gd /TP C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
 
I’m using “Version 14.0.25422.01 Update 3”.
 
I rebuilt from scratch using QuantLib-1.8.tar.gz and QuantLib_vc14.sln, the only thing I changed in the project settings is the C/C++ -> Optimization -> Inline Function Expansion = Disabled (/Ob0). It succeeded, test suite log attached.

On Sep 7, 2016 10:00 PM, "Peter Caspers" <[hidden email]> wrote:
Can you post the full compiler command line (you find that under C++ / Command Line), I can not provoke the error no matter what optimization flags I use

/FR".\build\vc120\x64\Release\" /GS /W3 /Gy /Zc:wchar_t /I"..\.." /Zi /Gm- /Ox /Ob2 /Fd".\build\vc120\x64\Release\" /fp:fast /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_SCL_SECURE_NO_DEPRECATE" /D "_CRT_SECURE_NO_DEPRECATE" /D "_MBCS" /fp:except /errorReport:prompt /GF /WX- /Zc:forScope /GR /Gd /MD /Fa".\build\vc120\x64\Release\" /EHsc /nologo /Fo".\build\vc120\x64\Release\" /Ot /Fp".\build\vc120\x64\Release\BermudanSwaption.pch” 
On 07 Sep 2016, at 19:59, Ivan A. Cherkasov <[hidden email]> wrote:

Also works with /O2 /Ob0 (w/o inlines)



<testsuite.log>

------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Peter Caspers-4
Hi,

in my project settings I have /Ob2 by default, in your compiler line
below (the one that fails) I don't see this flag at all. Did you
change any of the default project settings? Is there anybody else on
VC14 that can reproduce this problem? The only thing from boost that
is used in your standalone code seems to be boost::function, so I
doubt it has to do with the boost version (but who knows).

Regards
Peter

On 9 September 2016 at 08:10, Ivan A. Cherkasov
<[hidden email]> wrote:

> Hello.
> It failed. Please see the attached files.
>
> Supposedly some other function gets messed up by inline expansion and that
> was caught accidentally by the RK test case. Or compiler ignores the
> declspec.
>
> On Sep 8, 2016 4:44 PM, "Peter Caspers" <[hidden email]> wrote:
>>
>> Yes. Ivan, could you try to put
>>
>> __declspec(noinline)
>>
>>
>> before the rkqs and rkck and operator() functions and see if it works
>> then?
>>
>> On 08 Sep 2016, at 14:22, Luigi Ballabio <[hidden email]> wrote:
>>
>> Except it's not good if VC14 fails in the default configuration...
>>
>>
>> On Thu, Sep 8, 2016 at 2:19 PM Peter Caspers <[hidden email]>
>> wrote:
>>>
>>> Hi,
>>>
>>> I don’t see an issue with /Ob2 on VC12. This all looks like a bug in the
>>> VC14 - code optimization to me, nothing we can (or should) really fix in the
>>> code?
>>>
>>> Regards
>>> Peter
>>>
>>> On 08 Sep 2016, at 09:19, Ivan A. Cherkasov <[hidden email]>
>>> wrote:
>>>
>>> Hello.
>>>
>>> This failed for me (CL.command.1.tlog):
>>>
>>> ^C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
>>> /c /IC:\BIN\BOOST_1_61_0 /I"C:\TMP\QL18_VC2015\QUANTLIB-1.8" /Zi /nologo
>>> /W3 /WX- /sdl /O2 /Oi /GL /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm-
>>> /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline
>>> /Fo"X64\RELEASE\\" /Fd"X64\RELEASE\VC140.PDB" /Gd /TP
>>> C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
>>>
>>> This worked for me:
>>>
>>> ^C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
>>> /c /IC:\BIN\BOOST_1_61_0 /I"C:\TMP\QL18_VC2015\QUANTLIB-1.8" /Zi /nologo
>>> /W3 /WX- /sdl /O2 /Ob0 /Ot /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm-
>>> /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline
>>> /Fo"X64\RELEASE\\" /Fd"X64\RELEASE\VC140.PDB" /Gd /TP
>>> C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
>>>
>>> I’m using “Version 14.0.25422.01 Update 3”.
>>>
>>> I rebuilt from scratch using QuantLib-1.8.tar.gz and QuantLib_vc14.sln,
>>> the only thing I changed in the project settings is the C/C++ ->
>>> Optimization -> Inline Function Expansion = Disabled (/Ob0). It succeeded,
>>> test suite log attached.
>>>
>>> On Sep 7, 2016 10:00 PM, "Peter Caspers" <[hidden email]> wrote:
>>>>
>>>> Can you post the full compiler command line (you find that under C++ /
>>>> Command Line), I can not provoke the error no matter what optimization flags
>>>> I use
>>>>
>>>> /FR".\build\vc120\x64\Release\" /GS /W3 /Gy /Zc:wchar_t /I"..\.." /Zi
>>>> /Gm- /Ox /Ob2 /Fd".\build\vc120\x64\Release\" /fp:fast /D "NDEBUG" /D
>>>> "WIN32" /D "_CONSOLE" /D "_SCL_SECURE_NO_DEPRECATE" /D
>>>> "_CRT_SECURE_NO_DEPRECATE" /D "_MBCS" /fp:except /errorReport:prompt /GF
>>>> /WX- /Zc:forScope /GR /Gd /MD /Fa".\build\vc120\x64\Release\" /EHsc /nologo
>>>> /Fo".\build\vc120\x64\Release\" /Ot
>>>> /Fp".\build\vc120\x64\Release\BermudanSwaption.pch”
>>>>
>>>> On 07 Sep 2016, at 19:59, Ivan A. Cherkasov <[hidden email]>
>>>> wrote:
>>>>
>>>> Also works with /O2 /Ob0 (w/o inlines)
>>>>
>>>>
>>>>
>>> <testsuite.log>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> 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
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Ivan A. Cherkasov
In reply to this post by Peter Caspers-4

3rd attempt, SF blocks attachments.

It failed. Supposedly some other function gets messed up by inline expansion and that was caught accidentally by the RK test case. Or compiler ignores the declspec.

 
 
--- ./ql18_vc2015_mk2/QuantLib-1.8/ql/math/ode/adaptiverungekutta.hpp       2015-12-21 13:46:03.000000000 +0300
+++ ./ql18_vc2015_mk3/QuantLib-1.8/ql/math/ode/adaptiverungekutta.hpp    2016-09-08 19:46:27.359406500 +0300
@@ -161,7 +161,7 @@
     }
     template<class T>
-    T AdaptiveRungeKutta<T>::operator()(const OdeFct1d& ode,
+             __declspec(noinline) T AdaptiveRungeKutta<T>::operator()(const OdeFct1d& ode,
                                         const T y1,
                                         const Real x1,
                                         const Real x2) {
@@ -170,7 +170,7 @@
     }
     template<class T>
-    void AdaptiveRungeKutta<T>::rkqs(std::vector<T>& y,
+             __declspec(noinline) void AdaptiveRungeKutta<T>::rkqs(std::vector<T>& y,
                                      const std::vector<T>& dydx,
                                      Real& x,
                                      const Real htry,
@@ -213,7 +213,7 @@
     }
     template <class T>
-    void AdaptiveRungeKutta<T>::rkck(const std::vector<T>& y,
+             __declspec(noinline) void AdaptiveRungeKutta<T>::rkck(const std::vector<T>& y,
                                      const std::vector<T>& dydx,
                                      Real x,
                                      const Real h,
 
 
^C:\TMP\QL18_VC2015_MK3\QUANTLIB-1.8\TEST-SUITE\QUANTLIBTESTSUITE.CPP
/c /IC:\BIN\BOOST_1_61_0 /I.. /Zi /nologo /W3 /WX- /O2 /Ob2 /Ot /D NDEBUG /D WIN32 /D _CONSOLE /D _SCL_SECURE_NO_DEPRECATE /D _CRT_SECURE_NO_DEPRECATE /D _MBCS /GF /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo".\BUILD\VC140\X64\RELEASE\\" /Fd".\BUILD\VC140\X64\RELEASE\VC140.PDB" /Gd /TP C:\TMP\QL18_VC2015_MK3\QUANTLIB-1.8\TEST-SUITE\QUANTLIBTESTSUITE.CPP
 
 
 
  Testing adaptive Runge Kutta...
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
  c:\tmp\ql18_vc2015_mk3\quantlib-1.8\test-suite\utilities.hpp(74): last checkpoint
  Testing matrix exponential based on ode...
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
  c:\tmp\ql18_vc2015_mk3\quantlib-1.8\test-suite\utilities.hpp(74): last checkpoint
  Testing matrix exponential of a zero matrix based on ode...
 

On Sep 9, 2016 10:15 AM, "Ivan A. Cherkasov" <[hidden email]> wrote:
---------- Forwarded message ----------
From: "Ivan A. Cherkasov" <[hidden email]>
Date: Sep 9, 2016 10:10 AM
Subject: Re: [Quantlib-dev] QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error
To: "Peter Caspers" <[hidden email]>
Cc: <[hidden email]>, "Luigi Ballabio" <[hidden email]>

Hello.
It failed. Please see the attached files.

Supposedly some other function gets messed up by inline expansion and that was caught accidentally by the RK test case. Or compiler ignores the declspec.

On Sep 8, 2016 4:44 PM, "Peter Caspers" <[hidden email]> wrote:
Yes. Ivan, could you try to put

__declspec(noinline)

before the rkqs and rkck and operator() functions and see if it works then?

On 08 Sep 2016, at 14:22, Luigi Ballabio <[hidden email]> wrote:

Except it's not good if VC14 fails in the default configuration...


On Thu, Sep 8, 2016 at 2:19 PM Peter Caspers <[hidden email]> wrote:
Hi,

I don’t see an issue with /Ob2 on VC12. This all looks like a bug in the VC14 - code optimization to me, nothing we can (or should) really fix in the code?

Regards
Peter

On 08 Sep 2016, at 09:19, Ivan A. Cherkasov <[hidden email]> wrote:

Hello.
 
This failed for me (CL.command.1.tlog):
 
^C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
/c /IC:\BIN\BOOST_1_61_0 /I"C:\TMP\QL18_VC2015\QUANTLIB-1.8" /Zi /nologo /W3 /WX- /sdl /O2 /Oi /GL /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"X64\RELEASE\\" /Fd"X64\RELEASE\VC140.PDB" /Gd /TP C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
 
This worked for me:
 
^C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
/c /IC:\BIN\BOOST_1_61_0 /I"C:\TMP\QL18_VC2015\QUANTLIB-1.8" /Zi /nologo /W3 /WX- /sdl /O2 /Ob0 /Ot /D NDEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"X64\RELEASE\\" /Fd"X64\RELEASE\VC140.PDB" /Gd /TP C:\TMP\QL18_VC2015\REPRO_RK\REPRO_RK.CPP
 
I’m using “Version 14.0.25422.01 Update 3”.
 
I rebuilt from scratch using QuantLib-1.8.tar.gz and QuantLib_vc14.sln, the only thing I changed in the project settings is the C/C++ -> Optimization -> Inline Function Expansion = Disabled (/Ob0). It succeeded, test suite log attached.

On Sep 7, 2016 10:00 PM, "Peter Caspers" <[hidden email]> wrote:
Can you post the full compiler command line (you find that under C++ / Command Line), I can not provoke the error no matter what optimization flags I use

/FR".\build\vc120\x64\Release\" /GS /W3 /Gy /Zc:wchar_t /I"..\.." /Zi /Gm- /Ox /Ob2 /Fd".\build\vc120\x64\Release\" /fp:fast /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_SCL_SECURE_NO_DEPRECATE" /D "_CRT_SECURE_NO_DEPRECATE" /D "_MBCS" /fp:except /errorReport:prompt /GF /WX- /Zc:forScope /GR /Gd /MD /Fa".\build\vc120\x64\Release\" /EHsc /nologo /Fo".\build\vc120\x64\Release\" /Ot /Fp".\build\vc120\x64\Release\BermudanSwaption.pch” 
On 07 Sep 2016, at 19:59, Ivan A. Cherkasov <[hidden email]> wrote:

Also works with /O2 /Ob0 (w/o inlines)



<testsuite.log>

------------------------------------------------------------------------------
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta testsuite error

Ivan A. Cherkasov

One more observation I wanted to share:
 
with /fp:strict /fp:except compile flags (https://msdn.microsoft.com/en-us/library/e7s85ffb.aspx) I’m getting build errors.
 
command line:
 
^C:\TMP\QL18_VC2015_MK3\QUANTLIB-1.8\QL\EXPERIMENTAL\FINITEDIFFERENCES\DYNPROGVPPINTRINSICVALUEENGINE.CPP
/c /IC:\BIN\BOOST_1_61_0 /I. /Zi /nologo /W3 /WX- /O2 /Ob2 /Ot /D NDEBUG /D WIN32 /D _LIB /D _SCL_SECURE_NO_DEPRECATE /D _CRT_SECURE_NO_DEPRECATE /D _MBCS /GF /Gm- /EHsc /MD /GS /Gy /fp:strict /fp:except /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo".\BUILD\VC140\X64\RELEASE\\" /Fd".\BUILD\VC140\X64\RELEASE\QUANTLIB.PDB" /Gd /TP C:\TMP\QL18_VC2015_MK3\QUANTLIB-1.8\QL\EXPERIMENTAL\FINITEDIFFERENCES\DYNPROGVPPINTRINSICVALUEENGINE.CPP
 
build errors:
 

 
1>  dynprogvppintrinsicvalueengine.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xcomplex(646): error C2131: expression did not evaluate to a constant (compiling source file ql\experimental\finitedifferences\hestonrndcalculator.cpp)
1>  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xcomplex(646): note: failure was caused by an undefined arithmetic operation (compiling source file ql\experimental\finitedifferences\hestonrndcalculator.cpp)
1>  ql\experimental\finitedifferences\hestonrndcalculator.cpp(110): note: see reference to function template instantiation 'std::complex<double> std::log<double>(const std::complex<double> &)' being compiled
 

 
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xcomplex(232): error C2131: expression did not evaluate to a constant (compiling source file ql\math\modifiedbessel.cpp)
1>  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xcomplex(232): note: failure was caused by an undefined arithmetic operation (compiling source file ql\math\modifiedbessel.cpp)
1>  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xcomplex(253): note: see reference to function template instantiation '_Ty std::_Fabs<double>(const std::complex<double> &,int *)' being compiled
1>          with
 
...
 
and so on.


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

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