On Thu, 2007-10-18 at 11:18 +1000, skaller wrote: > On Wed, 2007-10-17 at 10:09 -0700, Joe Buck wrote: > > On Thu, Oct 18, 2007 at 03:00:02AM +1000, skaller wrote: > > > Hi, I have just run and timed a couple of tutorial examples for > > > openMP using gcc (GCC) 4.2.1 (Ubuntu 4.2.1-5ubuntu4) on a dual core > > > Athlon amd64, with OMP_NUM_THREADS set to 1 and 2, and occasionally > > > 8 I found that 1 thread outperforms 2 by almost 2:1 on all the examples, > > > and 8 is only fractionally slower than 2. The code was compiled > > > with just -fopenmp, no optimisation switches. OS: Linux, Ubuntu > > > gutsy (7.10) with Linux 2.26.22-14-rt (with real time patches). > > > > Try again with optimization switches. > > OK, tried with -O2.
Argg .. oops .. -O3. -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net