0

I am compiling a software package that uses ifort several MKL libraries. The part of the Makefile that mostly do the linking:

# Library options in general
MKL_LIBDIR = /opt/intel/mkl/lib/intel64
LIBOPT = -L$(MKL_LIBDIR)

# How to link specific libraries
LIB_BLAS   = -Wl,--start-group \
  -lmkl_intel_lp64 \
  -lmkl_intel_thread \
  -lmkl_core \
  -Wl,--end-group \
  -liomp5 -lpthread
LIB_LAPACK = 

When i compile this, I have an error:

ld: cannot find -lpthread
make[1]: *** [dftb+] Error 1
make[1]: Leaving directory `/home/gjuhasz_p/Downloads/dftb-src/dftb+_1.2.2_src/prg_dftb/_obj_x86_64-linux-ifort'
make: *** [_obj_x86_64-linux-ifort] Error 2

I tried to add -L/directory or export LD_LIBRARY_PATH=/directory (based on what locate tells me about libpthread.so) However, ld still cannot find the library, and cannot link. I also had similar problems with other libraries, if I just comment out this linking command.

Why is this happening and how can I fix it? Thanks!

Greg
  • 101
  • 2
  • The selection from your makefile shows the definition of the macro `LIB_BLAS` but provides no evidence that you actually use it. Do you ? – High Performance Mark Mar 31 '14 at 12:50
  • The full makefile is several pages long, so I cut this part out. If I comment out this part, I got an error message from the compiler that it cannot find some functions/references. so the short answer: yes, I am pretty sure the software uses BLAST through the MKL. – Greg Mar 31 '14 at 17:32

0 Answers0