|
From: Ivan A. C. <iva...@gm...> - 2016-09-09 06:51:13
|
Peter, please see the command line for the test suite. For the standalone repro I was experimenting with compiler options, so they certainly may vary from the default ones. On Sep 9, 2016 10:31 AM, <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-1.8 | vc14 | AdaptiveRungeKutta testsuite error > (Peter Caspers) > 2. Re: Fwd: Re: QuantLib-1.8 | vc14 | AdaptiveRungeKutta > testsuite error (Ivan A. Cherkasov) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 9 Sep 2016 08:18:22 +0200 > From: Peter Caspers <pca...@gm...> > Subject: Re: [Quantlib-dev] QuantLib-1.8 | vc14 | AdaptiveRungeKutta > testsuite error > To: "Ivan A. Cherkasov" <iva...@gm...> > Cc: QuantLib Mailing Lists <qua...@li...>, > Luigi > Ballabio <lui...@gm...> > Message-ID: > <CACApxN-EV9_XHKRV1xpumMR0knimJ5ZhqRzia820t > 7Mw...@ma...> > Content-Type: text/plain; charset=UTF-8 > > 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 > <iva...@gm...> 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" <pca...@gm...> 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 <lui...@gm...> > wrote: > >> > >> Except it's not good if VC14 fails in the default configuration... > >> > >> > >> On Thu, Sep 8, 2016 at 2:19 PM Peter Caspers <pca...@gm...> > >> 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 < > iva...@gm...> > >>> 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" <pca...@gm...> > 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 < > iva...@gm...> > >>>> wrote: > >>>> > >>>> Also works with /O2 /Ob0 (w/o inlines) > >>>> > >>>> > >>>> > >>> <testsuite.log> > >>> > >>> > >>> > >>> ------------------------------------------------------------ > ------------------ > >>> _______________________________________________ > >>> QuantLib-dev mailing list > >>> Qua...@li... > >>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev > >> > >> > > > > > > ------------------------------ > > Message: 2 > Date: Fri, 9 Sep 2016 10:30:08 +0400 > From: "Ivan A. Cherkasov" <iva...@gm...> > Subject: Re: [Quantlib-dev] Fwd: Re: QuantLib-1.8 | vc14 | > AdaptiveRungeKutta testsuite error > To: pca...@gm..., lui...@gm... > Cc: qua...@li... > Message-ID: > <CAFex7kqPXiWBnT4bnqt=-yk2e3+_3meK8JzfihdoWwQG+gUmyg@mail. > gmail.com> > Content-Type: text/plain; charset="utf-8" > > 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" <iva...@gm...> > wrote: > > > ---------- Forwarded message ---------- > > From: "Ivan A. Cherkasov" <iva...@gm...> > > Date: Sep 9, 2016 10:10 AM > > Subject: Re: [Quantlib-dev] QuantLib-1.8 | vc14 | AdaptiveRungeKutta > > testsuite error > > To: "Peter Caspers" <pca...@gm...> > > Cc: <qua...@li...>, "Luigi Ballabio" < > > lui...@gm...> > > > > 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" <pca...@gm...> 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 <lui...@gm...> > >> wrote: > >> > >> Except it's not good if VC14 fails in the default configuration... > >> > >> > >> On Thu, Sep 8, 2016 at 2:19 PM Peter Caspers <pca...@gm...> > >> 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 < > iva...@gm...> > >>> 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" <pca...@gm...> > 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 < > iva...@gm...> > >>>> wrote: > >>>> > >>>> Also works with /O2 /Ob0 (w/o inlines) > >>>> > >>>> > >>>> <testsuite.log> > >>> > >>> > >>> ------------------------------------------------------------ > >>> ------------------ > >>> _______________________________________________ > >>> 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 13 > ********************************************* > |