timings (was: [gomp] omp performance question)

Daniel Franke franke.daniel@gmail.com
Thu Nov 2 09:26:00 GMT 2006


2006/10/31, Tim Prince <timothyprince@sbcglobal.net>:
> If the current version runs better with
> threads paired properly on shared caches, it would tend to confirm you
> have a cache sharing problem.

Tim,

thanks for your input, but unfortunately, I seem to lack some
necessary knowledge to be able to follow you here. Nevertheless, you
got me onto the right(?) track.

Eventually I found, that my problem is too small to be effectively parallelized:

> sum(:) = 0.0
> DO l = 0, lmax
>   tmp(:) = 0.0
>   DO m = 0, l
>     tmp(:) = tmp(:) + ...
>   END DO
>   sum(:) = sum(:) + tmp(:) + ...
>  END DO

The users of the application usually specify an lmax from 10 up to 20
(aka "fast" and "slow" mode). Then there only only 55, or 210
respectively, loop iterations to do. While a parallelized version of
the former is significantely slower in terms of wall clock time than
its single threaded counterpart, the latter is about par with it. Now,
if lmax is increased to e.g. 40, i.e. 820 inner loop iterations, then
parallelization starts to "prod buttock": 29 instead of 47 minutes in
a sample run. Currently a test is run at lmax=60 -- in my eyes, an
even larger difference is  to expect.

Thinking that the original task description included the usage of MPI ...

    Daniel



More information about the Fortran mailing list