FindMKL modified to find installed mkl in system paths

This commit is contained in:
Marcin Junczys-Dowmunt 2021-02-24 05:19:34 +00:00
parent 147d9dc25b
commit 8ecc8b653f
2 changed files with 5 additions and 7 deletions

View File

@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Dynamic gradient-scaling with `--dynamic-gradient-scaling`. - Dynamic gradient-scaling with `--dynamic-gradient-scaling`.
### Fixed ### Fixed
- Find MKL installed under Ubuntu 20.04 via apt-get
- Support for CUDA 11. - Support for CUDA 11.
- General improvements and fixes for MPI handling, was essentially non-functional before (syncing, random seeds, deadlocks during saving, validation etc.) - General improvements and fixes for MPI handling, was essentially non-functional before (syncing, random seeds, deadlocks during saving, validation etc.)
- Allow to compile -DUSE_MPI=on with -DUSE_STATIC_LIBS=on although MPI gets still linked dynamically since it has so many dependencies. - Allow to compile -DUSE_MPI=on with -DUSE_STATIC_LIBS=on although MPI gets still linked dynamically since it has so many dependencies.

View File

@ -63,7 +63,7 @@ set(INTEL_ROOT ${INTEL_ROOT_DEFAULT} CACHE PATH "Folder contains intel libs")
find_path(MKL_ROOT include/mkl.h PATHS $ENV{MKLROOT} ${INTEL_ROOT}/mkl find_path(MKL_ROOT include/mkl.h PATHS $ENV{MKLROOT} ${INTEL_ROOT}/mkl
DOC "Folder contains MKL") DOC "Folder contains MKL")
find_path(MKL_INCLUDE_DIR NAMES mkl.h HINTS ${MKL_ROOT}/include) find_path(MKL_INCLUDE_DIR NAMES mkl.h HINTS ${MKL_ROOT}/include /usr/include/mkl)
find_library(MKL_INTERFACE_LIBRARY find_library(MKL_INTERFACE_LIBRARY
@ -71,22 +71,19 @@ find_library(MKL_INTERFACE_LIBRARY
PATHS ${MKL_ROOT}/lib PATHS ${MKL_ROOT}/lib
${MKL_ROOT}/lib/intel64 ${MKL_ROOT}/lib/intel64
${MKL_ROOT}/lib/intel64_win ${MKL_ROOT}/lib/intel64_win
${INTEL_ROOT}/mkl/lib/intel64 ${INTEL_ROOT}/mkl/lib/intel64)
NO_DEFAULT_PATH)
find_library(MKL_SEQUENTIAL_LAYER_LIBRARY find_library(MKL_SEQUENTIAL_LAYER_LIBRARY
NAMES ${SEQ_LIB} NAMES ${SEQ_LIB}
PATHS ${MKL_ROOT}/lib PATHS ${MKL_ROOT}/lib
${MKL_ROOT}/lib/intel64 ${MKL_ROOT}/lib/intel64
${INTEL_ROOT}/mkl/lib/intel64 ${INTEL_ROOT}/mkl/lib/intel64)
NO_DEFAULT_PATH)
find_library(MKL_CORE_LIBRARY find_library(MKL_CORE_LIBRARY
NAMES ${COR_LIB} NAMES ${COR_LIB}
PATHS ${MKL_ROOT}/lib PATHS ${MKL_ROOT}/lib
${MKL_ROOT}/lib/intel64 ${MKL_ROOT}/lib/intel64
${INTEL_ROOT}/mkl/lib/intel64 ${INTEL_ROOT}/mkl/lib/intel64)
NO_DEFAULT_PATH)
set(MKL_INCLUDE_DIRS ${MKL_INCLUDE_DIR}) set(MKL_INCLUDE_DIRS ${MKL_INCLUDE_DIR})
set(MKL_LIBRARIES ${MKL_INTERFACE_LIBRARY} ${MKL_SEQUENTIAL_LAYER_LIBRARY} ${MKL_CORE_LIBRARY}) set(MKL_LIBRARIES ${MKL_INTERFACE_LIBRARY} ${MKL_SEQUENTIAL_LAYER_LIBRARY} ${MKL_CORE_LIBRARY})