help-octave
[Top][All Lists]
Advanced

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

Re: Matrix multiplication benchmark - Octave vs. Matlab


From: John W. Eaton
Subject: Re: Matrix multiplication benchmark - Octave vs. Matlab
Date: Mon, 28 Jul 2003 15:18:26 -0500

On 28-Jul-2003, Mike Miller <address@hidden> wrote:

| I just want to say that I'm very pleased, impressed and surprised that
| Octave is as fast as, or even faster than, MATLAB.  Before I knew what a
| BLAS was, I made some comparisons and thought Octave performed poorly in
| comparison with MATLAB.  Of course, that was because I was using Octave
| without the BLAS.

Octave always uses soem version of the blas and lapack for matrix
operations.  By default, it is the reference implementation written in
Fortran which is quite portable but not known to be fast.  Octave can
also use ATLAS, which replaces some blas and lapack routines with
faster versions, tuned for a specific processor.

| I didn't know until today that Octave with ATLAS BLAS
| can actually outperform MATLAB.  I didn't expect to see that because
| MATLAB has a lot of money behind it and they put a lot of effort into
| optimization.

I believe that the MathWorks had their own specialized versions of
blas and linpack in earlier versions of Matlab but now they have
decided to just use ATLAS (though perhaps they are making some
proprietary modifications to it).

| Is there any way
| to find out if a compiled octave binary was really compiled against a
| BLAS?

You can try

  octave_config_info ("BLAS_LIBS")

but the info it returns may not immediately tell you whether you are
using ATLAS.  For example, on my system, it returns

  ans = /usr/lib/liblapack2.so /usr/lib/libblas2.so

so it is not clear whether ATLAS provides the blas and lapack
libraries -- it does, but you have to check elsewhere to find out for
sure:

  devzero:561> ls -l /usr/lib/liblapack2.so 
  lrwxrwxrwx    1 root     root           31 Mar  4 20:45 
/usr/lib/liblapack2.so -> /etc/alternatives/liblapack2.so
  devzero:562> ls -l /etc/alternatives/liblapack2.so
  lrwxrwxrwx    1 root     root           27 Jul 25 13:05 
/etc/alternatives/liblapack2.so -> /usr/lib/atlas/liblapack.so
  devzero:563> ls -l /usr/lib/atlas/liblapack.so
  lrwxrwxrwx    1 root     root           14 Jul 25 13:03 
/usr/lib/atlas/liblapack.so -> liblapack.so.2
  devzero:564> ls -l /usr/lib/atlas/liblapack.so.2
  lrwxrwxrwx    1 root     root           16 Jul 25 13:03 
/usr/lib/atlas/liblapack.so.2 -> liblapack.so.2.3
  devzero:565> ls -l /usr/lib/atlas/liblapack.so.2.3
  -rw-r--r--    1 root     root      4362352 Jun 20 18:43 
/usr/lib/atlas/liblapack.so.2.3

jwe



-------------------------------------------------------------
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]