Posted by
Luigi Ballabio on
Jun 15, 2014; 2:35pm
URL: http://quantlib.414.s1.nabble.com/OpenMP-current-usage-in-ql-tp15458p15463.html
Yes, the timing might be off. I suspect that the Boost timer is
reporting the total CPU time, that is, the sum of the actual time per
each CPU. On my box, if I run the BermudanSwaption example with OpenMP
enabled, it outputs:
Run completed in 2 m 35 s
but if I call it through "time", I get an output like:
real 1m19.767s
user 2m34.183s
sys 0m0.538s
that is, total CPU time 2m34s, but real time 1m19s. Being the
untrusting individual that I am, I also timed it with a stopwatch. The
elapsed time is actually 1m19s :)
This said, I still see a little slowdown in the test cases Peter
listed. My times are:
AmericanOptionTest: disabled 2.4s, enabled 3.4s (real time)
AsianOptionTest: disabled 10.6s, enabled 10.4s
BarrierOptionTest: disabled 4.9s, enabled 6.1s
DividendOptionTest: disabled 5.1s, enabled 6.5s
FdHestonTest: disabled 73.4s, enabled 76.8s
FdmLinearOpTest: disabled 11.4s, enabled 11.6s
Not much, but a bit slower anyway. I've only got 2 CPUs though (and I
compiled with -O2). Peter, what do you get on your 8 CPUs if you run
the cases via "time"?
Luigi
On Sun, Jun 15, 2014 at 3:40 PM, Joseph Wang <
[hidden email]> wrote:
>
> That's quite odd since OpenMP should not be causing such huge slowdowns.
>
> Since by default the items are not complied, I'd rather keep the pragma's
> there.
>
> Also is there any possibilities that the timing code is off?
>
> ------------------------------------------------------------------------------
> 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>
--
<
https://implementingquantlib.blogspot.com>
<
https://twitter.com/lballabio>
------------------------------------------------------------------------------
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