Menu

#435 PDL-LinearAlgebra-0.12 undefined reference to dggsvd_ + sggsvd_

normal
closed-fixed
nobody
None
5
2022-04-14
2017-05-16
kmx
No

When building PDL-LinearAlgebra-0.12 / lapack-3.7.0 / gcc-7.1.0 / mingw-w64-v5.0.2 / perl-5.26.0-RC1 I got:

Real.o:Real.c:(.text+0x85f17): undefined reference to `dggsvd_'
Real.o:Real.c:(.text+0x870b7): undefined reference to `sggsvd_'
collect2.exe: error: ld returned 1 exit status

Discussion

  • Chris Marshall

    Chris Marshall - 2017-05-19

    It appears that these routines have been replaced by BLAS3 versions since LAPACK 3.6.0:

    1. LAPACK 3.6.0: What’s new

      [Philippe Theveny, UC Denver] BLAS3 routines for generalised SVD

    xGGSVD3 and xGGSVP3. Use Level 3 BLAS algorithm. xGGSVD3 uses xGEQP3, xGGSVP3 uses xGGSVD3. This replaces the deprecated subroutines xGGSVD and xGGSVP. xGGSVD3 was using xGEQPF, xGGSVP was using xGGSVD.

    Added:

    SRC/cggsvd3.f
    SRC/cggsvp3.f
    SRC/dggsvd3.f
    SRC/dggsvp3.f
    SRC/sggsvd3.f
    SRC/sggsvp3.f
    SRC/zggsvd3.f
    SRC/zggsvp3.f

    Modified:

    SRC/cgeqp3.f
    SRC/cggsvd.f
    SRC/cggsvp.f
    SRC/dgeqp3.f
    SRC/dggsvd.f
    SRC/dggsvp.f
    SRC/sgeqp3.f
    SRC/sggsvd.f
    SRC/sggsvp.f
    SRC/zgeqp3.f
    SRC/zggsvd.f
    SRC/zggsvp.f

     
    •  kmx

      kmx - 2017-05-19

      Is it just about replacing dggsvd_ >> dggsvd3_ and sggsvd_ >> sggsvd3_ ?

       
  • Chris Marshall

    Chris Marshall - 2017-05-22

    I guess it should be possible to add back compatibility for ggsvd and all with wrappers around ggsvd3. Unfortunately, I'm not able to help out with something quickly since I inherited the PDL::LinearAlgebra from its original author but am not an active LAPACK user.

    The simplest might be to follow the lapack lead and just add ggsvd3 bindings to PDL::LInearAlgebra and some logic to enable routines based on the underlying lapack version

     
  • Chris Marshall

    Chris Marshall - 2017-05-23

    @kmx: I think that there is an option to include the deprecated routines in your lapack library. That would give a bit more time to get the real solution in place. (It appears cygwin has 3.7.0 lapack an both the dggsvd and gddsvd3 routines). See https://bugs.archlinux.org/task/47087 where it looks like adding BUILD_DEPRECATED=ON to the CMake options should make things work.

     
    •  kmx

      kmx - 2017-05-23

      Exactly, BUILD_DEPRECATED=ON is what I need, thanks.

       
  • mohawk

    mohawk - 2022-04-14
    • status: open --> closed-fixed
     

Log in to post a comment.