dftbplus / dftbplus

DFTB+ general package for performing fast atomistic simulations
http://www.dftbplus.org
Other
330 stars 164 forks source link

dftb+ 20.2.1 intel mkl library linking error #694

Closed anshugaur closed 2 years ago

anshugaur commented 3 years ago

I am trying to compile dftb+ 20.2.1 with intel compilers (mpiifort and icc) and mkl libraries. Every thing from camke configure to build goes smoothly until the very end when the Fortan tries to link executable (dftb+, waveplot, modes and, others) to mkl libraries. I get

[ 96%] Linking Fortran executable dftb+ [ 96%] Linking Fortran executable test_qdepextpot ld: cannot find -lmkl_scalapack_lp64 ld: cannot find -lmkl_blacs_intelmpi_lp64 ld: cannot find -lmkl_intel_lp64 ld: cannot find -lmkl_sequential ld: cannot find -lmkl_core . . .[100%] Linking Fortran executable waveplot ld: cannot find -lmkl_scalapack_lp64 ld: cannot find -lmkl_blacs_intelmpi_lp64 ld: cannot find -lmkl_intel_lp64 ld: cannot find -lmkl_sequential ld: cannot find -lmkl_core

and this happens for all executables. These libraries are defined in intel.cmake and path is provided during cmake congigure via -DCMAKE_PREFIX_PATH=/opt/intel/mkl/lib/intel64 I am not sure why my linker program is not able to find these libraries. These libraries, both .so and .a files exist in specified directory. Do I need to provide path somewhere else using -L to fortran compiler in the camke configure files?

I had compiled and installed dftb+ 20.1 using same libraries and paths without any difficulty.

Any help would be appreciated.

Describe the bug

To Reproduce

Expected behaviour

Additional context

wadudmiah commented 3 years ago

Hi, I am having similar problems. What was your cmake command?

aradi commented 3 years ago

Note: CMAKE_PREFIX_PATH is an environment variable and should not set with -D. Export it via export CMAKE_PREFIX_PATH=......

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 2 years ago

This stale issue has been automatically closed.