Login  Register

Re: OpenMP - current usage in ql

Posted by japari on Jun 16, 2014; 7:23am
URL: http://quantlib.414.s1.nabble.com/OpenMP-current-usage-in-ql-tp15458p15469.html


Hello
 
> The problem is that the big speedups are for things like monte carlo,
> which are "Riduculously parallel." The trouble with MC is that once
> you parallelize, the random number generator gives you different
> answers, and it becomes impossible to test and also you have the
> possibility of very subtle bugs with the RNG coorrelations across
> different processors. Trying to get quantlib to have consistent
> RNG's in multi-core MC turns out to be a non-trivial project.
>

I have done this with threads and its not that difficult to avoid those problems. But most (if not all) of the generators in the library are not suitable for it. Not the version of the Mersenne Twister or the distribution generators since most are rejection algorithms. I do get exactly the same result figures with one or N threads. Sobol is ok but is limited for distribution mapping; what I do is to wrap an interface around TINA's MT generator. But you need to link against that. The speed up is practically linear with CPU number at least in the context of the problem I use it for.



> Alternatively, the algos that are being used for PDE's in quantlib
> particularly ones relating to tridiagonal matrix operations turn out
> to be terrible for parallel computing. There could be some better
> speedups for PDE's with different algos that are better for parallel
> systems. Also if you want to parallelizes, you want to use an
> explicit PDE scheme rather than an implicit one.
>
> The two projects that I can think of are:
>
> 1) getting MC working for openmp or
> 2) putting in better parallel algos for PDE's.
>

Back in the tokamak dark ages people use to parallelize implicit PDE solvers by breaking the domain and solving those pieces concurrently (rather than working on parallelizing the algebraic solver); all the subtlery was in sticking them together on each time step. That was a long time ago and cant remember the details.

Best






------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev