Re: LAPACK library usage in fortran 90



kiwanuka <robert.kiwanuka@xxxxxxxxx> wrote:

On Oct 24, 1:45 pm, jwm <jwmwal...@xxxxxxxxx> wrote:

It seems that your DGESVD subroutine has an extra argument. Try adding
the following interface block to your code (maybe before the second
include statement):

INTERFACE
SUBROUTINE DGESVD(JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,
WORK, LWORK, INFO )
INTEGER, PARAMETER :: WP = KIND(1.0D0)
CHARACTER(LEN=1), INTENT(IN) :: JOBU, JOBVT
INTEGER, INTENT(IN) :: M, N, LDA, LDU, LDVT, LWORK
INTEGER, INTENT(OUT) :: INFO
REAL(WP), INTENT(OUT) :: S(*)
REAL(WP), INTENT(INOUT) :: A(LDA,*)
REAL(WP), INTENT(OUT) :: U(LDU,*), VT(LDVT,*), WORK(*)
END SUBROUTINE DGESVD
END INTERFACE

Thank you very much! The interface is what was needed! It also forced
other problems to be exposed during compilation.

I doubt that it was "needed". There is nothing in the code that requires
an explicit interface, so it should work the same with or without this.

I can well believe that this could help find the problems (such as the
extra argument that jwm mentioned). But the lack of this should not in
itself be a problem.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
.



Relevant Pages

  • Re: LAPACK library usage in fortran 90
    ... WORK, LWORK, INFO) ... END SUBROUTINE DGESVD ... other problems to be exposed during compilation. ... an explicit interface, so it should work the same with or without this. ...
    (comp.lang.fortran)
  • Re: LAPACK library usage in fortran 90
    ... WORK, LWORK, INFO) ... END SUBROUTINE DGESVD ... other problems to be exposed during compilation. ... an explicit interface, so it should work the same with or without this. ...
    (comp.lang.fortran)
  • Re: interface blocks
    ... > interface block at least makes sense, ... hold the prototype for all subroutines. ... Interface bodies can ...
    (comp.lang.fortran)
  • Re: Fortran C++ interop. question
    ... calls the C++ functions I have the interface block ... Consequently all arguments in the interface blocks in the Fortran must be declared to have the VALUE attribute. ... If that were the case it would be a compiler bug - each procedure definition in each interface block has its own scope. ... Future standard revisions could place lots of additional things in ISO_C_BINDING. ...
    (comp.lang.fortran)
  • Re: Scope of implicit none
    ... That seems to indicate that the IMPLICIT NONE statement is ... statement make itself felt inside an interface block. ... that maybe the f90 interp wasn't such a good idea ...
    (comp.lang.fortran)