Faiss: Anaconda + MKL

Created on 8 May 2017  路  2Comments  路  Source: facebookresearch/faiss

Anyone have any luck compiling this with Anaconda python + MKL?

Most helpful comment

I did.

In Makefile.inc:

MKLROOT=${HOME}/anaconda3
BLASLDFLAGS=-Wl,--no-as-needed -L$(MKLROOT)/lib -lmkl_intel_ilp64 \
-lmkl_core -lmkl_intel_thread -ldl -lpthread -liomp5

This compiles. But then gives some weird runtime errors about MKL not being able to find shared objects (though they're available). For me the fix was:

export LD_LIBRARY_PATH=${HOME}/anaconda3/lib:${LD_LIBRARY_PATH}
export LD_PRELOAD=${HOME}/anaconda3/lib/libmkl_core.so:${HOME}/anaconda3/lib/libmkl_sequential.so

All 2 comments

I did.

In Makefile.inc:

MKLROOT=${HOME}/anaconda3
BLASLDFLAGS=-Wl,--no-as-needed -L$(MKLROOT)/lib -lmkl_intel_ilp64 \
-lmkl_core -lmkl_intel_thread -ldl -lpthread -liomp5

This compiles. But then gives some weird runtime errors about MKL not being able to find shared objects (though they're available). For me the fix was:

export LD_LIBRARY_PATH=${HOME}/anaconda3/lib:${LD_LIBRARY_PATH}
export LD_PRELOAD=${HOME}/anaconda3/lib/libmkl_core.so:${HOME}/anaconda3/lib/libmkl_sequential.so

Thanks!

This seems to close the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ilyakhov picture ilyakhov  路  3Comments

daniellevy picture daniellevy  路  3Comments

linghuang picture linghuang  路  3Comments

zoe-cheung picture zoe-cheung  路  3Comments

wwmmqq picture wwmmqq  路  3Comments