Determine which compiler built my LAPACK

I want to install the latest version numpy(a numerical library for Python), and the version (v1.6.1) is not yet in the Ubuntu Oneiric Repository . When I started installing it manually, I read in the INSTALL file that it numpyshould be built with the same compiler that I built LAPACK(fortran lib is used numpy). Unfortunately, I do not know which compiler is. I did not install LAPACKmyself - apt-getwhen I installed the older numpy(v1.5.1) using apt. If I were to guess, I would say gfortran, but I would prefer not to spoil it.

How to find out which compiler built my current installation LAPACK? Is there any simple way - maybe running some fortran code that uses it and examines the output?

Thank!

+3
source share
2 answers

From the same file INSTALLyou are referring to ...

How to check the ABI of blas/lapack/atlas
-----------------------------------------

One relatively simple and reliable way to check for the compiler used to build
a library is to use ldd on the library. If libg2c.so is a dependency, this
means that g77 has been used. If libgfortran.so is a a dependency, gfortran has
been used. If both are dependencies, this means both have been used, which is
almost always a very bad idea.

, gfortran , fortran-, , - g77, gfortran g77- , ... , : g77 ( ) , gfortran ( ) . , numpy ... ( numpy , , , ).

+6

, , readelf -a /usr/lib/$SHARED_OBJECT , $SHARED_OBJECT - - /usr/lib/atlas-base/liblapack_atlas.so.3gf.0 ( /usr/lib, , ).

, , Ubuntu, Debian.

  • , $BINARY_PKG Lapack, dpkg -l | grep -E '(lapack|atlas) / dpkg -S $SHARED_OBJECT.
  • , $SOURCE_PKG $BINARY_PKG dpkg -s $BINARY_PACKAGE. Source:.
  • .
  • apt-get source $SOURCE_PKG. (, apt-get source $BINARY_PKG .)
  • ls Lapack.
  • Lapack.
  • debian/control, Build-Depends:. , .
  • dpkg -s build-essential, , (, build-essential).

, , , , , ; . .

+1

All Articles