octave-maintainers
[Top][All Lists]
Advanced

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

Re: Knowing which BLAS, LAPACK,... subroutine are called


From: John W. Eaton
Subject: Re: Knowing which BLAS, LAPACK,... subroutine are called
Date: Mon, 28 Jan 2013 22:33:09 -0500

On 28-Jan-2013, Jordi Gutiérrez Hermoso wrote:

| On 28 January 2013 16:29, c. <address@hidden> wrote:
| >
| > On 28 Jan 2013, at 18:03, Jordi Gutiérrez Hermoso <address@hidden> wrote:
| >
| >> In fact, I would welcome a patch to conditionally enable at compile
| >> time this debugging output [for displaying which F77 functions get
| >> called].
| >
| > Well, here's the patch.
| [snip]
| > feel free to push the changeset if you like it or ignore it if you
| > don't
| 
| I like it, except I wouldn't use a warning to display this. Perhaps
| just octave_stdout? It does have the convenience of being easier to
| turn on and off with the usual warning mechanism, though.

I'm not completely opposed to this idea, but I think it is a little
odd to target all F77 functions.  The proposed change will show more
than just calls to BLAS and LAPACK functions and will stop working if
we change Octave to use a C interface to the BLAS and LAPACK instead
of the current Fortran interface.  Also, in many cases, we call the
same routine twice (once to get the work array dimensions and once to
perform the calculation) so the output will be somewhat more verbose
than necessary.  Finally, I think it will be hard to follow exactly
what is happening for complicated expressions (you'll get a lot of
output without knowing precisely which subexpression is responsible
for each call) and you'll need to be very familiar with the BLAS and
LAPACK libraries to understand the output.  I know it would be more
work to implement, but I think it would be better to have output that
looks something like this:

  calling DSYRK ("U", "T", 10, 10, 1.0, A(10,10), 10, 0.0, c, 10)
  called from:
    foo at line 123, column 45
    bar at line 678, column 9

and to limit this to selected BLAS or LAPACK functions, not every
function call that uses the F77_XFCN macro.

If you do want to go with the simpler change, then what about calls
that use F77_FUNC directly instead of using F77_XFCN?  I think some
calls to BLAS functions use F77_FUNC instead of F77_XFCN because they
don't need to set up the setjmp/longjmp error recovery.

jwe


reply via email to

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