Re: Reported any bugs in C-LAPACK routine DSPEVX?

From: Andreas Krebs (krebs.andreas_at_gmx.de)
Date: 10/29/04


Date: Fri, 29 Oct 2004 12:42:33 +0200


Javier Almeida wrote:
> Thank you Andreas for your great explanation.
> It really surprised me that the steps you explain in your post are
> exactly the same I have to do to link against CLAPACK, the only
> difference being the libraries you tell the compiler to link against.
> Even the underscore you add to de name of the routine is also the same
> in CLAPACK, and of course the way you pass by reference the arguments
> is also the way to proceed in CLAPACK. I also like to embed the
> CLAPACK routines declarations in my programs instead of using the
> given .h headers (and you're right:in C++ you should embrace this
> declarations within an extern "C" {} directive)...Now it's not clear
> to me which is then the difference between linking agaisnt CLAPACK or
> using directly LAPACK, as both ways differs only in the final
> libraries you link against (¿?).

I think this is the difference. When linking to CLAPACK
you link to a library which was C-compiled
after transforming the original fortran code into C by using f2c.
Look http://www.netlib.org/clapack/faq.html ...
" 1.1) What is CLAPACK?
The CLAPACK library was built using a Fortran to C conversion utility
called f2c. The entire Fortran 77 LAPACK library is run through f2c to
obtain C code, and then modified to improve readability. CLAPACK's goal
is to provide LAPACK for someone who does not have access to a Fortran
compiler."

When linking to LAPACK you link to a library which was build by
compiling the fortran code directly. So, CLAPACK is quite useful if you
do (not have a fortran compiler or only a bad fortran compiler) and you
are eager to use only self compiled libraries.

Programming C++,
http://math.nist.gov/lapack++/
is maybe interesting when using several lapack routines. Using only a
few installation of the package seems more complicated to me than the
direct approach. I tried TNT also a few years ago, but it did not
convince me.

Regards, Andreas



Relevant Pages

  • Re: DFPORT
    ... I work on a Windows XP platform. ... We normally use F77 Fortran and for this one problematic program we ... Since we also have the Intel Fortran compiler, we also had a lot of ... Windows Fortran comper (with appropriate libraries). ...
    (comp.lang.fortran)
  • Re: Who uses clapack?
    ... instead of linking to the binaries of the Fortran ... CLAPACK because they don't realize there are other alternatives. ... CLAPACK libraries, whereas if you download the pre-built libraries from ... Something to wrap around the BLAS and LAPACK, ...
    (sci.math.num-analysis)
  • Re: can somebody verify this C program which calls dsaupd_ ? (longish)
    ... > I compiled two Fortran libs separately. ... One ARPACK and the other BLAS. ... > makefiles of each of these libraries that I used and confirm I am on the ... > with the new gcc compiler. ...
    (sci.math.num-analysis)
  • Re: Looking for gen symm sparse eigensolver in C or C++
    ... That always brings the chance of compiler and library ... Intermix conflicts are best avoided if ... Using Fortran calls in C/C++ code is trivial (I have heard good things about ... As long as you have the latest libc libraries with gcc/g77, ...
    (comp.lang.fortran)
  • Re: Looking for gen symm sparse eigensolver in C or C++
    ... That always brings the chance of compiler and library ... Intermix conflicts are best avoided if ... Using Fortran calls in C/C++ code is trivial (I have heard good things about ... As long as you have the latest libc libraries with gcc/g77, ...
    (sci.math.num-analysis)

Loading