Login  Register

Re: multi threading in QuantLib

Posted by Luigi Ballabio on Nov 18, 2014; 11:46am
URL: http://quantlib.414.s1.nabble.com/multi-threading-in-QuantLib-tp16019p16054.html

No easy way, unfortunately. The best you can do is to enable per-thread singletons. On Windows, edit ql/userconfig.hpp and uncomment 
#define QL_ENABLE_SESSIONS
at the end of the file; on other platforms, run 
./configure --enable-sessions

In both cases, you'll have to recompile the library and to provide a function 
Integer sessionId();
that returns a unique integer for each thread and that needs to be linked together with the library and your application.

Luigi


On Tue, Nov 4, 2014 at 7:21 PM, Grison PG Pierre (External DEXIA-US) <[hidden email]> wrote:

Hello,

Is there an easy way to deal with multi threading in QuantLib. I encounter the same problem that many people with:

Settings::instance().evaluationDate()

 

And other similar functions.

Thanks in advance for any help,

Pierre

 


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

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




--

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users