Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build faiss problem(An implementation of BLAS is required but none was found) #690

Closed
2 tasks done
yuxingfirst opened this issue Jan 10, 2019 · 7 comments
Closed
2 tasks done
Labels

Comments

@yuxingfirst
Copy link

yuxingfirst commented Jan 10, 2019

Summary

i get a message that "configure: error: An implementation of BLAS is required but none was found. " when i run ./configure:

checking if sgemm_ is being linked in already... no
checking for sgemm_ in -lmkl_intel_lp64... no
checking for sgemm_ in -lmkl... no
checking for sgemm_ in -lopenblas... no
checking for ATL_xerbla in -latlas... no
checking for sgemm_ in -lblas... no
checking for sgemm_ in -framework vecLib... no
checking for sgemm_ in -lcxml... no
checking for sgemm_ in -ldxml... no
checking for sgemm_ in -lscs... no
checking for sgemm_ in -lcomplib.sgimath... no
checking for sgemm_ in -lblas... (cached) no
checking for sgemm_ in -lblas... (cached) no
configure: error: An implementation of BLAS is required but none was found.

my step is:

  1. download faiss-master.zip and unzip it
  2. download OpenBLAS-0.2.20.tar.gz and extract , then enter the OpenBLAS-0.2.20 dir and run make, generated libopenblas.a
  3. enter the faiss-master dir and "cp example_makefiles/makefile.inc.Linux makefile.inc"
  4. run ./configure, but report error: configure: error: An implementation of BLAS is required but none was found

how to resolve this problem? thanks!

#Part of makefile.inc

CPPFLAGS += -DFINTEGER=int
LIBS += -L/home/nikoxiong/OpenBLAS-0.2.20 -lopenblas -L/home/nikoxiong/lapack-3.8.0 -llapack

Platform

(gcc version 4.4.6 20110731
(Red Hat 4.4.6-3) (GCC) )

Faiss version: latest

Faiss compilation options: ./configure && make

Running on:

  • CPU

Interface:

  • C++
@beauby beauby added the install label Jan 10, 2019
@beauby
Copy link
Contributor

beauby commented Jan 10, 2019

You should make install in OpenBlas, otherwise faiss won't find it.

@yuxingfirst
Copy link
Author

yuxingfirst commented Jan 11, 2019

You should make install in OpenBlas, otherwise faiss won't find it.

thanks you , i resolved it.
however, i just get the file named libopenblas.so after make install , thus i annotate the "-llapack" in makefile.inc so that i could build faiss success. Does this situation indicate that faiss do not need the -llapack when use openblas?

#
# 2. Openblas
#
# The library contains both BLAS and Lapack. About 30% slower than MKL. Please see
#   https://github.com/facebookresearch/faiss/wiki/Troubleshooting#slow-brute-force-search-with-openblas
# to fix performance problemes with OpenBLAS

# for Ubuntu 16:
# sudo apt-get install libopenblas-dev python-numpy python-dev

# for Ubuntu 14:
# sudo apt-get install libopenblas-dev liblapack3 python-numpy python-dev

CPPFLAGS += -DFINTEGER=int
LIBS     += -lopenblas #-llapack

@beauby
Copy link
Contributor

beauby commented Jan 11, 2019

IIRC OpenBlas includes a Lapack implem by default.

@melih-unsal
Copy link

What does make install in OpenBlas mean?

@WIll-Xu35
Copy link

@beauby I did make install for OpenBLAS and still got this error message.

@dongzhen123
Copy link

What does make install in OpenBlas mean?

git clone https://github.com/xianyi/OpenBLAS.git

cd OpenBLAS

make

make install

@dongzhen123
Copy link

@beauby I did make install for OpenBLAS and still got this error message.

Don't forget
ln -s .../lib/libopenblas.so /usr/lib/libopenblas.so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants