Skip to content

Commit

Permalink
Merge pull request #2412 from QMCPACK/rc_392
Browse files Browse the repository at this point in the history
Rc 392
  • Loading branch information
ye-luo authored Apr 28, 2020
2 parents e53d0b9 + 0505c82 commit 8064ebf
Show file tree
Hide file tree
Showing 435 changed files with 45,239 additions and 35,333 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

Notable changes to QMCPACK are documented in this file.

## [3.9.2] - 2020-04-29

### Notes

This is an important bug fix release. As described in [\#2330](https://github.com/QMCPACK/qmcpack/issues/2330), since v3.8.0 the
timestep was not correctly changed between different DMC blocks if the time step was changed in the input, biasing the results.
Runs using a single time step were not affected. Thanks to Chandler Bennett for identifying the problem.

* Bug fix: timestep was not correctly changed between DMC blocks if it was changed in the input [\#2330](https://github.com/QMCPACK/qmcpack/issues/2330).
* qmcfinitesize tool added [\#2329](https://github.com/QMCPACK/qmcpack/pull/2329).
* QMCPACK spack package now supports AFQMC [\#2237](https://github.com/QMCPACK/qmcpack/issues/2237).
* Improvements to deterministic tests: these are now fully reliable other than for some CUDA builds and some mixed precision CPU configurations.
* Many improvements to cmake configuration for faster builds, e.g. [\#2389](https://github.com/QMCPACK/qmcpack/pull/2389).
* Ongoing source cleanup and fewer compile-time warnings, e.g. [\#2375](https://github.com/QMCPACK/qmcpack/pull/2375).

## [3.9.1] - 2020-02-11

### Notes
Expand Down
17 changes: 1 addition & 16 deletions CMake/CheckSincos.cmake
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
INCLUDE(${CMAKE_ROOT}/Modules/CheckCXXSourceCompiles.cmake)

SET(SINCOS_INCLUDE cmath)

SET(ENABLE_MASS FALSE CACHE BOOL "ENABLE MASS math libraries for Power architecture")
# This needs to go before HAVE_SINCOS
IF(ENABLE_MASS)
INCLUDE(CMake/FindIBMMASS.cmake)
IF(HAVE_MASS)
SET(CMAKE_REQUIRED_INCLUDES ${MASS_INCLUDE_DIRECTORIES} ${CMAKE_REQUIRED_INCLUDES})
SET(CMAKE_REQUIRED_LINK_OPTIONS ${MASS_LINKER_FLAGS})
SET(CMAKE_REQUIRED_LIBRARIES ${MASS_LIBRARIES})
ENDIF(HAVE_MASS)
ENDIF(ENABLE_MASS)

MESSAGE("CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}")
MESSAGE("CMAKE_REQUIRED_LINK_OPTIONS: ${CMAKE_REQUIRED_LINK_OPTIONS}")
MESSAGE("CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}")
SET(CMAKE_REQUIRED_LIBRARIES Math::scalar_vector_functions)

SET( SINCOS_TEST_SRC
"#include \"${SINCOS_INCLUDE}\"
Expand Down
10 changes: 8 additions & 2 deletions CMake/ClangCompilers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
# Enable OpenMP
IF(QMC_OMP)
SET(ENABLE_OPENMP 1)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
IF(ENABLE_OFFLOAD)
SET(OFFLOAD_TARGET "nvptx64-nvidia-cuda" CACHE STRING "Offload target architecture")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp -fopenmp-targets=${OFFLOAD_TARGET}")
IF(OFFLOAD_TARGET MATCHES "spir64")
SET(OMP_FLAG "-fiopenmp")
ELSE(OFFLOAD_TARGET MATCHES "spir64")
SET(OMP_FLAG "-fopenmp")
ENDIF(OFFLOAD_TARGET MATCHES "spir64")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OMP_FLAG}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OMP_FLAG} -fopenmp-targets=${OFFLOAD_TARGET}")
ELSE()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
ENDIF()
ENDIF(QMC_OMP)
Expand Down
5 changes: 5 additions & 0 deletions CMake/FindFFTW.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ IF(FFTW_INCLUDE_DIR AND FFTW_LIBRARIES)
MESSAGE(STATUS "FFTW_INCLUDE_DIR=${FFTW_INCLUDE_DIR}")
MESSAGE(STATUS "FFTW_LIBRARIES=${FFTW_LIBRARIES}")
SET(FFTW_FOUND TRUE)
#create FFTW3 target
ADD_LIBRARY(Math::FFTW3 INTERFACE IMPORTED)
SET_TARGET_PROPERTIES(Math::FFTW3 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FFTW_INCLUDE_DIR}"
INTERFACE_COMPILE_DEFINITIONS "HAVE_LIBFFTW"
INTERFACE_LINK_LIBRARIES "${FFTW_LIBRARIES}")
ENDIF()

MARK_AS_ADVANCED(
Expand Down
31 changes: 16 additions & 15 deletions CMake/FindIBMMASS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ set(SUFFIXES include)
find_path(MASS_INCLUDE_DIRECTORIES name "mass.h" HINTS ${MASS_ROOT}
PATH_SUFFIXES ${SUFFIXES})
if (NOT MASS_INCLUDE_DIRECTORIES)
message(FATAL_ERROR "MASS_INCLUDE_DIRECTORIES not set. \"mass.h\" not found in MASS_ROOT/(${SUFFIXES})")
MESSAGE(FATAL_ERROR "MASS_INCLUDE_DIRECTORIES not set. \"mass.h\" not found in MASS_ROOT/(${SUFFIXES})")
endif (NOT MASS_INCLUDE_DIRECTORIES)
message("MASS_INCLUDE_DIRECTORIES: ${MASS_INCLUDE_DIRECTORIES}")
MESSAGE(STATUS "MASS_INCLUDE_DIRECTORIES: ${MASS_INCLUDE_DIRECTORIES}")

# Finding and setting the MASS_LINK_DIRECTORIES
# the directory organization varies with platform and targets
Expand All @@ -19,10 +19,10 @@ set(SUFFIXES lib lib64)
find_path(MASS_LINK_DIRECTORIES name "${MASS_FIND_LIB}" HINTS ${MASS_ROOT}
PATH_SUFFIXES ${SUFFIXES})
if (NOT MASS_LINK_DIRECTORIES)
message(FATAL_ERROR "MASS_LINK_DIRECTORIES not set. ${MASS_FIND_LIB} "
MESSAGE(FATAL_ERROR "MASS_LINK_DIRECTORIES not set. ${MASS_FIND_LIB} "
"not found in MASS_ROOT/(${SUFFIXES})")
endif (NOT MASS_LINK_DIRECTORIES)
message("MASS_LINK_DIRECTORIES: ${MASS_LINK_DIRECTORIES}")
MESSAGE(STATUS "MASS_LINK_DIRECTORIES: ${MASS_LINK_DIRECTORIES}")

set(MASS_LINKER_FLAGS -L${MASS_LINK_DIRECTORIES} -Wl,-rpath,${MASS_LINK_DIRECTORIES})
set(MASS_LIBRARIES "-lmass -lmassv")
Expand All @@ -45,6 +45,7 @@ for( int i = 0; i < in_size; ++i)
vlog10(resultv, inputv, &in_size);
}
")

try_compile(HAVE_MASS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src_mass.cxx
CMAKE_FLAGS
Expand All @@ -58,17 +59,17 @@ if ( NOT HAVE_MASS )
endif ( NOT HAVE_MASS )

IF ( HAVE_MASS )
SET( MASS_FOUND 1 )
SET( MASS_FLAGS ${MASS_COMPILE_DEFINITIONS} )
include_directories( ${MASS_INCLUDE_DIRECTORIES} )
set( HAVE_VECTOR_MATH 1 )
set( HAVE_MASSV 1 )
set( SINCOS_INCLUDE mass.h )
SET( MASS_FOUND TRUE )
SET( HAVE_MASSV TRUE )
MESSAGE(STATUS "MASS found: HAVE_MASS=${HAVE_MASS}, HAVE_MASSV=${HAVE_MASSV}")

#create scalar_vector_functions target
ADD_LIBRARY(Math::scalar_vector_functions INTERFACE IMPORTED)
SET_TARGET_PROPERTIES(Math::scalar_vector_functions PROPERTIES INTERFACE_COMPILE_DEFINITIONS "HAVE_MASS;HAVE_MASSV"
INTERFACE_INCLUDE_DIRECTORIES "${MASS_INCLUDE_DIRECTORIES}"
INTERFACE_LINK_LIBRARIES "${MASS_LINKER_FLAGS} ${MASS_LIBRARIES}")
set( SINCOS_INCLUDE mass.h )
ELSE( HAVE_MASS )
SET( MASS_FOUND 0 )
SET( MASS_FLAGS )
SET( MASS_LIBRARIES )
SET( MASS_LINKER_FLAGS )
MESSAGE("MASS not found")
SET( MASS_FOUND FALSE )
MESSAGE(STATUS "MASS not found")
ENDIF( HAVE_MASS )
163 changes: 101 additions & 62 deletions CMake/FindMKL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,81 +4,89 @@ INCLUDE( CheckCXXSourceCompiles )

MESSAGE(STATUS "Looking for Intel MKL libraries")

# Extremely Basic Support of common mkl module environment variables
# or -DMKLROOT/-DMKL_HOME instead of preferred -DMKL_ROOT
# Some Linux distributions (Ubuntu >= 18.10) provide MKL
# headers in /usr/include/mkl, define MKL_ROOT but not used for library searching.
if (NOT MKL_ROOT)
# Finding and setting the MKL_INCLUDE_DIRECTORIES
find_path(MKL_INCLUDE_DIRECTORIES "mkl.h"
HINTS ${MKLROOT} ${MKL_HOME} $ENV{MKLROOT} $ENV{MKL_ROOT} $ENV{MKL_HOME}
PATH_SUFFIXES include mkl)
string(REPLACE "/include" "" MKL_ROOT ${MKL_INCLUDE_DIRECTORIES})
else (NOT MKL_ROOT)
# Finding and setting the MKL_INCLUDE_DIRECTORIES
set(SUFFIXES include)
find_path(MKL_INCLUDE_DIRECTORIES "mkl.h" HINTS ${MKL_ROOT}
PATH_SUFFIXES ${SUFFIXES})
if (NOT MKL_INCLUDE_DIRECTORIES)
IF(DEFINED MKL_ROOT)
# Finding and setting the MKL_INCLUDE_DIRECTORIES based on explicit MKL_ROOT
SET(SUFFIXES include)
FIND_PATH(MKL_INCLUDE_DIRECTORIES "mkl.h" HINTS ${MKL_ROOT}
PATH_SUFFIXES ${SUFFIXES} NO_CMAKE_SYSTEM_PATH)
IF(NOT MKL_INCLUDE_DIRECTORIES)
message(FATAL_ERROR "MKL_INCLUDE_DIRECTORIES not set. \"mkl.h\" not found in MKL_ROOT/(${SUFFIXES})")
endif ()
endif (NOT MKL_ROOT)
ENDIF ()
ELSE(DEFINED MKL_ROOT)
# Finding and setting the MKL_INCLUDE_DIRECTORIES based on MKLROOT, MKL_HOME, $ENV{MKLROOT}, $ENV{MKL_ROOT}, $ENV{MKL_HOME}
# Extremely Basic Support of common mkl module environment variables
# or -DMKLROOT/-DMKL_HOME instead of preferred -DMKL_ROOT
FIND_PATH(MKL_INCLUDE_DIRECTORIES "mkl.h"
HINTS ${MKLROOT} ${MKL_HOME} $ENV{MKLROOT} $ENV{MKL_ROOT} $ENV{MKL_HOME}
PATH_SUFFIXES include NO_CMAKE_SYSTEM_PATH)
IF(MKL_INCLUDE_DIRECTORIES)
STRING(REPLACE "/include" "" MKL_ROOT ${MKL_INCLUDE_DIRECTORIES})
ELSE(MKL_INCLUDE_DIRECTORIES)
# Finding MKL headers in the system
FIND_PATH(MKL_INCLUDE_DIRECTORIES "mkl.h" PATH_SUFFIXES mkl)
ENDIF(MKL_INCLUDE_DIRECTORIES)
ENDIF(DEFINED MKL_ROOT)

if (NOT MKL_ROOT)
if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
message(FATAL_ERROR "Intel's standard compilervar.sh sets the env variable MKLROOT.\n"
IF(MKL_INCLUDE_DIRECTORIES)
MESSAGE("MKL_INCLUDE_DIRECTORIES: ${MKL_INCLUDE_DIRECTORIES}")
ELSE(MKL_INCLUDE_DIRECTORIES)
IF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
MESSAGE(FATAL_ERROR "Intel's standard compilervar.sh sets the env variable MKLROOT.\n"
"If you are invoking icc without the customary environment\n"
"you must set the the environment variable or pass cmake MKL_ROOT.")
else(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
message (FATAL_ERROR "ENABLE_MKL is TRUE and mkl directory not found. Set MKL_ROOT." )
endif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
endif (NOT MKL_ROOT)

message("MKL_INCLUDE_DIRECTORIES: ${MKL_INCLUDE_DIRECTORIES}")
ELSE(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
MESSAGE(FATAL_ERROR "ENABLE_MKL is TRUE and mkl directory not found. Set MKL_ROOT." )
ENDIF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
ENDIF(MKL_INCLUDE_DIRECTORIES)

if ( NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
IF( NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
# Finding and setting the MKL_LINK_DIRECTORIES
# the directory organization varies with platform and targets
# these suffixes are not exhaustive
set(MKL_FIND_LIB "libmkl_intel_lp64${CMAKE_SHARED_LIBRARY_SUFFIX}")
set(SUFFIXES lib lib/intel64)
find_library(MKL_LINK_DIRECTORIES "${MKL_FIND_LIB}" HINTS ${MKL_ROOT}
PATH_SUFFIXES ${SUFFIXES})
if (NOT MKL_LINK_DIRECTORIES)
message(FATAL_ERROR "MKL_LINK_DIRECTORIES not set. ${MKL_FIND_LIB} "
"not found in MKL_ROOT/(${SUFFIXES})")
endif ()
string(REPLACE "/${MKL_FIND_LIB}" "" MKL_LINK_DIRECTORIES ${MKL_LINK_DIRECTORIES})
message("MKL_LINK_DIRECTORIES: ${MKL_LINK_DIRECTORIES}")
set(MKL_LINKER_FLAGS "-L${MKL_LINK_DIRECTORIES} -Wl,-rpath,${MKL_LINK_DIRECTORIES}")
set(MKL_LIBRARIES "-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl")
else ( NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
SET(MKL_FIND_LIB "libmkl_intel_lp64${CMAKE_SHARED_LIBRARY_SUFFIX}")
SET(SUFFIXES lib lib/intel64)
FIND_PATH(MKL_LINK_DIRECTORIES "${MKL_FIND_LIB}" HINTS ${MKL_ROOT}
PATH_SUFFIXES ${SUFFIXES} NO_CMAKE_SYSTEM_PATH)
IF(MKL_LINK_DIRECTORIES)
MESSAGE("MKL_LINK_DIRECTORIES: ${MKL_LINK_DIRECTORIES}")
set(MKL_LINKER_FLAGS "-L${MKL_LINK_DIRECTORIES} -Wl,-rpath,${MKL_LINK_DIRECTORIES}")
ELSE(MKL_LINK_DIRECTORIES)
FIND_LIBRARY(MKL_SYSTEM_LIBRARIES "${MKL_FIND_LIB}")
IF(MKL_SYSTEM_LIBRARIES)
MESSAGE("MKL provided by the system. Leave MKL_LINK_DIRECTORIES unset.")
ENDIF()
ENDIF(MKL_LINK_DIRECTORIES)
IF (NOT MKL_LINK_DIRECTORIES AND NOT MKL_SYSTEM_LIBRARIES)
MESSAGE(FATAL_ERROR "${MKL_FIND_LIB} found neither in MKL_ROOT/(${SUFFIXES}) nor on system library paths.")
ENDIF ()
SET(MKL_LIBRARIES "-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl")
ELSE ( NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
# this takes away link control for intel but is convenient
# perhaps we should consider dropping it since it will more or less
# unify the MKL setup.
# Note -mkl implicitly includes that icc's mkl/include
set(MKL_COMPILE_DEFINITIONS "-mkl")
endif (NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
SET(MKL_COMPILE_DEFINITIONS "-mkl")
ENDIF (NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel" )

# Check for mkl.h
FILE( WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src_mkl.cxx"
"#include <iostream>\n #include <mkl.h>\n int main() { return 0; }\n" )
try_compile(HAVE_MKL ${CMAKE_BINARY_DIR}
TRY_COMPILE(HAVE_MKL ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src_mkl.cxx
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES=${MKL_INCLUDE_DIRECTORIES} "
"-DLINK_DIRECTORIES=${MKL_LINK_DIRECTORIES}"
LINK_LIBRARIES "${MKL_LIBRARIES}"
COMPILE_DEFINITIONS "${MKL_COMPILE_DEFINITIONS}"
OUTPUT_VARIABLE MKL_OUT)
if ( NOT HAVE_MKL )
IF( NOT HAVE_MKL )
MESSAGE( "${MKL_OUT}" )
endif ( NOT HAVE_MKL )
ENDIF( NOT HAVE_MKL )

# Check for mkl_vml_functions.h
FILE( WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src_mkl_vml.cxx"
"#include <iostream>\n #include <mkl_vml_functions.h>\n int main() { return 0; }\n" )
try_compile(HAVE_MKL_VML ${CMAKE_BINARY_DIR}
TRY_COMPILE(HAVE_MKL_VML ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src_mkl_vml.cxx
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES=${MKL_INCLUDE_DIRECTORIES} "
Expand All @@ -87,34 +95,65 @@ try_compile(HAVE_MKL_VML ${CMAKE_BINARY_DIR}
OUTPUT_VARIABLE MKL_OUT)

# Check for fftw3
find_path(MKL_FFTW3 "fftw3.h"
FIND_PATH(MKL_FFTW3 "fftw3.h"
HINTS ${MKL_INCLUDE_DIRECTORIES}
PATH_SUFFIXES fftw)
if(MKL_FFTW3)
list(APPEND MKL_INCLUDE_DIRECTORIES ${MKL_FFTW3})
IF(MKL_FFTW3)
FILE( WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src_mkl_fftw3.cxx"
"#include <iostream>\n #include <fftw3.h>\n int main() { return 0; }\n" )
try_compile(HAVE_MKL_FFTW3 ${CMAKE_BINARY_DIR}
TRY_COMPILE(HAVE_MKL_FFTW3 ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src_mkl_fftw3.cxx
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES=${MKL_INCLUDE_DIRECTORIES} "
"-DINCLUDE_DIRECTORIES=${MKL_FFTW3} "
"-DLINK_DIRECTORIES=${MKL_LINK_DIRECTORIES}"
LINK_LIBRARIES "${MKL_LIBRARIES}"
COMPILE_DEFINITIONS "${MKL_COMPILE_DEFINITIONS}"
OUTPUT_VARIABLE MKL_OUT)
else(MKL_FFTW3)
ELSE(MKL_FFTW3)
UNSET(HAVE_MKL_FFTW3)
endif(MKL_FFTW3)
ENDIF(MKL_FFTW3)

IF ( HAVE_MKL )
SET( MKL_FOUND 1 )
SET( MKL_FLAGS ${MKL_COMPILE_DEFINITIONS} )
include_directories( ${MKL_INCLUDE_DIRECTORIES} )
SET( MKL_FOUND TRUE )
MESSAGE(STATUS "MKL found: HAVE_MKL=${HAVE_MKL}, HAVE_MKL_VML=${HAVE_MKL_VML}, HAVE_MKL_FFTW3=${HAVE_MKL_FFTW3}")

#create BLAS_LAPACK target
ADD_LIBRARY(Math::BLAS_LAPACK INTERFACE IMPORTED)
SET_TARGET_PROPERTIES(Math::BLAS_LAPACK PROPERTIES INTERFACE_COMPILE_DEFINITIONS "HAVE_MKL")
IF (NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
SET_TARGET_PROPERTIES(Math::BLAS_LAPACK PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MKL_INCLUDE_DIRECTORIES}"
INTERFACE_LINK_LIBRARIES "${MKL_LINKER_FLAGS};${MKL_LIBRARIES}")
ELSE (NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
SET_TARGET_PROPERTIES(Math::BLAS_LAPACK PROPERTIES INTERFACE_COMPILE_OPTIONS "-mkl"
INTERFACE_LINK_LIBRARIES "-mkl")
ENDIF (NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel" )

IF( HAVE_MKL_VML )
#create scalar_vector_functions target
ADD_LIBRARY(Math::scalar_vector_functions INTERFACE IMPORTED)
SET_TARGET_PROPERTIES(Math::scalar_vector_functions PROPERTIES INTERFACE_COMPILE_DEFINITIONS "HAVE_MKL;HAVE_MKL_VML")
IF (NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
SET_TARGET_PROPERTIES(Math::scalar_vector_functions PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MKL_INCLUDE_DIRECTORIES}"
INTERFACE_LINK_LIBRARIES "${MKL_LINKER_FLAGS};${MKL_LIBRARIES}")
ELSE (NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
SET_TARGET_PROPERTIES(Math::scalar_vector_functions PROPERTIES INTERFACE_COMPILE_OPTIONS "-mkl"
INTERFACE_LINK_LIBRARIES "-mkl")
ENDIF (NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
ENDIF( HAVE_MKL_VML )

IF( HAVE_MKL_FFTW3 )
#create FFTW3 target
ADD_LIBRARY(Math::FFTW3 INTERFACE IMPORTED)
SET_TARGET_PROPERTIES(Math::FFTW3 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MKL_FFTW3}"
INTERFACE_COMPILE_DEFINITIONS "HAVE_MKL;HAVE_LIBFFTW")
IF (NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
SET_TARGET_PROPERTIES(Math::FFTW3 PROPERTIES INTERFACE_LINK_LIBRARIES "${MKL_LINKER_FLAGS};${MKL_LIBRARIES}")
ELSE (NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
SET_TARGET_PROPERTIES(Math::FFTW3 PROPERTIES INTERFACE_COMPILE_OPTIONS "-mkl"
INTERFACE_LINK_LIBRARIES "-mkl")
ENDIF (NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
ENDIF( HAVE_MKL_FFTW3 )
ELSE( HAVE_MKL )
SET( MKL_FOUND 0 )
SET( MKL_FLAGS )
SET( MKL_LIBRARIES )
SET( MKL_LINKER_FLAGS )
MESSAGE("MKL not found")
SET( MKL_FOUND FALSE )
MESSAGE(STATUS "MKL not found")
ENDIF( HAVE_MKL )
42 changes: 0 additions & 42 deletions CMake/FindVectorMath.cmake

This file was deleted.

Loading

0 comments on commit 8064ebf

Please sign in to comment.