My Makefile.config is like this:
# BLAS choice:
# atlas for ATLAS (default)
# mkl for MKL
# open for OpenBlas
BLAS := atlas
# Custom (MKL/ATLAS/OpenBLAS) include and lib directories.
# Leave commented to accept the defaults for your choice of BLAS
# (which should work)!
BLAS_INCLUDE := /usr/include
BLAS_LIB := /usr/lib64/atlas
ANACONDA_HOME := $(HOME)/aconda
PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
$(ANACONDA_HOME)/include/python2.7 \
$(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \
# We need to be able to find libpythonX.X.so or .dylib.
# PYTHON_LIB := /usr/lib
PYTHON_LIB := $(ANACONDA_HOME)/lib
# Homebrew installs numpy in a non standard path (keg only)
# PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include
# PYTHON_LIB += $(shell brew --prefix numpy)/lib
# Uncomment to support layers written in Python (will link against Python libs)
# WITH_PYTHON_LAYER := 1
# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/libI have successfully compiled caffe with pycaffe. I also ran make test successfully. But make runtest gives me the following error:
[student@localhost caffe]$ make runtest
.build_release/tools/caffe
.build_release/tools/caffe: error while loading shared libraries: libhdf5_hl.so.10: cannot open shared object file: No such file or directory
make: *** [runtest] Error 127I believe hdf5 is installed with anaconda and I have given the path to lib in anaconda( Please see the last line of config i have placed here) ie.
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib.
Before this I has installed
hdf5 1.8.12 with yum and
libhdf5_hl.so.8 was present in
/usr/lib64/ , but not
libhdf5_hl.so.10 which is not found in error message.
I created a softlink like this
$sudo ln -s libhdf5_hl.so.8 libhdf5_hl.so.10
$sudo ldconfig
Doing this it found the softlink
libhdf5_hl.so.10 in
/usr/lib64/ but gave a
hdf5 version mismatch error while running test.
My question is that i have not given '
/usr/lib64/' this path anywhere in config, how the make process goes to look there for that lib but doesnot look at
LIBRARY_DIR provided. And all required hdf5 lib are present in
LIBRARY_DIR.