Re: numerically intensive app doesn't benifit from multi threading



It's definitely not dual core, since the recent dual core Dell machine my
company purchased has the dual core logo on it. This one doesn't have the
dual core logo. And it's about 1 year old, and I think that dual core came
later than that.

If it indeed has 2 CPU (not the hyperthreading 1 CPU), I guess that it
should have 2 separate CPU inside the machine, so opening up and look inside
should help. Right?

Thanks.

"m" wrote:

Based on this info i would guess yes. (you can go to the intel website to
verify this, but most chips ~ 3.0 GHz would not be dual core)

Assuming that you have a HT CPU, then the lack of speed improvment is only
to be expected since there are two logical CPUs but only 1 set of
computation resources physically in the silicocn.

"JC" <JC@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1E3D3A27-835B-44EB-B9D1-94175C126F00@xxxxxxxxxxxxxxxx
Please also note that there is no hyper threading related logo on the PC.

"JC" wrote:

Here is the info from Dell:
PROCESSOR, 80547, PENTIUM 4 PRESCOTT DT, Pentium 4 Prescott DT, 3.0GHZ, 1
MEGB, 800FSB, SOCKET T, E0, MALE

Can you tell if it's hyberthreading?
Thx.

"JC" wrote:

How can you tell?

"m" wrote:

Are your 2 CPUs a singe hyperthreaded CPU?

"JC" <JC@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0E9C29A6-F054-4E39-98E3-2FB506F27827@xxxxxxxxxxxxxxxx
This may be related to my another post in this group here "program
runs
almost twice as slow on 2 CPU machine when 1 CPU is used".

When I run single thread version of the program on 2 CPU
concurently, it's
almost twice as slow as when I run one instance only. When I run
multi
thread version of the program with 2 thread on 2 CPU, it's same as
running
single thread on 1 CPU.

"JC" wrote:

I have an numerically intensive app where there is a large loop.
I want
to
use multithreading to parallelize the loop. Say we have two
threads, the
1st
one will do 1st half the loop, the 2nd thread will do the other
half.
The
multithreaded loop look like:
for (i = indexBeginForThread; i < indexEndForThread; i++) {
do_numerical_stuff;
update_common_data;
}

The 1st part 'do_numerical_stuff', taking most of the time, and
requires
no
mutex to synchronize access to data. The 2nd part
'update_common_data'
takes
little time, and requires mutex to synchronize access to data.
You would
expect such a program will have a speed up of 40-50% when running
on 2
CPU.
But there is no speend up at all.

I am not sure what is causing no speed up at all.

I inserted 'clock()' function to time the time spend on
'do_numerical_stuff'
and 'update_common_data' in both threads. (I am not sure whether
this
works
as I don't know whether clock() is multithread safe). I found
that in
both
thead, the total time spent on 'do_numerical_stuff' is the same as
when
the
program is run in single thread mode. The total time spent on
'update_common_data' is tiny. So there shouldn't be a problem of
waiting
on
the mutex when doing 'update_common_data'.

Theoretically ''do_numerical_stuff' in both thread should use half
the
time
as in single thread mode.

The whole loop takes 2 seconds in a test run, and it should
benifit from
multi-threading.

Any insights?

Thanks a lot.






.



Relevant Pages

  • Re: shit fuck and bollocks! windows xp 64bit
    ... thingy ect ect can't be arsed to go into it's silly high spec but ... but I'm pretty sure that's not the same thing as dual core processors. ... You see 4 on a opteron dual cpu board. ... and stuck a pair of gforce 7800 SLI cards in. ...
    (uk.rec.cars.modifications)
  • Re: Utilizing Duo-Core Processors
    ... manager shows it to be running at 50% of the CPU. ... have a single thread running full out on a dual core system. ... so a single thread will never have more than 50% CPU usage ...     ProcessTask; ...
    (microsoft.public.vc.mfc)
  • Re: Utilizing Duo-Core Processors
    ... manager shows it to be running at 50% of the CPU. ... have a single thread running full out on a dual core system. ... so a single thread will never have more than 50% CPU usage ...
    (microsoft.public.vc.mfc)
  • Re: Anyone using Dual Core Dual CPU boards?
    ... We've got hundreds of server, some branded, some unbranded, and they all have the same level of reliability, it's more about the parts than the vendor, if you pick quality parts then the vendor doesn't factor into it. ... I thought I was specific, I want to know about real experiences from actual users/owners with Dual Core Dual CPU boards - I'm looking for a Dual CPU Dual Core board for a new server, but I want to know what issues/things people like about the board they are using so that I can review them also. ...
    (comp.sys.intel)
  • Re: SMP or not? Athlon 64 bit processor
    ... disadvantages to running an SMP kernel? ... over a fast single CPU. ... faster single core and buying more RAM instead? ... Does the dual core actually look like two CPUs to the system or is the ...
    (alt.os.linux.suse)

Loading