Posted by
Rahul Reddy Kanchi on
Jul 19, 2011; 8:31pm
URL: http://quantlib.414.s1.nabble.com/test-suite-fails-when-run-in-debug-mode-but-is-successful-when-run-in-release-mode-tp13557p13559.html
Hi Luigi,
It enters a debugger and prompts for continue/break/ignore. But the same exception is thrown several times(may be in hundreds). Looks like the exception is thrown in checkRange() function. Time variable is -ve but we are checking it through QL_REQUIRE(t>0) and thus exception is thrown.
Test suite execution in release mode took more than an hour. Is this a normal behavior?
14> Tests completed in 1 h 26 m 40 s
14>
14>
14> Test suite "Master Test Suite" passed with:
14> 1718 assertions out of 1718 passed
14> 475 test cases out of 475 passed
14>
Exception Stack trace:
==================
QuantLib-test-suite-vc100-mt-gd.exe!QuantLib::TermStructure::checkRange(double t, bool extrapolate) Line 77 + 0xed bytes C++
QuantLib-test-suite-vc100-mt-gd.exe!QuantLib::YieldTermStructure::discount(double t, bool extrapolate) Line 93 C++
QuantLib-test-suite-vc100-mt-gd.exe!QuantLib::YieldTermStructure::discount(const QuantLib::Date & d, bool extrapolate) Line 188 C++
QuantLib-test-suite-vc100-mt-gd.exe!QuantLib::DiscountingSwapEngine::calculate() Line 94 + 0x39 bytes C++
QuantLib-test-suite-vc100-mt-gd.exe!QuantLib::Instrument::performCalculations() Line 168 + 0x26 bytes C++
QuantLib-test-suite-vc100-mt-gd.exe!QuantLib::LazyObject::calculate() Line 140 + 0xf bytes C++
QuantLib-test-suite-vc100-mt-gd.exe!QuantLib::Instrument::calculate() Line 155 C++
QuantLib-test-suite-vc100-mt-gd.exe!QuantLib::AssetSwap::fairSpread() Line 195 + 0xe bytes C++
QuantLib-test-suite-vc100-mt-gd.exe!AssetSwapTest::testMASWWithGenericBond() Line 2059 + 0xb bytes C++
QuantLib-test-suite-vc100-mt-gd.exe!boost::detail::function::void_function_invoker0<void (__cdecl*)(void),void>::invoke(boost::detail::function::function_buffer & function_ptr) Line 112 + 0x5 bytes C++
Thanks,
Rahul.
On Tue, Jul 19, 2011 at 9:15 AM, Luigi Ballabio
<[hidden email]> wrote:
On Mon, 2011-07-18 at 22:47 +0100, Rahul Reddy Kanchi wrote:
> Hi All,
> I have this wierd problem when running test suite. An exception is
> thrown when testsuite is run in debug mode. But when run in release
> mode it is successfull as some of the asserts are skipped in release
> mode.
No, I don't think it's a skipped assert. From the stack trace below,
the exception is thrown at line 94 of
<ql/pricingengines/swap/discountingengine.cpp>, but it should be caught
a couple of lines later and execution should continue (as it does in
release mode.)
When the exception is thrown, does the program stop, or does it just
enter the debugger? If the latter, do you have the option to continue
execution, and what happens then?
Luigi
> Note: I have checked out latest quantlib using tortoiseSVN and built
> it. Finally when i ran testsuite, an exception is thrown. Stack trace
> is attached. Could you please let me know if this a known behavior.
>
>
> Error Message:
> ==========
> First-chance exception at 0x763cc83b in
> QuantLib-test-suite-vc100-mt-gd.exe: Microsoft C++ exception:
> QuantLib::Error at memory location 0x0017a008..
>
>
> Stack trace is shown below:
> =====================
> ThrowException
> QuantLib-test-suite-vc100-mt-gd.exe!
> QuantLib::TermStructure::checkRange(double t, bool extrapolate) Line
> 77
> QuantLib-test-suite-vc100-mt-gd.exe!
> QuantLib::YieldTermStructure::discount(double t, bool extrapolate)
> Line 93
> QuantLib-test-suite-vc100-mt-gd.exe!
> QuantLib::YieldTermStructure::discount(const QuantLib::Date &d, bool
> extrapolate) Line 188
> QuantLib-test-suite-vc100-mt-gd.exe!
> QuantLib::DiscountingSwapEngine::calculate() Line 94
> QuantLib-test-suite-vc100-mt-gd.exe!
> QuantLib::Instrument::performCalculations() Line 168
> QuantLib-test-suite-vc100-mt-gd.exe!QuantLib::LazyObject::calculate()
> Line 140
> QuantLib-test-suite-vc100-mt-gd.exe!QuantLib::Instrument::calculate()
> Line 155
> QuantLib-test-suite-vc100-mt-gd.exe!
> QuantLib::AssetSwap::fairCleanPrice() Line 221
> QuantLib-test-suite-vc100-mt-gd.exe!AssetSwapTest::testConsistency()
> Line 163
> ......
> .....
> ------------------------------------------------------------------------------
> Storage Efficiency Calculator
> This modeling tool is based on patent-pending intellectual property that
> has been used successfully in hundreds of IBM storage optimization engage-
> ments, worldwide. Store less, Store more with what you own, Move data to
> the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
> _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev
--
The surest way to make a monkey of a man is to quote him.
-- Robert Benchley
------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev