comp.lang.ada
 help / color / mirror / Atom feed
* Multicore problem
@ 2010-03-09 17:48 Anatoly Chernyshev
  2010-03-09 18:10 ` Niklas Holsti
  0 siblings, 1 reply; 8+ messages in thread
From: Anatoly Chernyshev @ 2010-03-09 17:48 UTC (permalink / raw)


Hello, everyone,

Here is the following problem: large 3D array, which can be processed
in parallel. Naturally, I was trying to make use of 2 cores on my
processor by splitting the whole calculation into several parallel
tasks. Strangely, I could actually see that the program utilizes both
cores now (even not by 100% as I wished), but the computation time
increases more than 2 times when there are 2 tasks are running on 2
cores. During calculation any 2 or more tasks can occasionally modify
the same array member, for which a protected type is introduced.

Here are results of benchmarking for my 2 core system (Intel P4 Dual
Core, Win XP SP3):

1 task (50% total proc. load): 680 sec.
2 tasks (70-93% load): 1520 sec.
4 tasks (70-93% load): 1195 sec.

Any ideas on why it might happen and how to get around it?

Thank you.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-03-10 19:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2010-03-10  7:19       ` Anatoly Chernyshev
2010-03-10 18:00         ` Charmed Snark
2010-03-10 19:24         ` tmoran

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