[Omp] Could you help me about this problem?
Ruud van der Pas
Ruud.Vanderpas at Sun.COM
Wed Jan 3 23:12:56 PST 2007
Hi David,
> We used the OpenMP to parallel a subroutine(only a loop) of a program
> recently. When I set different thread number, the time they took is just
> like the below:
>
> 1 thread: 20s
>
> 2 threads: 11s
>
> 3 threads: 10s
>
> 4 threads: 7s
>
> 5 threads: 11s
>
> 6 threads: 19s
>
> 8 threads: 23s
>
> The machine we used is a smp node(dual core) of a cluster. What I
> can't understand is that why the time between 2 threads and 3 threads is
> so small?
I'm afraid we need more information to say something sensible
about this, so I'm going to ask some questions first.
- I assume the above timings are the _elapsed_ time for the
application (or just the subroutine), not the CPU time? In
other words, how did you get these numbers?
- Was your job the only one running, or could there have been
interference from other jobs?
- Can you reproduce it? That is, if you run the same experiments
again, do you get comparable timings?
- To me, the surprising number is the one on 4 threads. If I
understand it correctly, you only have 2 cores to run your
program on. Based on that, it seems you get good scalability
(but keep my previous question in mind) going from 1 to 2
threads. I would expect the 4 thread number to be in the ~10s
range (at best) though, not 7s
Kind regards,
Ruud
----------------------------------------------------------------
Senior Staff Engineer Email: ruud.vanderpas at sun.com
Systems Group Phone: +31-33-4515000 (x15920)
Sun Microsystems Fax : +31-33-4515001
----------------------------------------------------------------
More information about the Omp
mailing list