comp.lang.ada
 help / color / mirror / Atom feed
From: jonathan <johnscpg@googlemail.com>
Subject: Re: Multicore problem
Date: Tue, 9 Mar 2010 16:08:26 -0800 (PST)
Date: 2010-03-09T16:08:26-08:00	[thread overview]
Message-ID: <aab096c5-73f8-44cd-bb15-54b2947133de@b30g2000yqd.googlegroups.com> (raw)
In-Reply-To: 71a2ea77-f97d-4e48-ba82-8322974f5c2b@s36g2000prh.googlegroups.com

On Mar 9, 6:48 pm, Anatoly Chernyshev <achernys...@gmail.com> wrote:
> > Perhaps the two tasks/cores are competing for data-cache space, and
> > causing more cache misses than if a single task/core is active?
>
> > How large is your 3D array, compared to the cache?
>
> Right now it is small, 23 Mb, for the purposes of algorithm honing.
> 2Mb L2 cache. In perspective the array could be 4-8 Gb (not for my
> current machine, of course).
>
> > If this is the problem, you could try to divide the whole problem into
> > slices so that each slice processes a part of the 3D array that *can*
> > fit in the cache, but can also be processed in parallel by two
> > tasks/cores. Not knowing what your processing actually does I can't say
> > more about how to slice the problem.
>
> Each task begins in the cell of its designated area of array, and then
> does a Markov walk all around the place using the cell pointers.

Of course I can't say much about your specific problem.  I can tell
you
(the little) I learned battling something similar (using linux and
GNAT).  The problem I was up against was latency: minimum time to send
data, no matter how small the data, between 2 cores on the same
processor.
I measured this time as about 40 microseconds, (exchange of data
between
cores). Might have been 20 or 60, but think 10's of microseconds.
If message passing (or sharing data in an array) is more frequent
than this, you'll never see a speed up on the several cores.
(Some expensive networks advertise
latencies of a few microseconds, and some experimental operating
systems advertise sub-microsecond latencies.) So you should not
think of passing data more frequently than say every 200 or 400
microseconds if you want to see speedup.  Which is a long
time .. you can do 10's of thousands of floating point
operations in that time!

Jonathan



  parent reply	other threads:[~2010-03-10  0:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09 17:48 Multicore problem Anatoly Chernyshev
2010-03-09 18:10 ` Niklas Holsti
2010-03-09 18:48   ` Anatoly Chernyshev
2010-03-09 22:37     ` KarlNyberg
2010-03-10  0:08     ` jonathan [this message]
2010-03-10  7:19       ` Anatoly Chernyshev
2010-03-10 18:00         ` Charmed Snark
2010-03-10 19:24         ` tmoran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox