I would like to link caffe with the library mkl_intel_lp64.so. I modified Makefile and add the line "LIBRARIES += mkl_intel_lp64".
ifeq ($(BLAS), mkl)
# MKL
LIBRARIES += mkl_rt
# modified by me
LIBRARIES += mkl_intel_lp64
COMMON_FLAGS += -DUSE_MKL
MKLROOT ?= /opt/intel/mkl
BLAS_INCLUDE ?= $(MKLROOT)/include
BLAS_LIB ?= $(MKLROOT)/lib $(MKLROOT)/lib/intel64
However, error information like these pops out when linking:
/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64/libmkl_intel_lp64.so: undefined reference to `mkl_lapack_ssbevd_2stage'
/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64/libmkl_intel_lp64.so: undefined reference to `mkl_lapack_csyconv'
/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64/libmkl_intel_lp64.so: undefined reference to `mkl_lapack_cspmv'
/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64/libmkl_intel_lp64.so: undefined reference to `mkl_lapack_slaqr5'
/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64/libmkl_intel_lp64.so: undefined reference to `mkl_lapack_zlagsy'
/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64/libmkl_intel_lp64.so: undefined reference to `mkl_blas_zdotu'
/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64/libmkl_intel_lp64.so: undefined reference to `mkl_feast_dfeast_scsrev'
/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64/libmkl_intel_lp64.so: undefined reference to `mkl_lapack_zlacrt'
/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64/libmkl_intel_lp64.so: undefined reference to `mkl_lapack_cpotrs'
/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64/libmkl_intel_lp64.so: undefined reference to `mkl_lapack_zgeev'
/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64/libmkl_intel_lp64.so: undefined reference to `mkl_lapack_strrfs'
/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64/libmkl_intel_lp64.so: undefined reference to `mkl_spblas_lp64_mkl_dcsrcoo'
...
I can successfully compile with MKL if I don't add the line mentioned above.
Could anyone pls tell me what is going on, Thx a lot!
(the full error information is attached in the file)