help-octave
[Top][All Lists]
Advanced

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

Re: Problems switching BLAS and LAPACK versions


From: Tommi Höynälänmaa
Subject: Re: Problems switching BLAS and LAPACK versions
Date: Mon, 13 Mar 2017 18:17:30 +0200


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---
address@hidden:~/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:
address@hidden:~/tyo/omat/aallokkeet/libinterp3d1$
---cut here---
---cut here---
address@hidden:~/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:
address@hidden:~/tyo/omat/aallokkeet/libinterp3d1$
---cut here---
---cut here---
address@hidden:/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_
address@hidden:/usr/lib/libblas$
---cut here---
---cut here---
address@hidden:/usr/lib/lapack$ objdump -T liblapack.so.3.0 | grep -i dnrm2
0000000000000000      DF *UND* 0000000000000000              dnrm2alt1_
address@hidden:/usr/lib/lapack$
---cut here---

     - Tommi Höynälänmaa



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

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


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 <address@hidden>:
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




reply via email to

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