[SciPy-User] SciPy installation troubles on CentOS 6.2

Sergio Rojas sergio_r at mail.com
Sun May 27 14:10:41 EDT 2012


Magician,

 try this:
 linux> locate libtatlas.so
 the directory in which it appears and the corresponding include which contains
 atlas include headears (to find it try "locate cblas.h". In my system the include directory is at
 /usr/include/ and inside it there should be an atlas directory) are the ones you need in site.cfg

 Since I built my own atlas I have:

 [DEFAULT]
 library_dirs = /home/srojas/myPROG/LapackLib_gfortran/Atlas64b/lib
 include_dirs = /home/srojas/myPROG/LapackLib_gfortran/Atlas64b/include
 [blas_opt]
 libraries = ptf77blas, ptcblas, atlas
 [lapack_opt]
 libraries = lapack, ptf77blas, ptcblas, atlas

 to compile numpy I use:

 python setup.py build --fcompiler=gfortran

 (you need to use the same compiler used to built atlas)

 If finished sucessfully, then to verify atlas support, before installing, try:

 ldd ./build/lib.linux-x86_64-2.7/numpy/linalg/lapack_lite.so

 which should show links to the library.

 If still you have problems, maybe you need to start doing things
 from scratch, installing python and atlas in your own path.


 Sergio
----- Original Message -----
From: Magician
Sent: 05/26/12 10:05 PM
To: Ralf Gommers, sergio_r at mail.com
Subject: Re: [SciPy-User] SciPy installation troubles on CentOS 6.2

 Hi Ralf and Sergio, I thought my problems inclined to NumPy, and I posted to NumPy mailing list. But I couldn't get any answers for several days, so I'd like to ask again. I tried to build NumPy again with site.cfg, but I got these errors: > building 'numpy.core._sort' extension > compiling C sources > C compiler: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC > > compile options: '-Inumpy/core/include -Ibuild/src.linux-x86_64-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/usr/local/python-2.7.3/include/python2.7 -Ibuild/src.linux-x86_64-2.7/numpy/core/src/multiarray -Ibuild/src.linux-x86_64-2.7/numpy/core/src/umath -c' > gcc: build/src.linux-x86_64-2.7/numpy/core/src/_sortmodule.c > gcc -pthread -shared build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/numpy/core/src/_sortmodule.o -L. -Lbuild/temp.linux-x86_64-2.7 -lnpymath -lm -lpython2.7 -o build/lib.linux-x86_64-2.7/numpy/core/_sort.so > /usr/bin/ld: cannot find -lpython2.7 > collect2: ld returned 1 exit status > /usr/bin/ld: cannot find -lpython2.7 > collect2: ld returned 1 exit status > error: Command "gcc -pthread -shared build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/numpy/core/src/_sortmodule.o -L. -Lbuild/temp.linux-x86_64-2.7 -lnpymath -lm -lpython2.7 -o build/lib.linux-x86_64-2.7/numpy/core/_sort.so" failed with exit status 1 Before I built NumPy, I uncommented and modified site.cfg as below: > [DEFAULT] > library_dirs = /usr/local/python-2.7.3/lib:/usr/lib64:/usr/lib64/atlas > include_dirs = /usr/local/python-2.7.3/include:/usr/include:/usr/include/atlas > > [blas_opt] > libraries = f77blas, cblas, atlas > > [lapack_opt] > libraries = lapack, f77blas, cblas, atlas And "setup.py config" dumped these messages: > Running from numpy source directory.F2PY Version 2 > blas_opt_info: > blas_mkl_info: > libraries mkl,vml,guide not found in /usr/local/python-2.7.3/lib > libraries mkl,vml,guide not found in /usr/lib64 > libraries mkl,vml,guide not found in /usr/lib64/atlas > NOT AVAILABLE > > atlas_blas_threads_info: > Setting PTATLAS=ATLAS > libraries ptf77blas,ptcblas,atlas not found in /usr/local/python-2.7.3/lib > Setting PTATLAS=ATLAS > customize GnuFCompiler > Could not locate executable g77 > Could not locate executable f77 > customize IntelFCompiler > Could not locate executable ifort > Could not locate executable ifc > customize LaheyFCompiler > Could not locate executable lf95 > customize PGroupFCompiler > Could not locate executable pgf90 > Could not locate executable pgf77 > customize AbsoftFCompiler > Could not locate executable f90 > customize NAGFCompiler > Found executable /usr/bin/f95 > customize VastFCompiler > customize CompaqFCompiler > Could not locate executable fort > customize IntelItaniumFCompiler > Could not locate executable efort > Could not locate executable efc > customize IntelEM64TFCompiler > customize Gnu95FCompiler > Found executable /usr/bin/gfortran > customize Gnu95FCompiler > customize Gnu95FCompiler using config > compiling '_configtest.c': > > /* This file is generated from numpy/distutils/system_info.py */ > void ATL_buildinfo(void); > int main(void) { > ATL_buildinfo(); > return 0; > } > > C compiler: gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC > > compile options: '-c' > gcc: _configtest.c > gcc -pthread _configtest.o -L/usr/lib64/atlas -lptf77blas -lptcblas -latlas -o _configtest > ATLAS version 3.8.4 built by mockbuild on Wed Dec 7 18:04:21 GMT 2011: > UNAME : Linux c6b5.bsys.dev.centos.org 2.6.32-44.2.el6.x86_64 #1 SMP Wed Jul 21 12:48:32 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux > INSTFLG : -1 0 -a 1 > ARCHDEFS : -DATL_OS_Linux -DATL_ARCH_PII -DATL_CPUMHZ=2261 -DATL_SSE2 -DATL_SSE1 -DATL_USE64BITS -DATL_GAS_x8664 > F2CDEFS : -DAdd_ -DF77_INTEGER=int -DStringSunStyle > CACHEEDGE: 8388608 > F77 : gfortran, version GNU Fortran (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3) > F77FLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -g -Wa,--noexecstack -fPIC -m64 > SMC : gcc, version gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3) > SMCFLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -g -Wa,--noexecstack -fPIC -m64 > SKC : gcc, version gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3) > SKCFLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -g -Wa,--noexecstack -fPIC -m64 > success! > removing: _configtest.c _configtest.o _configtest > Setting PTATLAS=ATLAS > FOUND: > libraries = ['ptf77blas', 'ptcblas', 'atlas'] > library_dirs = ['/usr/lib64/atlas'] > language = c > define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')] > include_dirs = ['/usr/include'] > > FOUND: > libraries = ['ptf77blas', 'ptcblas', 'atlas'] > library_dirs = ['/usr/lib64/atlas'] > language = c > define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')] > include_dirs = ['/usr/include'] > > lapack_opt_info: > lapack_mkl_info: > mkl_info: > libraries mkl,vml,guide not found in /usr/local/python-2.7.3/lib > libraries mkl,vml,guide not found in /usr/lib64 > libraries mkl,vml,guide not found in /usr/lib64/atlas > NOT AVAILABLE > > NOT AVAILABLE > > atlas_threads_info: > Setting PTATLAS=ATLAS > libraries ptf77blas,ptcblas,atlas not found in /usr/local/python-2.7.3/lib > libraries lapack_atlas not found in /usr/local/python-2.7.3/lib > libraries lapack_atlas not found in /usr/lib64/atlas > numpy.distutils.system_info.atlas_threads_info > Setting PTATLAS=ATLAS > Setting PTATLAS=ATLAS > FOUND: > libraries = ['lapack', 'ptf77blas', 'ptcblas', 'atlas'] > library_dirs = ['/usr/lib64/atlas'] > language = f77 > define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')] > include_dirs = ['/usr/include'] > > FOUND: > libraries = ['lapack', 'ptf77blas', 'ptcblas', 'atlas'] > library_dirs = ['/usr/lib64/atlas'] > language = f77 > define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')] > include_dirs = ['/usr/include'] > > running config I couldn't get enough informations about numscons/bento, so I'm still trying to build it with site.cfg and CFLAGS. How could I solve it? Magician On 2012/05/21, at 1:50, Ralf Gommers wrote: > > > On Sun, May 20, 2012 at 4:16 PM, Magician <f_magician at mac.com> wrote: > Hi Ralf, > > > Thanks for your advice. > I tried to install BLAS/Lapack/ATLAS as below: > > yum install blas-devel lapack-devel atlas-devel > > Next I installed NumPy as below: > > tar xzvf numpy-1.6.1.tar.gz > > cd numpy-1.6.1 > > export CFLAGS="-L/usr/local/python-2.7.3/lib" > > Note that this overrides CFLAGS instead of appending that flag to the rest. If it doesn't work without that line, you have to either specify all cflags or use numscons/bento. > > Ralf > > > > python setup.py build > > But then I got those errors: > > building 'numpy.linalg.lapack_lite' extension > > compiling C sources > > C compiler: gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -L/usr/local/python-2.7.3/lib -fPIC > > > > creating build/temp.linux-x86_64-2.7/numpy/linalg > > compile options: '-DATLAS_INFO="\"3.8.4\"" -I/usr/include -Inumpy/core/include -Ibuild/src.linux-x86_64-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/usr/local/python-2.7.3/include/python2.7 -Ibuild/src.linux-x86_64-2.7/numpy/core/src/multiarray -Ibuild/src.linux-x86_64-2.7/numpy/core/src/umath -c' > > gcc: numpy/linalg/lapack_litemodule.c > > gcc: numpy/linalg/python_xerbla.c > > /usr/bin/gfortran -Wall -Wall -shared build/temp.linux-x86_64-2.7/numpy/linalg/lapack_litemodule.o build/temp.linux-x86_64-2.7/numpy/linalg/python_xerbla.o -L/usr/lib64/atlas -L. -Lbuild/temp.linux-x86_64-2.7 -llapack -lptf77blas -lptcblas -latlas -lpython2.7 -lgfortran -o build/lib.linux-x86_64-2.7/numpy/linalg/lapack_lite.so > > /usr/bin/ld: cannot find -lpython2.7 > > collect2: ld returned 1 exit status > > /usr/bin/ld: cannot find -lpython2.7 > > collect2: ld returned 1 exit status > > error: Command "/usr/bin/gfortran -Wall -Wall -shared build/temp.linux-x86_64-2.7/numpy/linalg/lapack_litemodule.o build/temp.linux-x86_64-2.7/numpy/linalg/python_xerbla.o -L/usr/lib64/atlas -L. -Lbuild/temp.linux-x86_64-2.7 -llapack -lptf77blas -lptcblas -latlas -lpython2.7 -lgfortran -o build/lib.linux-x86_64-2.7/numpy/linalg/lapack_lite.so" failed with exit status 1 > > If I haven't install BLAS/Lapack/ATLAS, NumPy will be > successfully built and installed. > > > Magician > > > On 2012/05/20, at 19:40, scipy-user-request at scipy.org wrote: > > > Message: 1 > > Date: Sun, 20 May 2012 10:21:12 +0200 > > From: Ralf Gommers <ralf.gommers at googlemail.com> > > Subject: Re: [SciPy-User] SciPy installation troubles on CentOS 6.2 > > To: SciPy Users List <scipy-user at scipy.org> > > Message-ID: > > <CABL7CQh+WPwpiMtO0UDKo9G01Gj38kTaWV=bSvq9eCK_qihAfQ at mail.gmail.com> > > Content-Type: text/plain; charset="iso-8859-1" > > > > On Sat, May 19, 2012 at 5:09 PM, Magician <f_magician at mac.com> wrote: > > > >> Hi All, > >> > >> > >> I'm trying to build SciPy from source code, > >> but I have some troubles. > >> > >> My environment is below: > >>> CentOS 6.2 on VMware Fusion 4.1.2 (CentOS was installed as Software > >> Development WS) > >>> Python 2.7.3 (already built from sources, installed at > >> /usr/local/python-2.7.3) > >>> NumPy 1.6.1, SciPy 0.10.1, ATLAS 3.8.4, Lapack 3.4.1 (now trying to > >> build) > >> I and my colleagues (other users) want to use recent Python, > >> so I installed Python from sources, and I can't install SciPy > >> by using yum command. > >> > >> Now I'm facing ATLAS compiling errors. > >> Configuration options are "--prefix=/usr/local/atlas-3.8.4 -Fa alg -fPIC". > >> I tried to build it for several times, and always I got errors as below: > >>> res/dgemvN_6_75 : VARIATION EXCEEDS TOLERENCE, RERUN WITH HIGHER REPS. > >>> > >>> ATL_gemvN_mm.c : 1257.99 > >>> ATL_gemvN_1x1_1.c : 581.74 > >>> ATL_gemvN_1x1_1a.c : 1589.45 > >>> ATL_gemvN_4x2_0.c : 813.13 > >>> ATL_gemvN_4x4_1.c : 755.54 > >>> make[3]: *** [res/dMVRES] Error 255 > >>> make[3]: Leaving directory > >> `/home/magician/Desktop/ATLAS/build/tune/blas/gemv' > >>> make[2]: *** > >> [/home/magician/Desktop/ATLAS/build/tune/blas/gemv/res/dMVRES] Error 2 > >>> make[2]: Leaving directory `/home/magician/Desktop/ATLAS/build/bin' > >>> ERROR 734 DURING MVTUNE!!. CHECK INSTALL_LOG/dMVTUNE.LOG FOR DETAILS. > >>> make[2]: Entering directory `/home/magician/Desktop/ATLAS/build/bin' > >>> cd /home/magician/Desktop/ATLAS/build ; make error_report > >>> make[3]: Entering directory `/home/magician/Desktop/ATLAS/build' > >>> make -f Make.top error_report > >>> make[4]: Entering directory `/home/magician/Desktop/ATLAS/build' > >>> uname -a 2>&1 >> bin/INSTALL_LOG/ERROR.LOG > >>> gcc -v 2>&1 >> bin/INSTALL_LOG/ERROR.LOG > >>> Using built-in specs. > >>> Target: x86_64-redhat-linux > >>> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man > >> --infodir=/usr/share/info --with-bugurl= > >> http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared > >> --enable-threads=posix --enable-checking=release --with-system-zlib > >> --enable-__cxa_atexit --disable-libunwind-exceptions > >> --enable-gnu-unique-object > >> --enable-languages=c,c++,objc,obj-c++,java,fortran,ada > >> --enable-java-awt=gtk --disable-dssi > >> --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre > >> --enable-libgcj-multifile --enable-java-maintainer-mode > >> --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib > >> --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 > >> --build=x86_64-redhat-linux > >>> Thread model: posix > >>> gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) > >>> gcc -V 2>&1 >> bin/INSTALL_LOG/ERROR.LOG > >>> gcc: '-V' option must have argument > >>> make[4]: [error_report] Error 1 (ignored) > >>> gcc --version 2>&1 >> bin/INSTALL_LOG/ERROR.LOG > >>> tar cf error_Corei264SSE3.tar Make.inc bin/INSTALL_LOG/* > >>> gzip --best error_Corei264SSE3.tar > >>> mv error_Corei264SSE3.tar.gz error_Corei264SSE3.tgz > >>> make[4]: Leaving directory `/home/magician/Desktop/ATLAS/build' > >>> make[3]: Leaving directory `/home/magician/Desktop/ATLAS/build' > >>> make[2]: Leaving directory `/home/magician/Desktop/ATLAS/build/bin' > >>> Error report error_<ARCH>.tgz has been created in your top-level ATLAS > >>> directory. Be sure to include this file in any help request. > >>> cat: ../../CONFIG/error.txt: No such file or directory > >>> cat: ../../CONFIG/error.txt: No such file or directory > >>> make[1]: *** [build] Error 255 > >>> make[1]: Leaving directory `/home/magician/Desktop/ATLAS/build' > >>> make: *** [build] Error 2 > >> > >> It's very troublesome for me to build ATLAS by myself. > >> My purpose is just using SciPy on my Python. > >> Even if it's optimized not so good for my environment, it's OK. > >> > >> Is there an easy or a sure way to build and install SciPy? > > > > > > Building ATLAS is much harder than building scipy, so you should try to > > find some rpm's for it, like > > http://linuxtoolkit.blogspot.com/2010/09/installing-lapack-blas-and-atlas-on.html. > > There's no problem building scipy against ATLAS from a binary install. > > > > Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20120527/9d2da59f/attachment.html>


More information about the SciPy-User mailing list