help-octave
[Top][All Lists]
Advanced

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

Re: After building Octave with ATLAS - matrix multiplication is still si


From: David Parks
Subject: Re: After building Octave with ATLAS - matrix multiplication is still single threaded
Date: Thu, 29 May 2014 13:56:45 -0700
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

In addition to my last remarks on getting Octave built with ATLAS, I ran the command:
env LD_DEBUG=libs octave
From: ~/Downloads/octave-3.8.1/src   (octave executable in the build directory)

I didn't find any references to ATLAS, rather it seems like it's loading default blas and lapack libraries (I say it seems because I'm a bit out of my technical comfort zone here).

      1148:    find library=libblas.so.3 [0]; searching
      1148:     search path=/usr/local/lib/octave/3.8.1        (RPATH from file /usr/local/bin/octave-cli-3.8.1)
      1148:      trying file=/usr/local/lib/octave/3.8.1/libblas.so.3
      1148:     search path=/usr/local/lib/octave/3.8.1        (RPATH from file /usr/local/bin/octave-cli-3.8.1)
      1148:      trying file=/usr/local/lib/octave/3.8.1/libblas.so.3
      1148:     search cache=/etc/ld.so.cache
      1148:      trying file=/usr/lib/libblas.so.3
      1148:   
      1148:    find library=liblapack.so.3 [0]; searching
      1148:     search path=/usr/local/lib/octave/3.8.1        (RPATH from file /usr/local/bin/octave-cli-3.8.1)
      1148:      trying file=/usr/local/lib/octave/3.8.1/liblapack.so.3
      1148:     search path=/usr/local/lib/octave/3.8.1        (RPATH from file /usr/local/bin/octave-cli-3.8.1)
      1148:      trying file=/usr/local/lib/octave/3.8.1/liblapack.so.3
      1148:     search cache=/etc/ld.so.cache
      1148:      trying file=/usr/lib/liblapack.so.3
...<cut>...
      1148:    find library=libblas.so.3gf [0]; searching
      1148:     search path=/usr/local/lib/octave/3.8.1        (RPATH from file /usr/local/bin/octave-cli-3.8.1)
      1148:      trying file=/usr/local/lib/octave/3.8.1/libblas.so.3gf
      1148:     search path=/usr/local/lib/octave/3.8.1        (RPATH from file /usr/local/bin/octave-cli-3.8.1)
      1148:      trying file=/usr/local/lib/octave/3.8.1/libblas.so.3gf
      1148:     search cache=/etc/ld.so.cache
      1148:     search path=/lib/x86_64-linux-gnu/tls/x86_64:/lib/x86_64-linux-gnu/tls:/lib/x86_64-linux-gnu/x86_64:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu/tls/x86_64:/usr/lib/x86_64-linux-gnu/tls:/usr/lib/x86_64-linux-gnu/x86_64:/usr/lib/x86_64-linux-gnu:/lib/tls/x86_64:/lib/tls:/lib/x86_64:/lib:/usr/lib/tls/x86_64:/usr/lib/tls:/usr/lib/x86_64:/usr/lib        (system search path)
      1148:      trying file=/lib/x86_64-linux-gnu/tls/x86_64/libblas.so.3gf
      1148:      trying file=/lib/x86_64-linux-gnu/tls/libblas.so.3gf
      1148:      trying file=/lib/x86_64-linux-gnu/x86_64/libblas.so.3gf
      1148:      trying file=/lib/x86_64-linux-gnu/libblas.so.3gf
      1148:      trying file=/usr/lib/x86_64-linux-gnu/tls/x86_64/libblas.so.3gf
      1148:      trying file=/usr/lib/x86_64-linux-gnu/tls/libblas.so.3gf
      1148:      trying file=/usr/lib/x86_64-linux-gnu/x86_64/libblas.so.3gf
      1148:      trying file=/usr/lib/x86_64-linux-gnu/libblas.so.3gf
      1148:      trying file=/lib/tls/x86_64/libblas.so.3gf
      1148:      trying file=/lib/tls/libblas.so.3gf
      1148:      trying file=/lib/x86_64/libblas.so.3gf
      1148:      trying file=/lib/libblas.so.3gf
      1148:      trying file=/usr/lib/tls/x86_64/libblas.so.3gf
      1148:      trying file=/usr/lib/tls/libblas.so.3gf
      1148:      trying file=/usr/lib/x86_64/libblas.so.3gf
      1148:      trying file=/usr/lib/libblas.so.3gf
      1148:   
      1148:    find library=liblapack.so.3gf [0]; searching
      1148:     search path=/usr/local/lib/octave/3.8.1        (RPATH from file /usr/local/bin/octave-cli-3.8.1)
      1148:      trying file=/usr/local/lib/octave/3.8.1/liblapack.so.3gf
      1148:     search path=/usr/local/lib/octave/3.8.1        (RPATH from file /usr/local/bin/octave-cli-3.8.1)
      1148:      trying file=/usr/local/lib/octave/3.8.1/liblapack.so.3gf
      1148:     search cache=/etc/ld.so.cache
      1148:     search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib        (system search path)
      1148:      trying file=/lib/x86_64-linux-gnu/liblapack.so.3gf
      1148:      trying file=/usr/lib/x86_64-linux-gnu/liblapack.so.3gf
      1148:      trying file=/lib/liblapack.so.3gf
      1148:      trying file=/usr/lib/liblapack.so.3gf
      1148:   


I might also note that in the configuration output, I only see libtatlas.so mentioned in two places:

checking for sgemm_ in /usr/local/atlas/lib/libtatlas.so... yes
checking for cheev_ in /usr/local/atlas/lib/libtatlas.so... yes
BLAS libraries:              /usr/local/atlas/lib/libtatlas.so          
LAPACK libraries:            /usr/local/atlas/lib/libtatlas.so


Not sure if that's expected behavior or not.



On 5/28/2014 7:41 PM, David Parks wrote:
Now that seems obvious in retrospect. :)  Thanks for spotting it.

However, while I fully expected this to get me to the pot of gold at the end of the rainbow, it somehow did not. I have rebuilt twice, the second time completely starting from newly unzipping octave sources. The config script now shows the expected:

...
BLAS libraries:              /usr/local/atlas/lib/libtatlas.so
...
LAPACK libraries:            /usr/local/atlas/lib/libtatlas.so
...

But when I run octave `./run-octave` (from the make directory after running `make`, no difference, my matrix multiplication operation is still only using one thread.

@louis scott - I saw your previous post on old nabble, found it on google a couple days ago, it helped me figure out that I needed to build the shared ATLAS libraries once I got my hands dirty in the config script.

So, is there a way in octave to get some indication if the compiled version took the right libraries? Or something else obvious I might have missed? I did have a standard package install of octave on the system before building it myself for the ATLAS functionality, no idea if perhaps those libraries are getting mixed in accidentally.

Here are the references to atlas I see in the make output if that's interesting:  http://pastebin.com/egfGkv6n

Thanks for the help all!
David


On 5/28/2014 11:12 AM, Dmitry Roshchin wrote:
On Wednesday 28 May 2014 11:04:20 David Parks wrote:
My goal is to have multi-threaded matrix multiplication.

1) To that end I've built ATLAS (shared libraries are good).
2) Built Octave from sorces, linking ATLAS

Octave ./configure script shows:
|...

BLAS libraries:              /usr/local/atlas/lib/libsatlas.so
...
LAPACK libraries:            /usr/local/atlas/lib/libsatlas.so
...



But this little test in Octave runs single threaded still:
It's normal:
http://math-atlas.sourceforge.net/atlas_install/node22.html

libsatlas.[so,dylib,dll]

     : This library contains all serial APIs (serial lapack, serial BLAS),
     : and all ATLAS symbols needed to support them.>
libtatlas.[so,dylib,dll]

     : This library contains all parallel APIs (parallel LAPACK and parallel
     : BLAS) and all ATLAS symbols needed to support them.
_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave




reply via email to

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