help-octave
[Top][All Lists]
Advanced

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

Re: Octave and Matlab and threads


From: David Bateman
Subject: Re: Octave and Matlab and threads
Date: Fri, 19 Oct 2007 12:15:51 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

Michael Creel wrote:
> On the parallelknoppix forum, some test results were posted
> (http://www.nabble.com/Report%3A-Octave-vs-MatlabR2007b-tf4650668.html#a13290049
> <http://www.nabble.com/Report%3A-Octave-vs-MatlabR2007b-tf4650668.html#a13290049>),
> with Octave coming in second. Previously I've seen this sort of thing
> due to Matlab's JIT compiler, but these results are apparently due to
> use of multithreading in newer Matlab versions. Any comments?
> M.
>
> -- 
> There are 10 kinds of people - those who understand binary and those
> who don't.

As the test is basically a call to the LAPACK xGEMM function, any speed
improvements are in the LAPACK that is linked to. I don't have 2007b,
but reading the blas.spec from 2007a I see that the Intel MKL and in the
release notes for 2007b it is the AMCL library of the AMDs that is used.
I presume that it is these libraries that support multi-threading directly.


Looking at the Atlas 3.8.0 FAQ I see


      Is ATLAS thread safe?

It should be completely safe to call any ATLAS routine from a threaded
code. There are no global variables, or other shared information between
routines. Probably the best idea is to say "yes" to threading in config,
even if you wish to do the threading yourself. That way, the ATLAS lib
will be compiled with the threading flags. Then, simply link to the
serial interface so that ATLAS doesn't do the threading. If you want
ATLAS to do the threading as well, simply link to the threaded interface.


      Can I vary the number of threads ATLAS uses dynamically?

No. The maximum number of threads to use is determined at compile time.
ATLAS will never use more than this, but may use less if the problem
sizes are too small to get speedup from the additional parallelism.


So it seems to me that ATLAS 3.8.0 supports multi-threads directly. Its
not clear how to use this, but its probably just a matter of linking to
the appropriate version of atlas.. So very shortly I expect Octave to be
able to profit from this as well..

D.

-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

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