Correct way to point to ATLAS/BLAS/LAPACK libraries for numpy build?

送分小仙女□ 提交于 2019-12-04 06:28:02

Ok this was pretty simple and essentially follows the install guidelines exactly. I suppose this is more of a question on the numberings after shared libs than about numpy or atlas. Anyway, I just had to create some symlinks:

ln -s /usr/lib64/atlas/___.so.3.0 $HOME/local/lib/___.so

Then removed all configs in the site.cfg and updated my .bashrc:

export ATLAS=$HOME/local/lib/libatlas.so
export BLAS=$HOME/local/lib/libptf77blas.so
export LAPACK=$HOME/local/lib/liblapack.so

After running python setup.py install, I'm good:

>>> import numpy.distutils.system_info as si
>>> si.get_info('atlas')
    ATLAS version 3.8.4 built by mockbuild on Wed Mar 21 01:43:44 GMT 2012:
   UNAME    : Linux c6b6.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: 163840
   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
{'libraries': ['lapack', 'f77blas', 'cblas', 'atlas'], 'library_dirs': ['~/local/lib'], 'define_macros': [('ATLAS_INFO', '"\\"3.8.4\\""')], 'language': 'f77'}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!