Problems switching BLAS and LAPACK versions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems switching BLAS and LAPACK versions

Tommi Höynälänmaa-2

I have problems with switching BLAS libraries with
update-alternatives. I have built my own Debian packages of BLAS where
I added some debug write commands to dnrm2.f. Then I switched the
system to use my own version of BLAS with command "update-alternatives
--config libblas.so.3". When I use liboctave Matrix::lssolve and link
my program to BLAS I see no debug outputs and apparently my own
version of dnrm2 is not called.

What is wrong here?

     - Tommi Höynälänmaa


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Problems switching BLAS and LAPACK versions

Sergei Steshenko





>________________________________
> From: Tommi Höynälänmaa <[hidden email]>
>To: [hidden email]
>Sent: Monday, December 26, 2016 1:57 PM
>Subject: Problems switching BLAS and LAPACK versions
>
>
>
>
>I have problems with switching BLAS libraries with
>update-alternatives. I have built my own Debian packages of BLAS where
>I added some debug write commands to dnrm2.f. Then I switched the
>system to use my own version of BLAS with command "update-alternatives
>--config libblas.so.3". When I use liboctave Matrix::lssolve and link
>my program to BLAS I see no debug outputs and apparently my own
>version of dnrm2 is not called.
>
>What is wrong here?
>
>     - Tommi Höynälänmaa
>
>


Check from inside Octave LD_LIBRARY_PATH and make sure there is a path in it that contains the desired
libblas.so.3 .

--Sergei.

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Problems switching BLAS and LAPACK versions

Mike Miller-4
In reply to this post by Tommi Höynälänmaa-2
On Mon, Dec 26, 2016 at 13:57:34 +0200, Tommi Höynälänmaa wrote:
> I have problems with switching BLAS libraries with
> update-alternatives. I have built my own Debian packages of BLAS where
> I added some debug write commands to dnrm2.f. Then I switched the
> system to use my own version of BLAS with command "update-alternatives
> --config libblas.so.3". When I use liboctave Matrix::lssolve and link
> my program to BLAS I see no debug outputs and apparently my own
> version of dnrm2 is not called.
>
> What is wrong here?

That may depend on how you installed Octave. Is Octave installed from
Debian archive packages or did you build it from source yourself? Is
liboctave linked against libblas or libopenblas? If you set a breakpoint
on dnrm2_ in gdb, does it reveal more about which library is being
called?

--
mike

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Fwd: Problems switching BLAS and LAPACK versions

Tommi Höynälänmaa-2

---------- Forwarded message ----------
From: Tommi Höynälänmaa <[hidden email]>
Date: 2017-01-17 17:21 GMT+02:00
Subject: Re: Problems switching BLAS and LAPACK versions
To: Mike Miller <[hidden email]>


I built liboctave debian packages myself with some minor changes. Liboctave is linked with -lblas and I have both libblas and atlas installed but libblas is active. I don't have openblas. I tried to set a breakpoint to dnrm2_ but gdb can't debug inside libblas even though I compiled it with debug information and gdb is able to load the symbol information. When I looked at the assembly code of dnrm2 it seemed that the debug write command I added to dnrm2 in blas is present.

     - Tommi

2016-12-26 19:59 GMT+02:00 Mike Miller <[hidden email]>:
On Mon, Dec 26, 2016 at 13:57:34 +0200, Tommi Höynälänmaa wrote:
> I have problems with switching BLAS libraries with
> update-alternatives. I have built my own Debian packages of BLAS where
> I added some debug write commands to dnrm2.f. Then I switched the
> system to use my own version of BLAS with command "update-alternatives
> --config libblas.so.3". When I use liboctave Matrix::lssolve and link
> my program to BLAS I see no debug outputs and apparently my own
> version of dnrm2 is not called.
>
> What is wrong here?

That may depend on how you installed Octave. Is Octave installed from
Debian archive packages or did you build it from source yourself? Is
liboctave linked against libblas or libopenblas? If you set a breakpoint
on dnrm2_ in gdb, does it reveal more about which library is being
called?

--
mike



_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Problems switching BLAS and LAPACK versions

Tommi Höynälänmaa-2


I added function dnrm2alt1 to blas and changed lapack to use that instead of dnrm2. Now "break dnrm2_" works in gdb but "break dnrm2alt1_" does not. Gdb can't find function dnrm2alt1_.

Here are outputs of some commands:

---cut here---
tohoyn@tohoyn-laptop:~/tyo/omat/aallokkeet/libinterp3d1$ update-alternatives --config libblas.so.3
There are 2 choices for the alternative libblas.so.3 (providing /usr/lib/libblas.so.3).

  Selection    Path                                    Priority   Status
------------------------------------------------------------
  0            /usr/lib/atlas-base/atlas/libblas.so.3   35        auto mode
  1            /usr/lib/atlas-base/atlas/libblas.so.3   35        manual mode
* 2            /usr/lib/libblas/libblas.so.3            10        manual mode

Press enter to keep the current choice[*], or type selection number:
tohoyn@tohoyn-laptop:~/tyo/omat/aallokkeet/libinterp3d1$
---cut here---
---cut here---
tohoyn@tohoyn-laptop:~/tyo/omat/aallokkeet/libinterp3d1$ update-alternatives --config liblapack.so.3
There are 2 choices for the alternative liblapack.so.3 (providing /usr/lib/liblapack.so.3).

  Selection    Path                                      Priority   Status
------------------------------------------------------------
* 0            /usr/lib/lapack/liblapack.so.3             10        auto mode
  1            /usr/lib/atlas-base/atlas/liblapack.so.3   5         manual mode
  2            /usr/lib/lapack/liblapack.so.3             10        manual mode

Press enter to keep the current choice[*], or type selection number:
tohoyn@tohoyn-laptop:~/tyo/omat/aallokkeet/libinterp3d1$
---cut here---
---cut here---
tohoyn@tohoyn-laptop:/usr/lib/libblas$ objdump -T libblas.so.3.0 | grep -i dnrm2
0000000000040320 g    DF .text 0000000000000011  Base        dnrm2sub_
000000000000fd50 g    DF .text 000000000000002b  Base        cblas_dnrm2
0000000000040220 g    DF .text 000000000000006b  Base        dnrm2_
0000000000040290 g    DF .text 0000000000000084  Base        dnrm2alt1_
tohoyn@tohoyn-laptop:/usr/lib/libblas$
---cut here---
---cut here---
tohoyn@tohoyn-laptop:/usr/lib/lapack$ objdump -T liblapack.so.3.0 | grep -i dnrm2
0000000000000000      DF *UND* 0000000000000000              dnrm2alt1_
tohoyn@tohoyn-laptop:/usr/lib/lapack$
---cut here---

     - Tommi Höynälänmaa



2017-01-21 9:46 GMT+02:00 Tommi Höynälänmaa <[hidden email]>:

---------- Forwarded message ----------
From: Tommi Höynälänmaa <[hidden email]>
Date: 2017-01-17 17:21 GMT+02:00
Subject: Re: Problems switching BLAS and LAPACK versions
To: Mike Miller <[hidden email]>


I built liboctave debian packages myself with some minor changes. Liboctave is linked with -lblas and I have both libblas and atlas installed but libblas is active. I don't have openblas. I tried to set a breakpoint to dnrm2_ but gdb can't debug inside libblas even though I compiled it with debug information and gdb is able to load the symbol information. When I looked at the assembly code of dnrm2 it seemed that the debug write command I added to dnrm2 in blas is present.

     - Tommi

2016-12-26 19:59 GMT+02:00 Mike Miller <[hidden email]>:
On Mon, Dec 26, 2016 at 13:57:34 +0200, Tommi Höynälänmaa wrote:
> I have problems with switching BLAS libraries with
> update-alternatives. I have built my own Debian packages of BLAS where
> I added some debug write commands to dnrm2.f. Then I switched the
> system to use my own version of BLAS with command "update-alternatives
> --config libblas.so.3". When I use liboctave Matrix::lssolve and link
> my program to BLAS I see no debug outputs and apparently my own
> version of dnrm2 is not called.
>
> What is wrong here?

That may depend on how you installed Octave. Is Octave installed from
Debian archive packages or did you build it from source yourself? Is
liboctave linked against libblas or libopenblas? If you set a breakpoint
on dnrm2_ in gdb, does it reveal more about which library is being
called?

--
mike




_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave