|
Dear all,
Is there a way to know which BLAS, LAPACK,... subroutines are called when we invoke matrices operations (factorization, addition, multiplication, ...)? Regards, Aurélie Hurault _______________________________________________ Help-octave mailing list [hidden email] https://mailman.cae.wisc.edu/listinfo/help-octave |
|
On 28 January 2013 11:18, Aurélie Hurault <[hidden email]> wrote:
> Is there a way to know which BLAS, LAPACK,... subroutines are called when we > invoke matrices operations (factorization, addition, multiplication, ...)? I suppose if you're asking, that's because you found it too difficult to read Octave's source code. If so, are you able to run Octave in a debugger? The Fortran calls are wrapped with FORTRAN_F77 CPP macros. You could grep the source code for these macros. Most of the interesting bits should be in liboctave. If you can edit the source code and rebuild Octave, you could even edit this macro to make it print to screen when it's using a Fortran call. In fact, I would welcome a patch to conditionally enable at compile time this debugging output. If you have a specific question about which specific operations use which BLAS routines, I may be able to respond directly. - Jordi G. H. _______________________________________________ Help-octave mailing list [hidden email] https://mailman.cae.wisc.edu/listinfo/help-octave |
|
On 28 Jan 2013, at 18:03, Jordi Gutiérrez Hermoso <[hidden email]> wrote: > In fact, I would welcome a patch to conditionally enable at > compile time this debugging output. Well, here's the patch. It defines the configure option --enable-warn-f77-name every time a fortran77 function is invoked, issue a warning with the function name. You probably do NOT want to enable this feature. if this option is given when configuring Octave a warning with id "Octave:f77-name" is issued for every invocation of a F77 function: >> randn (3) \ ones (3) warning: invoking Fortran subroutine DGETRF warning: invoking Fortran subroutine DGECON warning: invoking Fortran subroutine DGETRS ans = -0.44214 -0.44214 -0.44214 -2.55030 -2.55030 -2.55030 0.84029 0.84029 0.84029 >> The warning can be turned off to disble the debug messages: >> warning ("off", "Octave:f77-name") >> randn (3) \ ones (3) ans = -1.87018 -1.87018 -1.87018 0.75506 0.75506 0.75506 1.05525 1.05525 1.05525 >> warning ("on", "Octave:f77-name") >> randn (3) \ ones (3) warning: invoking Fortran subroutine DGETRF warning: invoking Fortran subroutine DGECON warning: invoking Fortran subroutine DGETRS ans = -0.44214 -0.44214 -0.44214 -2.55030 -2.55030 -2.55030 0.84029 0.84029 0.84029 >> and it can be turned on again to get the verbose output again: >> warning ("on", "Octave:f77-name") >> randn (3) \ ones (3) warning: invoking Fortran subroutine DGETRF warning: invoking Fortran subroutine DGECON warning: invoking Fortran subroutine DGETRS ans = 2.7468 2.7468 2.7468 -2.5054 -2.5054 -2.5054 3.2681 3.2681 3.2681 feel free to push the changeset if you like it or ignore it if you don't … c. _______________________________________________ Help-octave mailing list [hidden email] https://mailman.cae.wisc.edu/listinfo/help-octave |
| Powered by Nabble | Edit this page |
