[concurrency-interest] Matrix multiply with parallelized inner product
tim at peierls.net
Mon Feb 4 08:56:10 EST 2008
On Feb 4, 2008 1:01 AM, Hanson Char <hanson.char at gmail.com> wrote:
> In the wiki example "Matrix multiply with parallelized inner product"
> "It is much, much slower than the version that just parallelizes the outer
> Did you know this as a fact prior to benchmarking ?
No, but I didn't expect my already fully-utilized 2 logical processors (1
physical) to be able to take much advantage of the additional granularity.
> Does this mean too much parallelism via PA would result in slower
> performance ?
A nested PA call when all the processors are busy with mostly independent
work just adds overhead.
> If so, any guideline/recipe as to what extent should one go about using
> PA without causing such slowdown (besides trial-and-error) ?
I'd think twice about nesting PA calls unless the outer call leaves you with
many processors idle. See my last comment on that page:
"The only way I could see this approach being practical is when the number
of processors greatly exceeds the number of columns in the result."
I'd use RecursiveTask/Action instead if tempted to use nested PA calls.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest