comp.lang.ada
 help / color / mirror / Atom feed
From: Anatoly Chernyshev <achernyshev@gmail.com>
Subject: Multicore problem
Date: Tue, 9 Mar 2010 09:48:37 -0800 (PST)
Date: 2010-03-09T09:48:37-08:00	[thread overview]
Message-ID: <80b7542b-38d7-4da2-aa50-1c734b3c516c@q2g2000pre.googlegroups.com> (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.



             reply	other threads:[~2010-03-09 17:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09 17:48 Anatoly Chernyshev [this message]
2010-03-09 18:10 ` Multicore problem 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
replies disabled

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