|
From: Ivan A. C. <iva...@gm...> - 2016-09-07 17:59:31
|
Also works with /O2 /Ob0 (w/o inlines) On Sep 7, 2016 9:47 PM, "Ivan A. Cherkasov" <iva...@gm...> wrote: > I rebuilt with /Od option (optimization disabled) and the repro ran > successfully. > On Sep 7, 2016 7:23 PM, "Ivan A. Cherkasov" <iva...@gm...> > 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" <pca...@gm...> 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 <iva...@gm...> >>> 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" <pca...@gm...> 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 <iva...@gm...> >>>> 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" <iva...@gm...> >>>> 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, <qua...@li...> >>>>> wrote: >>>>> >>>>>> Send QuantLib-dev mailing list submissions to >>>>>> qua...@li... >>>>>> >>>>>> 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 >>>>>> qua...@li... >>>>>> >>>>>> You can reach the person managing the list at >>>>>> qua...@li... >>>>>> >>>>>> 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 <fab...@gm...> >>>>>> Subject: Re: [Quantlib-dev] [Quantlib-users] QuantLib SWIG C# - >>>>>> Calling Conventions (cdecl/stdcall) issue >>>>>> To: Luigi Ballabio <lui...@gm...> >>>>>> Cc: qua...@li..., >>>>>> qua...@li... >>>>>> Message-ID: >>>>>> <CAOEeWn5YK072TgpBFA=8wCV+PS7jN1arDqw1iOeLZXsEUvZqpw@mail. >>>>>> gmail.com> >>>>>> 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 <lui...@gm...> >>>>>> wrote: >>>>>> >>>>>> > Hello Fabrice, >>>>>> > yes, adding the configurations would be nice, thanks. >>>>>> > >>>>>> > Luigi >>>>>> > >>>>>> > >>>>>> > On Sat, Jul 2, 2016 at 12:07 PM Fabrice Lecuyer < >>>>>> fab...@gm...> >>>>>> > 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 >>>>>> >> Qua...@li... >>>>>> >> 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 <fab...@gm...> >>>>>> Subject: [Quantlib-dev] Building QuantLib for C# - Is stdcall needed? >>>>>> To: qua...@li..., >>>>>> qua...@li... >>>>>> Message-ID: >>>>>> <CAOEeWn4RdrQsQchOTO44xQsrz2XhyNwf_YttUetafQexdqBVWA@mail. >>>>>> gmail.com> >>>>>> 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" <ma...@st...> >>>>>> Subject: [Quantlib-dev] Potential Bug >>>>>> To: "qua...@li..." >>>>>> <qua...@li...> >>>>>> Message-ID: <D1F...@st...> >>>>>> 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/li >>>>>> b/python3.5/site-packages/QuantLib/_QuantLib.cpython-35m-darwin.so >>>>>> <http://quantlib.cpython-35m-darwin.so/>, 2): Symbol not found: >>>>>> __ZN8QuantLib10DateParser14parseFormattedERKSsS2_ >>>>>> Referenced from: /Users/mark/anaconda/lib/pytho >>>>>> n3.5/site-packages/QuantLib/_QuantLib.cpython-35m-darwin.so >>>>>> <http://quantlib.cpython-35m-darwin.so/> >>>>>> Expected in: flat namespace >>>>>> in /Users/mark/anaconda/lib/python3.5/site-packages/QuantLib/_Q >>>>>> uantLib.cpython-35m-darwin.so >>>>>> <http://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 <lui...@gm...> >>>>>> Subject: Re: [Quantlib-dev] QuantLib-1.8 | vc14 | AdaptiveRungeKutta >>>>>> testsuite error >>>>>> To: Peter Caspers <pca...@gm...>, "Cherkasov, Ivan" >>>>>> <Iva...@ot...> >>>>>> Cc: "qua...@li..." >>>>>> <qua...@li...> >>>>>> Message-ID: >>>>>> <CAJkxnzcdPu-Bxdhokz5mV7-YHjthAuTGojf5VqRu_j4NkBMB0Q@mail. >>>>>> gmail.com> >>>>>> 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 <pca...@gm... >>>>>> > >>>>>> 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 < >>>>>> Iva...@ot...> >>>>>> > 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::testAda >>>>>> ptiveRungeKutta)": >>>>>> > 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::testMat >>>>>> rixExponential)": >>>>>> > 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 >>>>>> > Qua...@li... >>>>>> > https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>> > >>>>>> > >>>>>> > ------------------------------------------------------------ >>>>>> ------------------ >>>>>> > _______________________________________________ >>>>>> > QuantLib-dev mailing list >>>>>> > Qua...@li... >>>>>> > https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>>>> > >>>>>> -------------- next part -------------- >>>>>> An HTML attachment was scrubbed... >>>>>> >>>>>> ------------------------------ >>>>>> >>>>>> ------------------------------------------------------------ >>>>>> ------------------ >>>>>> >>>>>> >>>>>> ------------------------------ >>>>>> >>>>>> _______________________________________________ >>>>>> QuantLib-dev mailing list >>>>>> Qua...@li... >>>>>> 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 >>>> Qua...@li... >>>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev >>>> >>>> >>>> >>> |