[parsec-users] multithread vs single thread

Mahmood Naderan nt_mahmood at yahoo.com
Tue Apr 19 13:46:58 EDT 2011


What I understand from your response is that the difference between the 
execution time (elapsed cycles) is dependent on cache hit raio and compiler 
optimization. Although they are not only the factors but I will discuss on them.

The system I ran both single thread and 4 threads are exactly the same except in 
the number of processors.
Also I ran the precompiled sparc binaries provided by the developers.

./blackscholes 1 in_64K.txt prices.txt
./blackscholes 4 in_64K.txt prices.txt

Sorry I forgot to attach the log. You can find the logs now.
I will be glad if someone test this example to see the results.

> (excepting for those controlling threading).
What are they?

// Naderan *Mahmood;



----- Original Message ----
From: Jim Dempsey <jim at quickthreadprogramming.com>
To: PARSEC Users <parsec-users at lists.cs.princeton.edu>
Sent: Tue, April 19, 2011 8:42:20 PM
Subject: Re: [parsec-users] multithread vs single thread

Elapse time, and potentially cycles, can be diminished by higher L1 and L2
cache hit ratios. If the single thread version has lower cache hit ratios
then the counts will be higher. Also check to see if your optimizations
switches are the same (excepting for those controlling threading).

Jim 

-----Original Message-----
From: parsec-users-bounces at lists.cs.princeton.edu
[mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of Mahmood
Naderan
Sent: Tuesday, April 19, 2011 10:28 AM
To: PARSEC Users
Subject: Re: [parsec-users] multithread vs single thread

>Perhaps the 7.5B cycles includes the cycles outside the ROI (region of 
>interest).
 
No. Please find the attached log.

What I want to know is: How the program elapsed cycles changes when the
number of threads are increased?
I mean, Do we expect a reduction in cycles count? What I observed, is that
with a given input size (64k in blackscholes), running the benchmark with 4
threads has a less cycle counts (850M total cycles) compare to single thread
(7.5B cycles).

How one can exaplain that reduction?
Thanks,
// Naderan *Mahmood;



----- Original Message ----
From: Jim Dempsey <jim at quickthreadprogramming.com>
To: PARSEC Users <parsec-users at lists.cs.princeton.edu>
Sent: Tue, April 19, 2011 6:59:17 PM
Subject: Re: [parsec-users] multithread vs single thread

Perhaps the 7.5B cycles includes the cycles outside the ROI (region of
interest).

Try using RDTSC to be called from each thread to read the simulated clock
counter. Place this at the start and end of the do work function that all
threads pass through. Each thread can compute there own number of clock
ticks, then issue an interlocked add to produce a summation. This will give
you the simulated clock ticks but not the instruction counts. If you want
the instruction counts, then you will have to use the performance counters
via RDPMC (you will have to do some googling to find an example).

SIMICS may have C function call that you can insert into your code that
controls collection of counter data. If it does, then this may be the way
for you to go.

Jim Dempsey

-----Original Message-----
From: parsec-users-bounces at lists.cs.princeton.edu
[mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of Mahmood
Naderan
Sent: Tuesday, April 19, 2011 12:49 AM
To: PARSEC
Subject: [parsec-users] multithread vs single thread

Hi,
When I run blackscholes with one thread the total cycles reported by simics
are about 7.5B cycles. However when I run it with 4 threads, each core runs
for 850M cycles (totally 3.3B cycles). Is that normal? Does this
multithreading represents parallel execution?

thanks, 

// Naderan *Mahmood;

_______________________________________________
parsec-users mailing list
parsec-users at lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/parsec-users

_______________________________________________
parsec-users mailing list
parsec-users at lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/parsec-users

_______________________________________________
parsec-users mailing list
parsec-users at lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/parsec-users

_______________________________________________
parsec-users mailing list
parsec-users at lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/parsec-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log.zip
Type: application/x-zip-compressed
Size: 1376 bytes
Desc: not available
URL: <http://lists.cs.princeton.edu/pipermail/parsec-users/attachments/20110419/040605f7/attachment.zip>


More information about the parsec-users mailing list