[hidden email] hat am 5. Mai 2014 um 09:18 geschrieben:
Hello to all, we are using Quantlib and we're experiencing what we suppose to be a Memory Leak.Environment:- Quantlib 1.4 compiled in Windows with Visual Studio 2010 and 2012- QuantLib 1.4SWIG compiled with Visual Studio 2010 and 2012- applied patch to implement a thread safe QL, in windows, following Klaus Spanderen suggestions- QuantLib 1.4 JAVA compiled and executed with JAVA 1.7- we run the application using QL DLL in a windows 2008R2 server environmentHere below a list of the objects that we use inside the QL:Class=org.quantlib.Date
class="org".quantlib.Period
class="org".quantlib.TARGET
class="org".quantlib.Schedule
class="org".quantlib.DayCounter
class="org".quantlib.OneDayCounter
class="org".quantlib.Thirty360
class="org".quantlib.Actual360
class="org".quantlib.ActualActual
class="org".quantlib.Actual365Fixed
class="org".quantlib.SimpleDayCounter
class="org".quantlib.DoubleVector
class="org".quantlib.FixedRateBond
class="org".quantlib.UnitedKingdom
We see that the memory is increasing and, in a market day, reaches 12GB. Maybe there is a memory leak inside the DLL.Investigating the Memory leak we saw that:- JAVA part does not have ML (the memory well behave) so we think that the ML is into the DLL c++ part.- while memory with QL 1.4 increases fast, the QL 1.1 present a memory increase trend almost "perfect" (there is an increment but is acceptable)- we're doing other investigation to identify the not released objects.Do you have any suggestion ? Presents a so complex situation in a mail is almost impossible so we're available to provide to you any trace you need.Cheers, RA--------------------------------From: "roberto abati" <[hidden email]>
To: "Klaus Spanderen" <[hidden email]>
Cc: "Luigi Ballabio" <[hidden email]>, [hidden email]
Sent: Friday, 18 April, 2014 9:22:08 AM
Subject: Re: [Quantlib-users] Increasing Quantlib and Quantlib-swig-JAVA loglevel
Hello, Klaus, thanks for the feedback.We're trying to follow your suggestions but, in the meantime, if you can "summaries his changes for windows and my patch in a zip file."we'll appreciate A LOTThanks again, Cheers, RA
From: "Klaus Spanderen" <[hidden email]>
To: [hidden email]
Cc: "roberto abati" <[hidden email]>, "Luigi Ballabio" <[hidden email]>
Sent: Thursday, 17 April, 2014 9:52:36 PM
Subject: Re: [Quantlib-users] Increasing Quantlib and Quantlib-swig-JAVA loglevel
Hi
two question which might help to debug your issue:
1) Have you added observer.cpp to your visual studio solution?
2) Does the test-suite work?
I'd suggest to change the preprocessor directive in ql/qldefines.hpp because this will define it in all other projects (e.g. SWIG). In addition I'd use the code from the later post because the first version of the patch will not work with recent boost versions (Please also read/follow the Iraki's commects. If needed I can summaries his changes for windows and my patch in a zip file.).
Another way to solve the observer pattern issue with SWIG is to delete the observers in your java/c# application manually using the delete method on the java/c# object. If you do this carefully then you don't need to patch your quantlib librarry.
regards
Klaus
On Thursday 17 April 2014 17:35:25 [hidden email] wrote:
> Hello, thanks for feedback.
>
> We followed the procedure described in the two links.
> We're using Visual Studio 2012 to compile both the QuantLib1.4 and the
> QuantLib-SWIG.
>
> Step followed
> 1) enabled for the QuantLib Solution the BOOST_SP_ENABLE_DEBUG_HOOKS
> preprocessor directive 2) Replaced the files observable.hpp and
> observable.cpp (got from here ) and rebuild the entire QuantLib library 3)
> enabled for the QuantLib-swig Solution the BOOST_SP_ENABLE_DEBUG_HOOKS
> preprocessor directive (maybe this is wrong but we failed also without the
> directive) 4) restart build for the QuantLib-SWIG solution.
>
> we had following errors (here just a row of the error list)
>
>
> QuantLib::Observer::unregisterWith(class boost::shared_ptr<class
> QuantLib::Observable> const &)"
> (?unregisterWith@Observer@QuantLib@@QEAA_KAEBV?$shared_ptr@VObservable@Quan
> tLib@@@boost@@@Z) unresolved external
>
> -- It seems that the new quantlib did not considered the preprocessor
> directive
>
> 5) we have done some different attempts changing the directive inside the
> QuantLib-swig Solution without success
>
> Where do you think we had done some error ?
>
> Thanks in advance, Cheers.
>
> ----- Original Message -----
>
> From: "Luigi Ballabio" <[hidden email]>
> To: "roberto abati" <[hidden email]>
> Cc: "QuantLib users" <[hidden email]>
> Sent: Thursday, 17 April, 2014 3:36:57 PM
> Subject: Re: [Quantlib-users] Increasing Quantlib and Quantlib-swig-JAVA
> loglevel
>
> Hello,
> sorry, there's no setting to enable logging. I'll make a guess though: might
> your crashes in Java be related to the problem described by Klaus at <
> http://hpcquantlib.wordpress.com/2012/02/27/quantlib-swig-and-a-thread-safe
> -observer-pattern-in-c/ > and <
> http://hpcquantlib.wordpress.com/2013/07/26/multi-threading-and-quantlib/
> >?
>
> Luigi
>
>
>
> On Thu, Apr 17, 2014 at 2:55 PM, < [hidden email] > wrote:
>
>
>
> Hello, and thanks in advance for feedback.
> Is there a setting, can we use, to increment LOG verbosity of the quantlib
> and quantlib-swig libraries ?
>
> We're using the C++/Quantlib64bit + Quatlib-swig-Java 64 library and we have
> some rare crash but we're not able to collect any information on it.
>
> All the best, Roberto
>
> ----------------------------------------------------------------------------
> -- Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> QuantLib-users mailing list
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Free forum by Nabble | Disable Popup Ads | Edit this page |