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

Changing a few settings for MKL on Ubuntu #13

Merged
merged 2 commits into from
Mar 3, 2017

Conversation

brunodoamaral
Copy link
Contributor

This is my current configuration for MKL on Ubuntu.
I also corrected the BLASLDFLAGS=-DFINTEGER=long line (it should be BLASCFLAGS).

This is my current configuration for MKL on Ubuntu.
I also corrected the `BLASLDFLAGS=-DFINTEGER=long` line (it should be `BLASCFLAGS`).
@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!

If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact [email protected] if you have any questions.

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@mdouze
Copy link
Contributor

mdouze commented Mar 2, 2017

Hi brunodoamaral,

This looks like a reasonable commit. Can you confirm that by setting these flags (and uncommenting them), Faiss works with MKL?

Thanks

@brunodoamaral
Copy link
Contributor Author

Hi @mdouze, with above settings I was able to compile the lib.

However, I'm still not able to run it. But it seems to be a problem with my MKL instalation:

ImportError: /opt/intel/compilers_and_libraries_2017.2.174/linux/mkl/lib/intel64_lin/libmkl_gnu_thread.so: undefined symbol: mkl_sparse_d_csr__g_n_syrk_notr_row_struct_i8

Running the ldd command on the problematic .so results the same output:

user@machine ~/git/faiss $ ldd -r $MKLROOT/lib/intel64/libmkl_gnu_thread.so | grep mkl_sparse_d_csr__g_n_syrk_notr_row_struct_i8
undefined symbol: mkl_sparse_d_csr__g_n_syrk_notr_row_struct_i8	(/opt/intel/compilers_and_libraries/linux/mkl/lib/intel64/libmkl_gnu_thread.so)

I already tried to set LD_LIBRARY_PATH and running source $MKLROOT/bin/mklvars.sh intel64 ilp64 but have no success.

I'll report here if I have success using faiss.

@mdouze
Copy link
Contributor

mdouze commented Mar 3, 2017

Hi,

It works for me with IntelComposerXE 2017.0.098. I still need to set the LD_LIBRARY_PATH. The makefile.inc flags are:

BLASLDFLAGS=-Wl,--no-as-needed -L$(MKLROOT)/lib/intel64   -lmkl_intel_ilp64 \
 -lmkl_core -lmkl_gnu_thread -ldl -lpthread
BLASCFLAGS=-DFINTEGER=long

Then

LD_LIBRARY_PATH=/tmp/mkl/lib/intel64 tests/demo_ivfpq_indexing
LD_LIBRARY_PATH=/tmp/mkl/lib/intel64 python -c "import _swigfaiss"

both work.

Tested and documented on MLK 2017.0.098
@brunodoamaral
Copy link
Contributor Author

Thanks @mdouze, I was able to compile using MLK 2017.0.098.
I just update the documentation to reflect these changes.

@mdouze
Copy link
Contributor

mdouze commented Mar 3, 2017

OK for merge

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

Successfully merging this pull request may close these issues.

3 participants