Parallel Computing

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Parallel Computing

Breig, Dr. Christoph (IDS GmbH)

Hi,
 
during the last days I was trying parallel computing using quantlib and boost::threads. I tried to price a large amount of bonds similar to the one-bond example bonds.cpp. One thread calculated one bond. For testing purposes I ran two threads at the same time on a two core machine. Unfortunately the two thread method did not work (the one thread method and a almost fully mutexed method worked fine). Does anybody have experience with parallel computing using QuantLib? Possibly it does not work through global parameters like settlement date?
 
Cheers!
Chris
 

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Parallel Computing

Bojan Nikolic

Hi Chris,

QuantLib is not really thread-safe. The currently successful parallel
computation installations are based on "message passing + using multiple
processes" rather than "shared memory + threads".

Best,
Bojan

--
Bojan Nikolic          ||          http://www.bnikolic.co.uk/ql

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Parallel Computing

Cedrick W. Johnson
In reply to this post by Breig, Dr. Christoph (IDS GmbH)
Just throwing perhaps a potential solution out there, don't know the feasibility of it and i'm sorely lacking in my AM coffee:

You could try to use R and the RQuantlib packages to do this across multiple cores using the 'multicore' package, or either 'SNOW' and 'foreach' packages. In a little bit i'll try to put together a quick self contained example if this may be an approach using the bonds example.

Regards,
Cedrick

On Mon, Jan 31, 2011 at 4:15 AM, Breig, Dr. Christoph (IDS GmbH) <[hidden email]> wrote:
Hi,
 
during the last days I was trying parallel computing using quantlib and boost::threads. I tried to price a large amount of bonds similar to the one-bond example bonds.cpp. One thread calculated one bond. For testing purposes I ran two threads at the same time on a two core machine. Unfortunately the two thread method did not work (the one thread method and a almost fully mutexed method worked fine). Does anybody have experience with parallel computing using QuantLib? Possibly it does not work through global parameters like settlement date?
 
Cheers!
Chris
 

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Parallel Computing

Cedrick W. Johnson
In reply to this post by Breig, Dr. Christoph (IDS GmbH)
Nevermind, I misread the original problem.. I'm not quite familiar with boost threading. My apologies.

-c

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Parallel Computing

cuchulainn
In reply to this post by Cedrick W. Johnson
Cedrick,
Have you tried parallel with OpenMP? It can be employed in an incremental fashion and is more suitable than Boost.Thread in the current context, imo.
 
Daniel Duffy


From: Cedrick Johnson [mailto:[hidden email]]
Sent: Mon 31-01-2011 13:35
To: Breig,Dr. Christoph (IDS GmbH)
Cc: [hidden email]
Subject: Re: [Quantlib-users] Parallel Computing

Just throwing perhaps a potential solution out there, don't know the feasibility of it and i'm sorely lacking in my AM coffee:

You could try to use R and the RQuantlib packages to do this across multiple cores using the 'multicore' package, or either 'SNOW' and 'foreach' packages. In a little bit i'll try to put together a quick self contained example if this may be an approach using the bonds example.

Regards,
Cedrick

On Mon, Jan 31, 2011 at 4:15 AM, Breig, Dr. Christoph (IDS GmbH) <[hidden email]> wrote:
Hi,
 
during the last days I was trying parallel computing using quantlib and boost::threads. I tried to price a large amount of bonds similar to the one-bond example bonds.cpp. One thread calculated one bond. For testing purposes I ran two threads at the same time on a two core machine. Unfortunately the two thread method did not work (the one thread method and a almost fully mutexed method worked fine). Does anybody have experience with parallel computing using QuantLib? Possibly it does not work through global parameters like settlement date?
 
Cheers!
Chris
 

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Parallel Computing

Breig, Dr. Christoph (IDS GmbH)
In reply to this post by Bojan Nikolic
Hi Bojan,

Are there examples?

Cheers
Chris

-----Urspr?ngliche Nachricht-----
Von: Bojan Nikolic [mailto:[hidden email]]
Gesendet: Montag, 31. Januar 2011 10:48
An: Breig, Dr. Christoph (IDS GmbH)
Cc: [hidden email]
Betreff: Re: [Quantlib-users] Parallel Computing


Hi Chris,

QuantLib is not really thread-safe. The currently successful parallel
computation installations are based on "message passing + using multiple
processes" rather than "shared memory + threads".

Best,
Bojan

--
Bojan Nikolic          ||          http://www.bnikolic.co.uk/ql

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users