Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6956 Discussions

Numpy: LAPACK and BLAS libraries not found

Hilder_Pereira
Beginner
4,597 Views
Hello!

I have installed the MKL 10.3.7.256 (64 bits) on my Linux Slackware and now, I want to install the numpy and scipy packages.

But, when I try to make this, the LAPACK and the BLAS libraries are not found.

I'm trying to install the numpy following this Numpy User Note (http://software.intel.com/en-us/articles/numpy-user-note/)

I received these warnings when I try to compile:

"Running from numpy source directory./root/python/numpy-1.6.1/numpy/distutils/system_info.py:1414: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
/root/python/numpy-1.6.1/numpy/distutils/system_info.py:1423: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
warnings.warn(BlasNotFoundError.__doc__)
/root/python/numpy-1.6.1/numpy/distutils/system_info.py:1426: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
warnings.warn(BlasSrcNotFoundError.__doc__)
/root/python/numpy-1.6.1/numpy/distutils/system_info.py:1330: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
/root/python/numpy-1.6.1/numpy/distutils/system_info.py:1341: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
warnings.warn(LapackNotFoundError.__doc__)
/root/python/numpy-1.6.1/numpy/distutils/system_info.py:1344: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
warnings.warn(LapackSrcNotFoundError.__doc__)
/root/python/numpy-1.6.1/numpy/distutils/command/config.py:40: DeprecationWarning:
+++++++++++++++++++++++++++++++++++++++++++++++++
Usage of try_run is deprecated: please do not
use it anymore, and avoid configuration checks
involving running executable on the target machine.
+++++++++++++++++++++++++++++++++++++++++++++++++

DeprecationWarning)

"

and these messages:

"F2PY Version 2
blas_opt_info:
blas_mkl_info:
libraries mkl_intel_lp64,mkl_intel_thread,lmkl_core not found in /opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/
NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib64
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
libraries ptf77blas,ptcblas,atlas not found in /usr/lib64
libraries ptf77blas,ptcblas,atlas not found in /usr/lib
NOT AVAILABLE

atlas_blas_info:
libraries f77blas,cblas,atlas not found in /usr/local/lib64
libraries f77blas,cblas,atlas not found in /usr/local/lib
libraries f77blas,cblas,atlas not found in /usr/lib64
libraries f77blas,cblas,atlas not found in /usr/lib
NOT AVAILABLE

blas_info:
libraries blas not found in /usr/local/lib64
libraries blas not found in /usr/local/lib
libraries blas not found in /usr/lib64
libraries blas not found in /usr/lib
NOT AVAILABLE

blas_src_info:
NOT AVAILABLE

NOT AVAILABLE

lapack_opt_info:
lapack_mkl_info:
mkl_info:
libraries mkl_intel_lp64,mkl_intel_thread,lmkl_core not found in /opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/
NOT AVAILABLE

NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib64
libraries lapack_atlas not found in /usr/local/lib64
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
libraries lapack_atlas not found in /usr/local/lib
libraries ptf77blas,ptcblas,atlas not found in /usr/lib64
libraries lapack_atlas not found in /usr/lib64
libraries ptf77blas,ptcblas,atlas not found in /usr/lib
libraries lapack_atlas not found in /usr/lib
numpy.distutils.system_info.atlas_threads_info
NOT AVAILABLE

atlas_info:
libraries f77blas,cblas,atlas not found in /usr/local/lib64
libraries lapack_atlas not found in /usr/local/lib64
libraries f77blas,cblas,atlas not found in /usr/local/lib
libraries lapack_atlas not found in /usr/local/lib
libraries f77blas,cblas,atlas not found in /usr/lib64
libraries lapack_atlas not found in /usr/lib64
libraries f77blas,cblas,atlas not found in /usr/lib
libraries lapack_atlas not found in /usr/lib
numpy.distutils.system_info.atlas_info
NOT AVAILABLE

lapack_info:
libraries lapack not found in /usr/local/lib64
libraries lapack not found in /usr/local/lib
libraries lapack not found in /usr/lib64
libraries lapack not found in /usr/lib
NOT AVAILABLE

lapack_src_info:
NOT AVAILABLE

NOT AVAILABLE

"


And I don't know why the compiler are searching the libs in the /usr directory.

Somebody could help, please?

Thanks
0 Kudos
13 Replies
mecej4
Honored Contributor III
4,597 Views
You are trying to build a package with substitutions (MKL) for some packages (Atlas, Lapack, BLAS). The default build (makefile, configure, etc.) knows nothing about your intentions, and will not work without your making suitable changes.

Look for places in the Makefile where you can specify alternative names and locations for libraries, and see if you can make changes there to make the package work with MKL.
0 Kudos
TimP
Honored Contributor III
4,597 Views
The diagnostics quoted above do indicate that the default location for the MKL libraries was searched, but possibly not for the correct library names. Either the link advisor tool or ls will show you the exact names, and verify whether you may have changed the install path.
0 Kudos
Hilder_Pereira
Beginner
4,597 Views
Mecej4,

I think the locations where the compiler will search the libs is specified by the file site.cfg
and my file have:
"[mkl]
library_dirs = /opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/
include_dirs = /opt/intel/composer_xe_2011_sp1.7.256/mkl/include/
mkl_libs = mkl_intel_lp64,mkl_intel_thread,lmkl_core
lapack_libs = mkl_lapack_ilp64
"
like I saw in the Numpy User Note (http://software.intel.com/en-us/articles/numpy-user-note/ end of page).
Am I wrong?
Thanks
0 Kudos
Hilder_Pereira
Beginner
4,597 Views
When I list the directory I have:
"
$ ls /opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/
libmkl_avx.so* libmkl_intel_sp2dp.so*
libmkl_blacs_ilp64.a libmkl_intel_thread.a
libmkl_blacs_intelmpi_ilp64.a libmkl_intel_thread.so*
libmkl_blacs_intelmpi_ilp64.so* libmkl_lapack95_ilp64.a
libmkl_blacs_intelmpi_lp64.a libmkl_lapack95_lp64.a
libmkl_blacs_intelmpi_lp64.so* libmkl_mc.so*
libmkl_blacs_lp64.a libmkl_mc3.so*
libmkl_blacs_openmpi_ilp64.a libmkl_p4n.so*
libmkl_blacs_openmpi_lp64.a libmkl_pgi_thread.a
libmkl_blacs_sgimpt_ilp64.a libmkl_pgi_thread.so*
libmkl_blacs_sgimpt_lp64.a libmkl_rt.so*
libmkl_blas95_ilp64.a libmkl_scalapack_ilp64.a
libmkl_blas95_lp64.a libmkl_scalapack_ilp64.so*
libmkl_cdft_core.a libmkl_scalapack_lp64.a
libmkl_cdft_core.so* libmkl_scalapack_lp64.so*
libmkl_core.a libmkl_sequential.a
libmkl_core.so* libmkl_sequential.so*
libmkl_def.so* libmkl_solver_ilp64.a
libmkl_gf_ilp64.a libmkl_solver_ilp64_sequential.a
libmkl_gf_ilp64.so* libmkl_solver_lp64.a
libmkl_gf_lp64.a libmkl_solver_lp64_sequential.a
libmkl_gf_lp64.so* libmkl_vml_avx.so*
libmkl_gnu_thread.a libmkl_vml_def.so*
libmkl_gnu_thread.so* libmkl_vml_mc.so*
libmkl_intel_ilp64.a libmkl_vml_mc2.so*
libmkl_intel_ilp64.so* libmkl_vml_mc3.so*
libmkl_intel_lp64.a libmkl_vml_p4n.so*
libmkl_intel_lp64.so* locale/
libmkl_intel_sp2dp.a
"
and, for example, the message
"
mkl_info:
libraries mkl_intel_lp64,mkl_intel_thread,lmkl_core not found in /opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/
"
says that the libs mkl_intel_lp64 and mkl_intel_thread was not found (but they are in the directory, it's just see the output of ls...)

What can I do?

Thank you very much for the atention!

0 Kudos
TimP
Honored Contributor III
4,597 Views
Check that the libraries are referenced by correct spellings;
-lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread
would be expanded in normal ld fashion to the .so libraries; if linking the static libraries, the specification passed to ld must be in accordance with the link advisor (full path names fully spelled out, with the --begin-group .... --end-group directives included).
The intel_thread libraries also introduce dependency on libiomp5 and libpthread.
0 Kudos
mecej4
Honored Contributor III
4,597 Views
Sorry, I had not bothered to look at the Numpy User Note link that you provided. This is one of those instances where I had to learn by doing. I downloaded the current NumPy source distribution from Sourceforge and built the package on OpenSuse 11.4 X64. Only a minor correction was needed to build the 64-bit version. Please see the comment that I added to the User Note page.

Simply put, change

lapack_libs = mkl_lapack_ilp64

to

lapack_libs =

in file site.cfg.
0 Kudos
Hilder_Pereira
Beginner
4,597 Views
macej4,

I made it and it didn't work
):

I received the same messages and warnings.
0 Kudos
mecej4
Honored Contributor III
4,597 Views
That's surprising. What are the compiler, kernel and OS versions on your system?
0 Kudos
Hilder_Pereira
Beginner
4,597 Views
The comipler version is 11.0

and the OS is Slackware 13.1.0 (with kernel 2.6.33.4).

The processor is a x86_64 Intel Core2 Quad CPU Q6600 @ 2.40GHz

0 Kudos
mecej4
Honored Contributor III
4,597 Views
The compiler version number that you just gave (11.0) is not consistent with the directory name given earlier (/opt/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/ ).

If you have more than one version of the compiler and more than one version of MKL it is necessary to use a matching combination, since the MKL libraries were changed considerably from those in compiler version 11.0 to those in 12.1.
0 Kudos
TimP
Honored Contributor III
4,597 Views
While it's certainly possible to use MKL and Intel compiler versions which weren't issued together, one of the value improvements in the integrated compiler and MKL release is the possibility of sourceing a single script to set up the combined path environment. When your results aren't consistent with the use of a single combined compiler/library release, nor with your description of versions you intended, it's difficult to discount the possibility that the reported problems arise from such inconsistencies.
0 Kudos
Gennady_F_Intel
Moderator
4,597 Views
that's correct: Compiler Version 11.0 contains the version of MKL 10.1. You can find all required binaries ( for example for 64bit ) for this version in the following directory:
/opt/intel/Compiler/11.0/084/mkl/lib/em64t
please pay attention at the name of this folder. This is not intel64 but em64t.
0 Kudos
Hilder_Pereira
Beginner
4,597 Views
I have just one version of mkl and icc.


But, could you talk about this inconsistence with the directory name?




Thanks
0 Kudos
Reply