help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave and threaded ATLAS and FFTW


From: Henry F. Mollet
Subject: Re: Octave and threaded ATLAS and FFTW
Date: Sun, 18 Jan 2004 13:50:28 -0800
User-agent: Microsoft-Entourage/10.1.1.2418

I slightly misunderstood and thought it might have something to do with
threaded vs "non-threaded?" ATLAS and therefore I thought it was appropriate
to ask about ATLAS vs. vecLib on Mac. If there is no such thing as
"non-threaded", then it just shows that I don't know much about such things.

I thought that the discrepancy between tic/toc and cputime on my system was
as expected and I actually had my process viewer on (set for every 20 sec)
at the same time when doing the test. I did nothing else during the test
except wait and use the mouse for scrolling.  I saw that octave-2.1.46 used
on average between 80-90% of CPU and about 30-40% of memory. Other process
popped up, including of course the process viewer, from time to time,
including spurious undefined and non-reproduciable processes at times.

As you suggest, a slow rand() could be part of the problem but it must also
be a case of G3 vs G4 optimization and using the wrong library for the CPU
(as per below which does not use rand()?
Henry

octave:17> tic; t1=cputime ; c=b*a; t2=cputime ; toc
ans = 65.821
octave:18> t2-t1
ans = 57.180


on 1/17/04 7:58 PM, Dmitri A. Sergatskov at address@hidden wrote:

> Henry F. Mollet wrote:
>> With a 400 Mhz Power PC G3 the two items tested take considerably longer. I
>> can understand a factor of 2000/400 = 5. Not that I need the speed, but does
>> it imply that vecLib (with BLAS and LAPACk) in Mac OS X Dev Tools is about
>> 4-10 times slower compared to  ATLAS 2.6.0?
>> Henry
>> 
>> octave:1> tic; t1=cputime ; a=rand(2000); t2=cputime ; toc
>> ans = 5.0177
>> octave:2> t2-t1
>> ans = 3.1200 % ca. 20 times longer
>> octave:3> tic; t1=cputime ; b=inv(a); t2=cputime ; toc
>> ans = 87.499
>> octave:4> t2-t1
>> ans = 72.130 % ca. 39 times longer
> 
> I was trying to make a different point. On a lightly loaded system
> the tic/toc and cputime normally give very close to each other results
> withing 0.1 second or even better. E.g. (on AthlonXP 1700MHz single cpu):
> 
> octave:7> tic; t1=cputime ; a=rand(2000); t2=cputime ; toc
> ans = 0.17543
> octave:8> t2-t1
> ans = 0.17000
> octave:9> tic; t1=cputime ; b=inv(a); t2=cputime ; toc
> ans = 9.1615
> octave:10> t2-t1
> ans = 9.1500
> octave:11> tic; t1=cputime ; c=b*a; t2=cputime ; toc
> ans = 5.9397
> octave:12> t2-t1
> ans = 5.9200
> 
> If I load a CPU (run say setiathome at nice 1) then they start to differe
> more:
> 
> octave:13> tic; t1=cputime ; a=rand(2000); t2=cputime ; toc
> ans = 0.18272
> octave:14> t2-t1
> ans = 0.17000
> octave:15> tic; t1=cputime ; b=inv(a); t2=cputime ; toc
> ans = 17.289
> octave:16> t2-t1
> ans = 9.1900
> octave:17> tic; t1=cputime ; c=b*a; t2=cputime ; toc
> ans = 11.818
> octave:18> t2-t1
> ans = 5.9700
> 
> That is well understood. What is odd is that when I recompile octave against
> thread-enabled ATLAS (and consequently had to link-in pthread library)
> the cputime numbers stopped making sense.
> 
> As far as your (Henry Mollet) data, I have two suspicions:
> Since you do not have octave-forge installed you are using slow rand()
> which came with octave proper.
> The fact that you get significant discrepancy between tic/toc and cputime()
> data suggests that you might be running some CPU intensive job on the
> background.
> 
> The number still puzzling and I am wondering if it might be the case of
> G3 vs G4 optimization and using wrong library for the CPU.
> I admit knowing next to nothing about Macs so don't shoot me if it sounds
> stupid.
> 
> Regards,
> 
> Dmitri.
> 
> p.s. I did verify with a stopwatch that tic/toc times on threaded Octave
> are correct, so for large problems one can get perhaps up to 50% speedup
> for some tasks (matrix multiplication is one of them). I will post
> some numbers soon.



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]