diff --git a/CMakeModules/morse/AuxilaryFlags.cmake b/CMakeModules/morse/AuxilaryFlags.cmake index 9744d578b6eada54ef12355b27d1ff3000da2fb9..1a17823a24b634872522fcb94a3947e22d55fae9 100644 --- a/CMakeModules/morse/AuxilaryFlags.cmake +++ b/CMakeModules/morse/AuxilaryFlags.cmake @@ -34,19 +34,19 @@ if (MORSE_ENABLE_WARNING) if(CMAKE_C_COMPILER_ID MATCHES GNU) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fdiagnostics-show-option") elseif(CMAKE_C_COMPILER_ID MATCHES Intel) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w3 -diag-disable:remark") endif() if(CMAKE_CXX_COMPILER_ID MATCHES GNU) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fdiagnostics-show-option") elseif(CMAKE_CXX_COMPILER_ID MATCHES Intel) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w3 -diag-disable:remark") endif() if(CMAKE_Fortran_COMPILER_ID MATCHES GNU) - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Wall") + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Wall -fdiagnostics-show-option") elseif(CMAKE_Fortran_COMPILER_ID MATCHES Intel) set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -warn all -diag-disable:remark") endif() @@ -56,21 +56,21 @@ endif(MORSE_ENABLE_WARNING) if (MORSE_ENABLE_COVERAGE) if(CMAKE_C_COMPILER_ID MATCHES GNU) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fno-inline --coverage") else() message(FATAL_ERROR "Code coverage is only available with the GNU C (gcc)" "\n compiler, please turn MORSE_ENABLE_COVERAGE OFF\n.") endif() if(CMAKE_CXX_COMPILER_ID MATCHES GNU) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fno-inline --coverage") else() message(FATAL_ERROR "Code coverage is only available with the GNU CXX" "\n (g++) compiler, please turn MORSE_ENABLE_COVERAGE OFF\n.") endif() if(CMAKE_Fortran_COMPILER_ID MATCHES GNU) - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} --coverage") + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fPIC -fno-inline --coverage") else() message(FATAL_ERROR "Code coverage is only available with the GNU" "\n Fortran (gfortran) compiler, please turn MORSE_ENABLE_COVERAGE" diff --git a/CMakeModules/morse/MorseInit.cmake b/CMakeModules/morse/MorseInit.cmake index 1fd1794f67369ddbb0e04e6b5ff5c6a092b113cc..23b6d6c01836592aead1181d78f5912a52b31a5a 100644 --- a/CMakeModules/morse/MorseInit.cmake +++ b/CMakeModules/morse/MorseInit.cmake @@ -30,6 +30,9 @@ # This include is required to check symbols of libs in the main CMakeLists.txt include(CheckFunctionExists) +# This include is required to check defines in headers +include(CheckIncludeFiles) + # To colorize messages #include(ColorizeMessage) diff --git a/CMakeModules/morse/RulesPrecisions.cmake b/CMakeModules/morse/RulesPrecisions.cmake index 7e100c35f4da37069c0deb6de3094b3fdbda377a..341b348d20088942563f9bb57a644604b9f0514c 100644 --- a/CMakeModules/morse/RulesPrecisions.cmake +++ b/CMakeModules/morse/RulesPrecisions.cmake @@ -3,8 +3,7 @@ # @copyright (c) 2009-2014 The University of Tennessee and The University # of Tennessee Research Foundation. # All rights reserved. -# @copyright (c) 2012-2014 Inria. All rights reserved. -# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved. +# @copyright (c) 2012-2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved. # ### # @@ -158,6 +157,10 @@ endif() # the target receives a -DPRECISION_p in its cflags. # include(ParseArguments) + +# Add a hint to help Cmake to find the correct python version: +# (see https://cmake.org/cmake/help/v3.0/module/FindPythonInterp.html) +set(Python_ADDITIONAL_VERSIONS 2) find_package(PythonInterp REQUIRED) MACRO(precisions_rules_py) @@ -237,10 +240,9 @@ MACRO(precisions_rules_py) COMMAND ${CMAKE_COMMAND} -E remove -f ${_dependency_OUTPUT} && ${pythoncmd} && chmod a-w ${_dependency_OUTPUT} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_dependency_INPUT} ${RP_CODEGEN} ${RP_${CMAKE_PROJECT_NAME}_DICTIONNARY}) - set_SOURCE_FILES_PROPERTIES(${_dependency_OUTPUT} PROPERTIES COMPILE_FLAGS "-DPRECISION_${_dependency_PREC}" GENERATED 1 IS_IN_BINARY_DIR 1 ) - + set_source_files_properties(${_dependency_OUTPUT} PROPERTIES COMPILE_FLAGS "-DPRECISION_${_dependency_PREC}" GENERATED 1 IS_IN_BINARY_DIR 1 ) else( generate_out ) - set_SOURCE_FILES_PROPERTIES(${_dependency_OUTPUT} PROPERTIES COMPILE_FLAGS "-DPRECISION_${_dependency_PREC}" GENERATED 0 ) + set_source_files_properties(${_dependency_OUTPUT} PROPERTIES COMPILE_FLAGS "-DPRECISION_${_dependency_PREC}" GENERATED 0 ) endif( generate_out ) list(APPEND ${OUTPUTLIST} ${_dependency_OUTPUT}) diff --git a/CMakeModules/morse/find/FindBLAS.cmake b/CMakeModules/morse/find/FindBLAS.cmake index 9f74b07feb2b7cad89bd372c43639593fee150a9..27a6b4f3edc3164242531d6f5fc257a3221d86ba 100644 --- a/CMakeModules/morse/find/FindBLAS.cmake +++ b/CMakeModules/morse/find/FindBLAS.cmake @@ -3,7 +3,7 @@ # @copyright (c) 2009-2014 The University of Tennessee and The University # of Tennessee Research Foundation. # All rights reserved. -# @copyright (c) 2012-2016 Inria. All rights reserved. +# @copyright (c) 2012-2018 Inria. All rights reserved. # @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved. # ### @@ -30,7 +30,7 @@ # BLA_STATIC if set on this determines what kind of linkage we do (static) # BLA_VENDOR if set checks only the specified vendor, if not set checks # all the possibilities -# BLAS_VENDOR_FOUND stores the BLAS vendor found +# BLAS_VENDOR_FOUND stores the BLAS vendor found # BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK # The user can give specific paths where to find the libraries adding cmake # options at configure (ex: cmake path/to/project -DBLAS_DIR=path/to/blas): @@ -95,18 +95,18 @@ macro(Print_Find_Library_Blas_Status _libname _lib_to_find) else() if(${LIBNAME}_DIR) message("${Yellow}${LIBNAME}_DIR is defined but ${_lib_to_find}" - "has not been found in ${ARGN}${ColourReset}") + "has not been found in ${ARGN}${ColourReset}") else() message("${Yellow}${_lib_to_find} not found." - "Nor ${LIBNAME}_DIR neither ${LIBNAME}_LIBDIR" - "are defined so that we look for ${_lib_to_find} in" - "system paths (Linux: LD_LIBRARY_PATH, Windows: LIB," - "Mac: DYLD_LIBRARY_PATH," - "CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES," - "CMAKE_C_IMPLICIT_LINK_DIRECTORIES)${ColourReset}") + "Nor ${LIBNAME}_DIR neither ${LIBNAME}_LIBDIR" + "are defined so that we look for ${_lib_to_find} in" + "system paths (Linux: LD_LIBRARY_PATH, Windows: LIB," + "Mac: DYLD_LIBRARY_PATH," + "CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES," + "CMAKE_C_IMPLICIT_LINK_DIRECTORIES)${ColourReset}") if(_lib_env) - message("${Yellow}${_lib_to_find} has not been found in" - "${_lib_env}${ColourReset}") + message("${Yellow}${_lib_to_find} has not been found in" + "${_lib_env}${ColourReset}") endif() endif() endif() @@ -192,11 +192,11 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread) list(APPEND _libdir "${BLAS_DIR}") list(APPEND _libdir "${BLAS_DIR}/lib") if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") - list(APPEND _libdir "${BLAS_DIR}/lib64") - list(APPEND _libdir "${BLAS_DIR}/lib/intel64") + list(APPEND _libdir "${BLAS_DIR}/lib64") + list(APPEND _libdir "${BLAS_DIR}/lib/intel64") else() - list(APPEND _libdir "${BLAS_DIR}/lib32") - list(APPEND _libdir "${BLAS_DIR}/lib/ia32") + list(APPEND _libdir "${BLAS_DIR}/lib32") + list(APPEND _libdir "${BLAS_DIR}/lib/ia32") endif() elseif(ENV_BLAS_LIBDIR) list(APPEND _libdir "${ENV_BLAS_LIBDIR}") @@ -204,29 +204,29 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread) list(APPEND _libdir "${ENV_BLAS_DIR}") list(APPEND _libdir "${ENV_BLAS_DIR}/lib") if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") - list(APPEND _libdir "${ENV_BLAS_DIR}/lib64") - list(APPEND _libdir "${ENV_BLAS_DIR}/lib/intel64") + list(APPEND _libdir "${ENV_BLAS_DIR}/lib64") + list(APPEND _libdir "${ENV_BLAS_DIR}/lib/intel64") else() - list(APPEND _libdir "${ENV_BLAS_DIR}/lib32") - list(APPEND _libdir "${ENV_BLAS_DIR}/lib/ia32") + list(APPEND _libdir "${ENV_BLAS_DIR}/lib32") + list(APPEND _libdir "${ENV_BLAS_DIR}/lib/ia32") endif() else() if (ENV_MKLROOT) - list(APPEND _libdir "${ENV_MKLROOT}/lib") - if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") - list(APPEND _libdir "${ENV_MKLROOT}/lib64") - list(APPEND _libdir "${ENV_MKLROOT}/lib/intel64") - else() - list(APPEND _libdir "${ENV_MKLROOT}/lib32") - list(APPEND _libdir "${ENV_MKLROOT}/lib/ia32") - endif() + list(APPEND _libdir "${ENV_MKLROOT}/lib") + if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") + list(APPEND _libdir "${ENV_MKLROOT}/lib64") + list(APPEND _libdir "${ENV_MKLROOT}/lib/intel64") + else() + list(APPEND _libdir "${ENV_MKLROOT}/lib32") + list(APPEND _libdir "${ENV_MKLROOT}/lib/ia32") + endif() endif() if (WIN32) - string(REPLACE ":" ";" _libdir2 "$ENV{LIB}") + string(REPLACE ":" ";" _libdir2 "$ENV{LIB}") elseif (APPLE) - string(REPLACE ":" ";" _libdir2 "$ENV{DYLD_LIBRARY_PATH}") + string(REPLACE ":" ";" _libdir2 "$ENV{DYLD_LIBRARY_PATH}") else () - string(REPLACE ":" ";" _libdir2 "$ENV{LD_LIBRARY_PATH}") + string(REPLACE ":" ";" _libdir2 "$ENV{LD_LIBRARY_PATH}") endif () list(APPEND _libdir "${_libdir2}") list(APPEND _libdir "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") @@ -243,30 +243,29 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread) if(_libraries_work) if (BLA_STATIC) - if (WIN32) - set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) - endif () - if (APPLE) - set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) - else () - set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) - endif () + if (WIN32) + set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) + endif () + if (APPLE) + set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) + else () + set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + endif () else () - if (CMAKE_SYSTEM_NAME STREQUAL "Linux") - # for ubuntu's libblas3gf and liblapack3gf packages - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf) - endif () + if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + # for ubuntu's libblas3gf and liblapack3gf packages + set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf) + endif () endif () find_library(${_prefix}_${_library}_LIBRARY - NAMES ${_library} - HINTS ${_libdir} - NO_DEFAULT_PATH - ) + NAMES ${_library} + HINTS ${_libdir} + ) mark_as_advanced(${_prefix}_${_library}_LIBRARY) # Print status if not found # ------------------------- if (NOT ${_prefix}_${_library}_LIBRARY AND NOT BLAS_FIND_QUIETLY AND BLAS_VERBOSE) - Print_Find_Library_Blas_Status(blas ${_library} ${_libdir}) + Print_Find_Library_Blas_Status(blas ${_library} ${_libdir}) endif () set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) @@ -283,16 +282,16 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread) set(CMAKE_REQUIRED_FLAGS "${BLAS_COMPILER_FLAGS}") if (BLAS_VERBOSE) message("${Cyan}BLAS libs found for BLA_VENDOR ${BLA_VENDOR}." - "Try to compile symbol ${_name} with following libraries:" - "${CMAKE_REQUIRED_LIBRARIES}") + "Try to compile symbol ${_name} with following libraries:" + "${CMAKE_REQUIRED_LIBRARIES}") endif () if(NOT BLAS_FOUND) unset(${_prefix}${_combined_name}_WORKS CACHE) endif() if (_CHECK_FORTRAN) if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") - string(REPLACE "mkl_intel_lp64" "mkl_gf_lp64" CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}") - string(REPLACE "mkl_intel_ilp64" "mkl_gf_ilp64" CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}") + string(REPLACE "mkl_intel_lp64" "mkl_gf_lp64" CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}") + string(REPLACE "mkl_intel_ilp64" "mkl_gf_ilp64" CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}") endif() check_fortran_function_exists("${_name}" ${_prefix}${_combined_name}_WORKS) else() @@ -348,21 +347,21 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") list(APPEND _inc_env "${ENV_BLAS_DIR}/include") else() if (ENV_MKLROOT) - list(APPEND _inc_env "${ENV_MKLROOT}/include") + list(APPEND _inc_env "${ENV_MKLROOT}/include") endif() # system variables if(WIN32) - string(REPLACE ":" ";" _path_env "$ENV{INCLUDE}") - list(APPEND _inc_env "${_path_env}") + string(REPLACE ":" ";" _path_env "$ENV{INCLUDE}") + list(APPEND _inc_env "${_path_env}") else() - string(REPLACE ":" ";" _path_env "$ENV{INCLUDE}") - list(APPEND _inc_env "${_path_env}") - string(REPLACE ":" ";" _path_env "$ENV{C_INCLUDE_PATH}") - list(APPEND _inc_env "${_path_env}") - string(REPLACE ":" ";" _path_env "$ENV{CPATH}") - list(APPEND _inc_env "${_path_env}") - string(REPLACE ":" ";" _path_env "$ENV{INCLUDE_PATH}") - list(APPEND _inc_env "${_path_env}") + string(REPLACE ":" ";" _path_env "$ENV{INCLUDE}") + list(APPEND _inc_env "${_path_env}") + string(REPLACE ":" ";" _path_env "$ENV{C_INCLUDE_PATH}") + list(APPEND _inc_env "${_path_env}") + string(REPLACE ":" ";" _path_env "$ENV{CPATH}") + list(APPEND _inc_env "${_path_env}") + string(REPLACE ":" ";" _path_env "$ENV{INCLUDE_PATH}") + list(APPEND _inc_env "${_path_env}") endif() endif() list(APPEND _inc_env "${CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES}") @@ -378,20 +377,20 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") if(BLAS_INCDIR) set(BLAS_mkl.h_DIRS "BLAS_mkl.h_DIRS-NOTFOUND") find_path(BLAS_mkl.h_DIRS - NAMES mkl.h - HINTS ${BLAS_INCDIR}) + NAMES mkl.h + HINTS ${BLAS_INCDIR}) else() if(BLAS_DIR) - set(BLAS_mkl.h_DIRS "BLAS_mkl.h_DIRS-NOTFOUND") - find_path(BLAS_mkl.h_DIRS - NAMES mkl.h - HINTS ${BLAS_DIR} - PATH_SUFFIXES "include") + set(BLAS_mkl.h_DIRS "BLAS_mkl.h_DIRS-NOTFOUND") + find_path(BLAS_mkl.h_DIRS + NAMES mkl.h + HINTS ${BLAS_DIR} + PATH_SUFFIXES "include") else() - set(BLAS_mkl.h_DIRS "BLAS_mkl.h_DIRS-NOTFOUND") - find_path(BLAS_mkl.h_DIRS - NAMES mkl.h - HINTS ${PATH_TO_LOOK_FOR}) + set(BLAS_mkl.h_DIRS "BLAS_mkl.h_DIRS-NOTFOUND") + find_path(BLAS_mkl.h_DIRS + NAMES mkl.h + HINTS ${PATH_TO_LOOK_FOR}) endif() endif() mark_as_advanced(BLAS_mkl.h_DIRS) @@ -403,7 +402,7 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") else () set(BLAS_INCLUDE_DIRS "BLAS_INCLUDE_DIRS-NOTFOUND") if(NOT BLAS_FIND_QUIETLY) - message(STATUS "Looking for BLAS -- mkl.h not found") + message(STATUS "Looking for BLAS -- mkl.h not found") endif() endif() @@ -436,257 +435,259 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") # choose one or another depending on the compilo if (CMAKE_C_COMPILER_ID STREQUAL "GNU") if (OMP_gomp_LIBRARY) - set(OMP_LIB "${OMP_gomp_LIBRARY}") + set(OMP_LIB "${OMP_gomp_LIBRARY}") endif() else(CMAKE_C_COMPILER_ID STREQUAL "Intel") if (OMP_iomp5_LIBRARY) - set(OMP_LIB "${OMP_iomp5_LIBRARY}") + set(OMP_LIB "${OMP_iomp5_LIBRARY}") endif() endif() if (UNIX AND NOT WIN32) # m find_library(M_LIBRARY - NAMES m - HINTS ${_libdir}) + NAMES m + HINTS ${_libdir}) mark_as_advanced(M_LIBRARY) if(M_LIBRARY) - set(LM "-lm") + set(LM "-lm") else() - set(LM "") + set(LM "") endif() # Fortran set(LGFORTRAN "") if (CMAKE_C_COMPILER_ID MATCHES "GNU") - find_library( - FORTRAN_gfortran_LIBRARY - NAMES gfortran - HINTS ${_libdir} - ) - mark_as_advanced(FORTRAN_gfortran_LIBRARY) - if (FORTRAN_gfortran_LIBRARY) - set(LGFORTRAN "${FORTRAN_gfortran_LIBRARY}") - endif() + find_library( + FORTRAN_gfortran_LIBRARY + NAMES gfortran + HINTS ${_libdir} + ) + mark_as_advanced(FORTRAN_gfortran_LIBRARY) + if (FORTRAN_gfortran_LIBRARY) + set(LGFORTRAN "${FORTRAN_gfortran_LIBRARY}") + endif() elseif (CMAKE_C_COMPILER_ID MATCHES "Intel") - find_library( - FORTRAN_ifcore_LIBRARY - NAMES ifcore - HINTS ${_libdir} - ) - mark_as_advanced(FORTRAN_ifcore_LIBRARY) - if (FORTRAN_ifcore_LIBRARY) - set(LGFORTRAN "{FORTRAN_ifcore_LIBRARY}") - endif() + find_library( + FORTRAN_ifcore_LIBRARY + NAMES ifcore + HINTS ${_libdir} + ) + mark_as_advanced(FORTRAN_ifcore_LIBRARY) + if (FORTRAN_ifcore_LIBRARY) + set(LGFORTRAN "{FORTRAN_ifcore_LIBRARY}") + endif() endif() set(BLAS_COMPILER_FLAGS "") if (NOT BLA_VENDOR STREQUAL "Intel10_64lp_seq") - if (CMAKE_C_COMPILER_ID STREQUAL "Intel") - list(APPEND BLAS_COMPILER_FLAGS "-openmp") - endif() - if (CMAKE_C_COMPILER_ID STREQUAL "GNU") - list(APPEND BLAS_COMPILER_FLAGS "-fopenmp") - endif() + if(BLAS_FIND_REQUIRED) + find_package(OpenMP REQUIRED) + else() + find_package(OpenMP) + endif() + if(OPENMP_C_FLAGS) + list(APPEND BLAS_COMPILER_FLAGS "${OPENMP_C_FLAGS}") + endif() endif() if (CMAKE_C_COMPILER_ID STREQUAL "GNU") - if (BLA_VENDOR STREQUAL "Intel10_32") - list(APPEND BLAS_COMPILER_FLAGS "-m32") - else() - list(APPEND BLAS_COMPILER_FLAGS "-m64") - endif() - if (NOT BLA_VENDOR STREQUAL "Intel10_64lp_seq") - list(APPEND OMP_LIB "-ldl") - endif() - if (ENV_MKLROOT) - list(APPEND BLAS_COMPILER_FLAGS "-I${ENV_MKLROOT}/include") - endif() + if (BLA_VENDOR STREQUAL "Intel10_32") + list(APPEND BLAS_COMPILER_FLAGS "-m32") + else() + list(APPEND BLAS_COMPILER_FLAGS "-m64") + endif() + if (NOT BLA_VENDOR STREQUAL "Intel10_64lp_seq") + list(APPEND OMP_LIB "-ldl") + endif() + if (ENV_MKLROOT) + list(APPEND BLAS_COMPILER_FLAGS "-I${ENV_MKLROOT}/include") + endif() endif() set(additional_flags "") if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_SYSTEM_NAME STREQUAL "Linux") - set(additional_flags "-Wl,--no-as-needed") + set(additional_flags "-Wl,--no-as-needed") endif() endif () if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX) if(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED) - find_package(Threads) + find_package(Threads) else() - find_package(Threads REQUIRED) + find_package(Threads REQUIRED) endif() set(BLAS_SEARCH_LIBS "") if(BLA_F95) - set(BLAS_mkl_SEARCH_SYMBOL SGEMM) - set(_LIBRARIES BLAS95_LIBRARIES) - if (WIN32) - if (BLA_STATIC) - set(BLAS_mkl_DLL_SUFFIX "") - else() - set(BLAS_mkl_DLL_SUFFIX "_dll") - endif() - - # Find the main file (32-bit or 64-bit) - set(BLAS_SEARCH_LIBS_WIN_MAIN "") - if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN - "mkl_blas95${BLAS_mkl_DLL_SUFFIX} mkl_intel_c${BLAS_mkl_DLL_SUFFIX}") - endif() - if (BLA_VENDOR STREQUAL "Intel10_64lp*" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN - "mkl_blas95_lp64${BLAS_mkl_DLL_SUFFIX} mkl_intel_lp64${BLAS_mkl_DLL_SUFFIX}") - endif () - - # Add threading/sequential libs - set(BLAS_SEARCH_LIBS_WIN_THREAD "") - if (BLA_VENDOR STREQUAL "*_seq" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD - "mkl_sequential${BLAS_mkl_DLL_SUFFIX}") - endif() - if (NOT BLA_VENDOR STREQUAL "*_seq" OR BLA_VENDOR STREQUAL "All") - # old version - list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD - "libguide40 mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}") - # mkl >= 10.3 - list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD - "libiomp5md mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}") - endif() - - # Cartesian product of the above - foreach (MAIN ${BLAS_SEARCH_LIBS_WIN_MAIN}) - foreach (THREAD ${BLAS_SEARCH_LIBS_WIN_THREAD}) - list(APPEND BLAS_SEARCH_LIBS - "${MAIN} ${THREAD} mkl_core${BLAS_mkl_DLL_SUFFIX}") - endforeach() - endforeach() - else (WIN32) - if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS - "mkl_blas95 mkl_intel mkl_intel_thread mkl_core guide") - endif () - if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All") - # old version - list(APPEND BLAS_SEARCH_LIBS - "mkl_blas95 mkl_intel_lp64 mkl_intel_thread mkl_core guide") - # mkl >= 10.3 - if (CMAKE_C_COMPILER_ID STREQUAL "Intel") - list(APPEND BLAS_SEARCH_LIBS - "mkl_blas95_lp64 mkl_intel_lp64 mkl_intel_thread mkl_core") - endif() - if (CMAKE_C_COMPILER_ID STREQUAL "GNU") - list(APPEND BLAS_SEARCH_LIBS - "mkl_blas95_lp64 mkl_intel_lp64 mkl_gnu_thread mkl_core") - endif() - endif () - if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS - "mkl_intel_lp64 mkl_sequential mkl_core") - if (BLA_VENDOR STREQUAL "Intel10_64lp_seq") - set(OMP_LIB "") - endif() - endif () - endif (WIN32) + set(BLAS_mkl_SEARCH_SYMBOL SGEMM) + set(_LIBRARIES BLAS95_LIBRARIES) + if (WIN32) + if (BLA_STATIC) + set(BLAS_mkl_DLL_SUFFIX "") + else() + set(BLAS_mkl_DLL_SUFFIX "_dll") + endif() + + # Find the main file (32-bit or 64-bit) + set(BLAS_SEARCH_LIBS_WIN_MAIN "") + if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN + "mkl_blas95${BLAS_mkl_DLL_SUFFIX} mkl_intel_c${BLAS_mkl_DLL_SUFFIX}") + endif() + if (BLA_VENDOR STREQUAL "Intel10_64lp*" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN + "mkl_blas95_lp64${BLAS_mkl_DLL_SUFFIX} mkl_intel_lp64${BLAS_mkl_DLL_SUFFIX}") + endif () + + # Add threading/sequential libs + set(BLAS_SEARCH_LIBS_WIN_THREAD "") + if (BLA_VENDOR STREQUAL "*_seq" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD + "mkl_sequential${BLAS_mkl_DLL_SUFFIX}") + endif() + if (NOT BLA_VENDOR STREQUAL "*_seq" OR BLA_VENDOR STREQUAL "All") + # old version + list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD + "libguide40 mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}") + # mkl >= 10.3 + list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD + "libiomp5md mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}") + endif() + + # Cartesian product of the above + foreach (MAIN ${BLAS_SEARCH_LIBS_WIN_MAIN}) + foreach (THREAD ${BLAS_SEARCH_LIBS_WIN_THREAD}) + list(APPEND BLAS_SEARCH_LIBS + "${MAIN} ${THREAD} mkl_core${BLAS_mkl_DLL_SUFFIX}") + endforeach() + endforeach() + else (WIN32) + if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS + "mkl_blas95 mkl_intel mkl_intel_thread mkl_core guide") + endif () + if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All") + # old version + list(APPEND BLAS_SEARCH_LIBS + "mkl_blas95 mkl_intel_lp64 mkl_intel_thread mkl_core guide") + # mkl >= 10.3 + if (CMAKE_C_COMPILER_ID STREQUAL "Intel") + list(APPEND BLAS_SEARCH_LIBS + "mkl_blas95_lp64 mkl_intel_lp64 mkl_intel_thread mkl_core") + endif() + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") + list(APPEND BLAS_SEARCH_LIBS + "mkl_blas95_lp64 mkl_intel_lp64 mkl_gnu_thread mkl_core") + endif() + endif () + if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS + "mkl_intel_lp64 mkl_sequential mkl_core") + if (BLA_VENDOR STREQUAL "Intel10_64lp_seq") + set(OMP_LIB "") + endif() + endif () + endif (WIN32) else (BLA_F95) - set(BLAS_mkl_SEARCH_SYMBOL sgemm) - set(_LIBRARIES BLAS_LIBRARIES) - if (WIN32) - if (BLA_STATIC) - set(BLAS_mkl_DLL_SUFFIX "") - else() - set(BLAS_mkl_DLL_SUFFIX "_dll") - endif() - - # Find the main file (32-bit or 64-bit) - set(BLAS_SEARCH_LIBS_WIN_MAIN "") - if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN - "mkl_intel_c${BLAS_mkl_DLL_SUFFIX}") - endif() - if (BLA_VENDOR STREQUAL "Intel10_64lp*" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN - "mkl_intel_lp64${BLAS_mkl_DLL_SUFFIX}") - endif () - - # Add threading/sequential libs - set(BLAS_SEARCH_LIBS_WIN_THREAD "") - if (NOT BLA_VENDOR STREQUAL "*_seq" OR BLA_VENDOR STREQUAL "All") - # old version - list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD - "libguide40 mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}") - # mkl >= 10.3 - list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD - "libiomp5md mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}") - endif() - if (BLA_VENDOR STREQUAL "*_seq" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD - "mkl_sequential${BLAS_mkl_DLL_SUFFIX}") - endif() - - # Cartesian product of the above - foreach (MAIN ${BLAS_SEARCH_LIBS_WIN_MAIN}) - foreach (THREAD ${BLAS_SEARCH_LIBS_WIN_THREAD}) - list(APPEND BLAS_SEARCH_LIBS - "${MAIN} ${THREAD} mkl_core${BLAS_mkl_DLL_SUFFIX}") - endforeach() - endforeach() - else (WIN32) - if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS - "mkl_intel mkl_intel_thread mkl_core guide") - endif () - if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All") - # old version - list(APPEND BLAS_SEARCH_LIBS - "mkl_intel_lp64 mkl_intel_thread mkl_core guide") - # mkl >= 10.3 - if (CMAKE_C_COMPILER_ID STREQUAL "Intel") - list(APPEND BLAS_SEARCH_LIBS - "mkl_intel_lp64 mkl_intel_thread mkl_core") - endif() - if (CMAKE_C_COMPILER_ID STREQUAL "GNU") - list(APPEND BLAS_SEARCH_LIBS - "mkl_intel_lp64 mkl_gnu_thread mkl_core") - endif() - endif () - if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS - "mkl_intel_lp64 mkl_sequential mkl_core") - if (BLA_VENDOR STREQUAL "Intel10_64lp_seq") - set(OMP_LIB "") - endif() - endif () - #older vesions of intel mkl libs - if (BLA_VENDOR STREQUAL "Intel" OR BLA_VENDOR STREQUAL "All") - list(APPEND BLAS_SEARCH_LIBS - "mkl") - list(APPEND BLAS_SEARCH_LIBS - "mkl_ia32") - list(APPEND BLAS_SEARCH_LIBS - "mkl_em64t") - endif () - endif (WIN32) + set(BLAS_mkl_SEARCH_SYMBOL sgemm) + set(_LIBRARIES BLAS_LIBRARIES) + if (WIN32) + if (BLA_STATIC) + set(BLAS_mkl_DLL_SUFFIX "") + else() + set(BLAS_mkl_DLL_SUFFIX "_dll") + endif() + + # Find the main file (32-bit or 64-bit) + set(BLAS_SEARCH_LIBS_WIN_MAIN "") + if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN + "mkl_intel_c${BLAS_mkl_DLL_SUFFIX}") + endif() + if (BLA_VENDOR STREQUAL "Intel10_64lp*" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS_WIN_MAIN + "mkl_intel_lp64${BLAS_mkl_DLL_SUFFIX}") + endif () + + # Add threading/sequential libs + set(BLAS_SEARCH_LIBS_WIN_THREAD "") + if (NOT BLA_VENDOR STREQUAL "*_seq" OR BLA_VENDOR STREQUAL "All") + # old version + list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD + "libguide40 mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}") + # mkl >= 10.3 + list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD + "libiomp5md mkl_intel_thread${BLAS_mkl_DLL_SUFFIX}") + endif() + if (BLA_VENDOR STREQUAL "*_seq" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS_WIN_THREAD + "mkl_sequential${BLAS_mkl_DLL_SUFFIX}") + endif() + + # Cartesian product of the above + foreach (MAIN ${BLAS_SEARCH_LIBS_WIN_MAIN}) + foreach (THREAD ${BLAS_SEARCH_LIBS_WIN_THREAD}) + list(APPEND BLAS_SEARCH_LIBS + "${MAIN} ${THREAD} mkl_core${BLAS_mkl_DLL_SUFFIX}") + endforeach() + endforeach() + else (WIN32) + if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS + "mkl_intel mkl_intel_thread mkl_core guide") + endif () + if (BLA_VENDOR STREQUAL "Intel10_64lp" OR BLA_VENDOR STREQUAL "All") + # old version + list(APPEND BLAS_SEARCH_LIBS + "mkl_intel_lp64 mkl_intel_thread mkl_core guide") + # mkl >= 10.3 + if (CMAKE_C_COMPILER_ID STREQUAL "Intel") + list(APPEND BLAS_SEARCH_LIBS + "mkl_intel_lp64 mkl_intel_thread mkl_core") + endif() + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") + list(APPEND BLAS_SEARCH_LIBS + "mkl_intel_lp64 mkl_gnu_thread mkl_core") + endif() + endif () + if (BLA_VENDOR STREQUAL "Intel10_64lp_seq" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS + "mkl_intel_lp64 mkl_sequential mkl_core") + if (BLA_VENDOR STREQUAL "Intel10_64lp_seq") + set(OMP_LIB "") + endif() + endif () + #older vesions of intel mkl libs + if (BLA_VENDOR STREQUAL "Intel" OR BLA_VENDOR STREQUAL "All") + list(APPEND BLAS_SEARCH_LIBS + "mkl") + list(APPEND BLAS_SEARCH_LIBS + "mkl_ia32") + list(APPEND BLAS_SEARCH_LIBS + "mkl_em64t") + endif () + endif (WIN32) endif (BLA_F95) foreach (IT ${BLAS_SEARCH_LIBS}) - string(REPLACE " " ";" SEARCH_LIBS ${IT}) - if (${_LIBRARIES}) - else () - check_fortran_libraries( - ${_LIBRARIES} - BLAS - ${BLAS_mkl_SEARCH_SYMBOL} - "${additional_flags}" - "${SEARCH_LIBS}" - "${OMP_LIB};${CMAKE_THREAD_LIBS_INIT};${LM}" - ) - if(_LIBRARIES) - set(BLAS_LINKER_FLAGS "${additional_flags}") - endif() - endif() + string(REPLACE " " ";" SEARCH_LIBS ${IT}) + if (${_LIBRARIES}) + else () + check_fortran_libraries( + ${_LIBRARIES} + BLAS + ${BLAS_mkl_SEARCH_SYMBOL} + "${additional_flags}" + "${SEARCH_LIBS}" + "${OMP_LIB};${CMAKE_THREAD_LIBS_INIT};${LM}" + ) + if(_LIBRARIES) + set(BLAS_LINKER_FLAGS "${additional_flags}") + endif() + endif() endforeach () if(NOT BLAS_FIND_QUIETLY) if(${_LIBRARIES}) @@ -717,9 +718,9 @@ if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") ) if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES) - message(STATUS "Looking for Goto BLAS: found") + message(STATUS "Looking for Goto BLAS: found") else() - message(STATUS "Looking for Goto BLAS: not found") + message(STATUS "Looking for Goto BLAS: not found") endif() endif() endif() @@ -745,9 +746,9 @@ if (BLA_VENDOR STREQUAL "Open" OR BLA_VENDOR STREQUAL "All") ) if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES) - message(STATUS "Looking for Open BLAS: found") + message(STATUS "Looking for Open BLAS: found") else() - message(STATUS "Looking for Open BLAS: not found") + message(STATUS "Looking for Open BLAS: not found") endif() endif() endif() @@ -773,9 +774,9 @@ if (BLA_VENDOR STREQUAL "Eigen" OR BLA_VENDOR STREQUAL "All") ) if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND) - message(STATUS "Looking for Eigen BLAS: found") + message(STATUS "Looking for Eigen BLAS: found") else() - message(STATUS "Looking for Eigen BLAS: not found") + message(STATUS "Looking for Eigen BLAS: not found") endif() endif() endif() @@ -792,9 +793,9 @@ if (BLA_VENDOR STREQUAL "Eigen" OR BLA_VENDOR STREQUAL "All") ) if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES) - message(STATUS "Looking for Eigen BLAS: found") + message(STATUS "Looking for Eigen BLAS: found") else() - message(STATUS "Looking for Eigen BLAS: not found") + message(STATUS "Looking for Eigen BLAS: not found") endif() endif() endif() @@ -819,9 +820,9 @@ if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All") ) if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES) - message(STATUS "Looking for Atlas BLAS: found") + message(STATUS "Looking for Atlas BLAS: found") else() - message(STATUS "Looking for Atlas BLAS: not found") + message(STATUS "Looking for Atlas BLAS: not found") endif() endif() endif() @@ -847,9 +848,9 @@ if (BLA_VENDOR STREQUAL "PhiPACK" OR BLA_VENDOR STREQUAL "All") ) if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES) - message(STATUS "Looking for PhiPACK BLAS: found") + message(STATUS "Looking for PhiPACK BLAS: found") else() - message(STATUS "Looking for PhiPACK BLAS: not found") + message(STATUS "Looking for PhiPACK BLAS: not found") endif() endif() endif() @@ -875,9 +876,9 @@ if (BLA_VENDOR STREQUAL "CXML" OR BLA_VENDOR STREQUAL "All") ) if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES) - message(STATUS "Looking for CXML BLAS: found") + message(STATUS "Looking for CXML BLAS: found") else() - message(STATUS "Looking for CXML BLAS: not found") + message(STATUS "Looking for CXML BLAS: not found") endif() endif() endif() @@ -903,9 +904,9 @@ if (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All") ) if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES) - message(STATUS "Looking for DXML BLAS: found") + message(STATUS "Looking for DXML BLAS: found") else() - message(STATUS "Looking for DXML BLAS: not found") + message(STATUS "Looking for DXML BLAS: not found") endif() endif() endif() @@ -913,7 +914,7 @@ if (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All") if (BLAS_LIBRARIES AND NOT BLAS_VENDOR_FOUND) set (BLAS_VENDOR_FOUND "DXML") endif() - + endif (BLA_VENDOR STREQUAL "DXML" OR BLA_VENDOR STREQUAL "All") @@ -934,9 +935,9 @@ if (BLA_VENDOR STREQUAL "SunPerf" OR BLA_VENDOR STREQUAL "All") endif() if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES) - message(STATUS "Looking for SunPerf BLAS: found") + message(STATUS "Looking for SunPerf BLAS: found") else() - message(STATUS "Looking for SunPerf BLAS: not found") + message(STATUS "Looking for SunPerf BLAS: not found") endif() endif() endif() @@ -962,9 +963,9 @@ if (BLA_VENDOR STREQUAL "SCSL" OR BLA_VENDOR STREQUAL "All") ) if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES) - message(STATUS "Looking for SCSL BLAS: found") + message(STATUS "Looking for SCSL BLAS: found") else() - message(STATUS "Looking for SCSL BLAS: not found") + message(STATUS "Looking for SCSL BLAS: not found") endif() endif() endif() @@ -990,9 +991,9 @@ if (BLA_VENDOR STREQUAL "SGIMATH" OR BLA_VENDOR STREQUAL "All") ) if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES) - message(STATUS "Looking for SGIMATH BLAS: found") + message(STATUS "Looking for SGIMATH BLAS: found") else() - message(STATUS "Looking for SGIMATH BLAS: not found") + message(STATUS "Looking for SGIMATH BLAS: not found") endif() endif() endif() @@ -1018,9 +1019,9 @@ if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All") ) if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES) - message(STATUS "Looking for IBM ESSL BLAS: found") + message(STATUS "Looking for IBM ESSL BLAS: found") else() - message(STATUS "Looking for IBM ESSL BLAS: not found") + message(STATUS "Looking for IBM ESSL BLAS: not found") endif() endif() endif() @@ -1045,9 +1046,9 @@ if (BLA_VENDOR STREQUAL "IBMESSLMT" OR BLA_VENDOR STREQUAL "All") ) if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES) - message(STATUS "Looking for IBM ESSL MT BLAS: found") + message(STATUS "Looking for IBM ESSL MT BLAS: found") else() - message(STATUS "Looking for IBM ESSL MT BLAS: not found") + message(STATUS "Looking for IBM ESSL MT BLAS: not found") endif() endif() endif() @@ -1084,44 +1085,44 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All") get_filename_component( _ACML_ROOT ${_ACML_ROOT} PATH ) if( SIZEOF_INTEGER EQUAL 8 ) - set( _ACML_PATH_SUFFIX "_int64" ) + set( _ACML_PATH_SUFFIX "_int64" ) else() - set( _ACML_PATH_SUFFIX "" ) + set( _ACML_PATH_SUFFIX "" ) endif() if( CMAKE_Fortran_COMPILER_ID STREQUAL "Intel" ) - set( _ACML_COMPILER32 "ifort32" ) - set( _ACML_COMPILER64 "ifort64" ) + set( _ACML_COMPILER32 "ifort32" ) + set( _ACML_COMPILER64 "ifort64" ) elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "SunPro" ) - set( _ACML_COMPILER32 "sun32" ) - set( _ACML_COMPILER64 "sun64" ) + set( _ACML_COMPILER32 "sun32" ) + set( _ACML_COMPILER64 "sun64" ) elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "PGI" ) - set( _ACML_COMPILER32 "pgi32" ) - if( WIN32 ) - set( _ACML_COMPILER64 "win64" ) - else() - set( _ACML_COMPILER64 "pgi64" ) - endif() + set( _ACML_COMPILER32 "pgi32" ) + if( WIN32 ) + set( _ACML_COMPILER64 "win64" ) + else() + set( _ACML_COMPILER64 "pgi64" ) + endif() elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "Open64" ) - # 32 bit builds not supported on Open64 but for code simplicity - # We'll just use the same directory twice - set( _ACML_COMPILER32 "open64_64" ) - set( _ACML_COMPILER64 "open64_64" ) + # 32 bit builds not supported on Open64 but for code simplicity + # We'll just use the same directory twice + set( _ACML_COMPILER32 "open64_64" ) + set( _ACML_COMPILER64 "open64_64" ) elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "NAG" ) - set( _ACML_COMPILER32 "nag32" ) - set( _ACML_COMPILER64 "nag64" ) + set( _ACML_COMPILER32 "nag32" ) + set( _ACML_COMPILER64 "nag64" ) else() - set( _ACML_COMPILER32 "gfortran32" ) - set( _ACML_COMPILER64 "gfortran64" ) + set( _ACML_COMPILER32 "gfortran32" ) + set( _ACML_COMPILER64 "gfortran64" ) endif() if( BLA_VENDOR STREQUAL "ACML_MP" ) - set(_ACML_MP_LIB_DIRS - "${_ACML_ROOT}/${_ACML_COMPILER32}_mp${_ACML_PATH_SUFFIX}/lib" - "${_ACML_ROOT}/${_ACML_COMPILER64}_mp${_ACML_PATH_SUFFIX}/lib" ) + set(_ACML_MP_LIB_DIRS + "${_ACML_ROOT}/${_ACML_COMPILER32}_mp${_ACML_PATH_SUFFIX}/lib" + "${_ACML_ROOT}/${_ACML_COMPILER64}_mp${_ACML_PATH_SUFFIX}/lib" ) else() - set(_ACML_LIB_DIRS - "${_ACML_ROOT}/${_ACML_COMPILER32}${_ACML_PATH_SUFFIX}/lib" - "${_ACML_ROOT}/${_ACML_COMPILER64}${_ACML_PATH_SUFFIX}/lib" ) + set(_ACML_LIB_DIRS + "${_ACML_ROOT}/${_ACML_COMPILER32}${_ACML_PATH_SUFFIX}/lib" + "${_ACML_ROOT}/${_ACML_COMPILER64}${_ACML_PATH_SUFFIX}/lib" ) endif() endif(_ACML_ROOT) @@ -1135,37 +1136,37 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All") if( BLA_VENDOR STREQUAL "ACML_MP" ) foreach( BLAS_ACML_MP_LIB_DIRS ${_ACML_MP_LIB_DIRS}) check_fortran_libraries ( - BLAS_LIBRARIES - BLAS - sgemm - "" "acml_mp;acml_mv" "" ${BLAS_ACML_MP_LIB_DIRS} - ) + BLAS_LIBRARIES + BLAS + sgemm + "" "acml_mp;acml_mv" "" ${BLAS_ACML_MP_LIB_DIRS} + ) if( BLAS_LIBRARIES ) - break() + break() endif() endforeach() elseif( BLA_VENDOR STREQUAL "ACML_GPU" ) foreach( BLAS_ACML_GPU_LIB_DIRS ${_ACML_GPU_LIB_DIRS}) check_fortran_libraries ( - BLAS_LIBRARIES - BLAS - sgemm - "" "acml;acml_mv;CALBLAS" "" ${BLAS_ACML_GPU_LIB_DIRS} - ) + BLAS_LIBRARIES + BLAS + sgemm + "" "acml;acml_mv;CALBLAS" "" ${BLAS_ACML_GPU_LIB_DIRS} + ) if( BLAS_LIBRARIES ) - break() + break() endif() endforeach() else() foreach( BLAS_ACML_LIB_DIRS ${_ACML_LIB_DIRS} ) check_fortran_libraries ( - BLAS_LIBRARIES - BLAS - sgemm - "" "acml;acml_mv" "" ${BLAS_ACML_LIB_DIRS} - ) + BLAS_LIBRARIES + BLAS + sgemm + "" "acml;acml_mv" "" ${BLAS_ACML_LIB_DIRS} + ) if( BLAS_LIBRARIES ) - break() + break() endif() endforeach() endif() @@ -1182,9 +1183,9 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All") ) if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES) - message(STATUS "Looking for ACML BLAS: found") + message(STATUS "Looking for ACML BLAS: found") else() - message(STATUS "Looking for ACML BLAS: not found") + message(STATUS "Looking for ACML BLAS: not found") endif() endif() endif() @@ -1200,9 +1201,9 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All") ) if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES) - message(STATUS "Looking for ACML BLAS: found") + message(STATUS "Looking for ACML BLAS: found") else() - message(STATUS "Looking for ACML BLAS: not found") + message(STATUS "Looking for ACML BLAS: not found") endif() endif() endif() @@ -1218,9 +1219,9 @@ if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All") ) if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES) - message(STATUS "Looking for ACML BLAS: found") + message(STATUS "Looking for ACML BLAS: found") else() - message(STATUS "Looking for ACML BLAS: not found") + message(STATUS "Looking for ACML BLAS: not found") endif() endif() endif() @@ -1246,9 +1247,9 @@ if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") ) if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES) - message(STATUS "Looking for Apple BLAS: found") + message(STATUS "Looking for Apple BLAS: found") else() - message(STATUS "Looking for Apple BLAS: not found") + message(STATUS "Looking for Apple BLAS: not found") endif() endif() endif() @@ -1273,9 +1274,9 @@ if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") ) if(NOT BLAS_FIND_QUIETLY) if(BLAS_LIBRARIES) - message(STATUS "Looking for NAS BLAS: found") + message(STATUS "Looking for NAS BLAS: found") else() - message(STATUS "Looking for NAS BLAS: not found") + message(STATUS "Looking for NAS BLAS: not found") endif() endif() endif () @@ -1295,19 +1296,19 @@ if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All") if (BLAS_LIBRARIES) else () check_fortran_libraries( - BLAS_LIBRARIES - BLAS - sgemm - "" - "${SEARCH_LIB}" - "${LGFORTRAN}" - ) + BLAS_LIBRARIES + BLAS + sgemm + "" + "${SEARCH_LIB}" + "${LGFORTRAN}" + ) if(NOT BLAS_FIND_QUIETLY) - if(BLAS_LIBRARIES) - message(STATUS "Looking for Generic BLAS: found") - else() - message(STATUS "Looking for Generic BLAS: not found") - endif() + if(BLAS_LIBRARIES) + message(STATUS "Looking for Generic BLAS: found") + else() + message(STATUS "Looking for Generic BLAS: not found") + endif() endif() endif() endforeach () @@ -1333,32 +1334,38 @@ if(BLA_F95) message(STATUS "BLAS_LIBRARIES ${BLAS_LIBRARIES}") else(BLAS95_FOUND) message(WARNING "BLA_VENDOR has been set to ${BLA_VENDOR} but blas 95 libraries could not be found or check of symbols failed." - "\nPlease indicate where to find blas libraries. You have three options:\n" - "- Option 1: Provide the installation directory of BLAS library with cmake option: -DBLAS_DIR=your/path/to/blas\n" - "- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\n" - "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n" - "\nTo follow libraries detection more precisely you can activate a verbose mode with -DBLAS_VERBOSE=ON at cmake configure." - "\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name." - "\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit)," - "Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model), Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model)," - "Intel( older versions of mkl 32 and 64 bit), ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic") + "\nPlease indicate where to find blas libraries. You have three options:\n" + "- Option 1: Provide the installation directory of BLAS library with cmake option: -DBLAS_DIR=your/path/to/blas\n" + "- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\n" + "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n" + "\nTo follow libraries detection more precisely you can activate a verbose mode with -DBLAS_VERBOSE=ON at cmake configure." + "\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name." + "\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit)," + "Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model), Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model)," + "Intel( older versions of mkl 32 and 64 bit), ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic") if(BLAS_FIND_REQUIRED) - message(FATAL_ERROR - "A required library with BLAS95 API not found. Please specify library location.") + message(FATAL_ERROR + "A required library with BLAS95 API not found. Please specify library location.") else() - message(STATUS - "A library with BLAS95 API not found. Please specify library location.") + message(STATUS + "A library with BLAS95 API not found. Please specify library location.") endif() endif(BLAS95_FOUND) endif(NOT BLAS_FIND_QUIETLY) set(BLAS_FOUND TRUE) set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}") + if (NOT BLAS_LIBRARIES_DEP) + set(BLAS_LIBRARIES_DEP "${BLAS95_LIBRARIES}") + endif() else(BLA_F95) if(BLAS_LIBRARIES) set(BLAS_FOUND TRUE) + if (NOT BLAS_LIBRARIES_DEP) + set(BLAS_LIBRARIES_DEP "${BLAS_LIBRARIES}") + endif() else() set(BLAS_FOUND FALSE) endif() @@ -1369,21 +1376,21 @@ else(BLA_F95) message(STATUS "BLAS_LIBRARIES ${BLAS_LIBRARIES}") else(BLAS_FOUND) message(WARNING "BLA_VENDOR has been set to ${BLA_VENDOR} but blas libraries could not be found or check of symbols failed." - "\nPlease indicate where to find blas libraries. You have three options:\n" - "- Option 1: Provide the installation directory of BLAS library with cmake option: -DBLAS_DIR=your/path/to/blas\n" - "- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\n" - "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n" - "\nTo follow libraries detection more precisely you can activate a verbose mode with -DBLAS_VERBOSE=ON at cmake configure." - "\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name." - "\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit)," - "Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model), Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model)," - "Intel( older versions of mkl 32 and 64 bit), ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic") + "\nPlease indicate where to find blas libraries. You have three options:\n" + "- Option 1: Provide the installation directory of BLAS library with cmake option: -DBLAS_DIR=your/path/to/blas\n" + "- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\n" + "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n" + "\nTo follow libraries detection more precisely you can activate a verbose mode with -DBLAS_VERBOSE=ON at cmake configure." + "\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name." + "\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit)," + "Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model), Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model)," + "Intel( older versions of mkl 32 and 64 bit), ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic") if(BLAS_FIND_REQUIRED) - message(FATAL_ERROR - "A required library with BLAS API not found. Please specify library location.") + message(FATAL_ERROR + "A required library with BLAS API not found. Please specify library location.") else() - message(STATUS - "A library with BLAS API not found. Please specify library location.") + message(STATUS + "A library with BLAS API not found. Please specify library location.") endif() endif(BLAS_FOUND) endif(NOT BLAS_FIND_QUIETLY) @@ -1395,6 +1402,9 @@ set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) if (BLAS_FOUND) list(GET BLAS_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + if (NOT BLAS_LIBRARY_DIRS) + set(BLAS_LIBRARY_DIRS "${first_lib_path}") + endif() if (${first_lib_path} MATCHES "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)") string(REGEX REPLACE "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)" "" not_cached_dir "${first_lib_path}") set(BLAS_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of BLAS library" FORCE) diff --git a/CMakeModules/morse/find/FindBLASEXT.cmake b/CMakeModules/morse/find/FindBLASEXT.cmake index 0fe7fb84931bacf4f7879be412c6abf37c44d175..a12a199983db4fa00a888570f3ac06595d74e22b 100644 --- a/CMakeModules/morse/find/FindBLASEXT.cmake +++ b/CMakeModules/morse/find/FindBLASEXT.cmake @@ -3,7 +3,7 @@ # @copyright (c) 2009-2014 The University of Tennessee and The University # of Tennessee Research Foundation. # All rights reserved. -# @copyright (c) 2012-2016 Inria. All rights reserved. +# @copyright (c) 2012-2017 Inria. All rights reserved. # @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved. # ### @@ -18,17 +18,27 @@ # # The following variables have been added to manage links with sequential or multithreaded # versions: -# BLAS_INCLUDE_DIRS - BLAS include directories -# BLAS_LIBRARY_DIRS - Link directories for BLAS libraries -# BLAS_SEQ_LIBRARIES - BLAS component libraries to be linked (sequential) -# BLAS_PAR_LIBRARIES - BLAS component libraries to be linked (multithreaded) +# BLAS_INCLUDE_DIRS - BLAS include directories +# BLAS_LIBRARY_DIRS - Link directories for BLAS libraries +# BLAS_SEQ_LIBRARIES - BLAS component libraries to be linked (sequential) +# BLAS_SEQ_COMPILER_FLAGS - uncached list of required compiler flags (including -I for mkl headers). +# BLAS_SEQ_LINKER_FLAGS - uncached list of required linker flags (excluding -l +# and -L) +# BLAS_PAR_LIBRARIES - BLAS component libraries to be linked (multithreaded) +# BLAS_PAR_COMPILER_FLAGS - uncached list of required compiler flags (including -I for mkl headers) +# BLAS_PAR_LINKER_FLAGS - uncached list of required linker flags (excluding -l +# and -L) +# BLASEXT_FOUND - if a BLAS has been found +# BLASEXT_LIBRARIES - Idem BLAS_LIBRARIES +# BLASEXT_INCLUDE_DIRS - Idem BLAS_INCLUDE_DIRS +# BLASEXT_LIBRARY_DIRS - Idem BLAS_LIBRARY_DIRS #============================================================================= # Copyright 2012-2013 Inria # Copyright 2012-2013 Emmanuel Agullo # Copyright 2012-2013 Mathieu Faverge # Copyright 2012 Cedric Castagnede -# Copyright 2013-2016 Florent Pruvost +# Copyright 2013-2017 Florent Pruvost # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file MORSE-Copyright.txt for details. @@ -40,9 +50,10 @@ # (To distribute this file outside of Morse, substitute the full # License text for the above reference.) -# macro to factorize this call -macro(find_package_blas) - if(BLASEXT_FIND_REQUIRED) +# Macro to factorize this call. required arguments allows to decide if +# the REQUIRED option must be given to find_package calls +macro(find_package_blas required) + if(BLASEXT_FIND_REQUIRED AND required) if(BLASEXT_FIND_QUIETLY) find_package(BLAS REQUIRED QUIET) else() @@ -80,10 +91,9 @@ if(NOT BLASEXT_FIND_QUIETLY) endif() if (NOT BLAS_FOUND) - # First try to detect two cases: - # 1: only SEQ libs are handled - # 2: both SEQ and PAR libs are handled - find_package_blas() + # First blas detection in order to decide if we should look for a + # multitheaded version + find_package_blas(0) endif () # detect the cases where SEQ and PAR libs are handled @@ -161,14 +171,14 @@ if(BLA_VENDOR MATCHES "Intel*") if(BLAS_DIR) set(BLAS_mkl.h_INCLUDE_DIRS "BLAS_mkl.h_INCLUDE_DIRS-NOTFOUND") find_path(BLAS_mkl.h_INCLUDE_DIRS - NAMES mkl.h - HINTS ${BLAS_DIR} - PATH_SUFFIXES include) + NAMES mkl.h + HINTS ${BLAS_DIR} + PATH_SUFFIXES include) else() set(BLAS_mkl.h_INCLUDE_DIRS "BLAS_mkl.h_INCLUDE_DIRS-NOTFOUND") find_path(BLAS_mkl.h_INCLUDE_DIRS - NAMES mkl.h - HINTS ${_inc_env}) + NAMES mkl.h + HINTS ${_inc_env}) endif() endif() mark_as_advanced(BLAS_mkl.h_INCLUDE_DIRS) @@ -193,9 +203,15 @@ if(BLA_VENDOR MATCHES "Intel*") if(NOT BLASEXT_FIND_QUIETLY) message(STATUS "Look for the sequential version Intel10_64lp_seq") endif() - find_package_blas() + find_package_blas(0) if(BLAS_FOUND) set(BLAS_SEQ_LIBRARIES "${BLAS_LIBRARIES}") + if (BLAS_COMPILER_FLAGS) + set (BLAS_SEQ_COMPILER_FLAGS "${BLAS_COMPILER_FLAGS}") + endif() + if (BLAS_LINKER_FLAGS) + set (BLAS_SEQ_LINKER_FLAGS "${BLAS_LINKER_FLAGS}") + endif() else() set(BLAS_SEQ_LIBRARIES "${BLAS_SEQ_LIBRARIES-NOTFOUND}") endif() @@ -205,9 +221,15 @@ if(BLA_VENDOR MATCHES "Intel*") if(NOT BLASEXT_FIND_QUIETLY) message(STATUS "Look for the multithreaded version Intel10_64lp") endif() - find_package_blas() + find_package_blas(0) if(BLAS_FOUND) set(BLAS_PAR_LIBRARIES "${BLAS_LIBRARIES}") + if (BLAS_COMPILER_FLAGS) + set (BLAS_PAR_COMPILER_FLAGS "${BLAS_COMPILER_FLAGS}") + endif() + if (BLAS_LINKER_FLAGS) + set (BLAS_PAR_LINKER_FLAGS "${BLAS_LINKER_FLAGS}") + endif() else() set(BLAS_PAR_LIBRARIES "${BLAS_PAR_LIBRARIES-NOTFOUND}") endif() @@ -227,7 +249,7 @@ elseif(BLA_VENDOR MATCHES "ACML*") ## look for the sequential version set(BLA_VENDOR "ACML") - find_package_blas() + find_package_blas(0) if(BLAS_FOUND) set(BLAS_SEQ_LIBRARIES "${BLAS_LIBRARIES}") else() @@ -236,7 +258,7 @@ elseif(BLA_VENDOR MATCHES "ACML*") ## look for the multithreaded version set(BLA_VENDOR "ACML_MP") - find_package_blas() + find_package_blas(0) if(BLAS_FOUND) set(BLAS_PAR_LIBRARIES "${BLAS_LIBRARIES}") else() @@ -248,7 +270,7 @@ elseif(BLA_VENDOR MATCHES "IBMESSL*") ## look for the sequential version set(BLA_VENDOR "IBMESSL") - find_package_blas() + find_package_blas(0) if(BLAS_FOUND) set(BLAS_SEQ_LIBRARIES "${BLAS_LIBRARIES}") else() @@ -257,7 +279,7 @@ elseif(BLA_VENDOR MATCHES "IBMESSL*") ## look for the multithreaded version set(BLA_VENDOR "IBMESSLMT") - find_package_blas() + find_package_blas(0) if(BLAS_FOUND) set(BLAS_PAR_LIBRARIES "${BLAS_LIBRARIES}") else() @@ -276,9 +298,11 @@ else() endif() - +# Reset pure BLAS cmake variables to the sequential case (arbitrary default) if(BLAS_SEQ_LIBRARIES) set(BLAS_LIBRARIES "${BLAS_SEQ_LIBRARIES}") + set(BLAS_COMPILER_FLAGS "${BLAS_SEQ_COMPILER_FLAGS}") + set(BLAS_LINKER_FLAGS "${BLAS_SEQ_LINKER_FLAGS}") endif() # extract libs paths @@ -296,7 +320,7 @@ foreach(blas_lib ${BLAS_LIBRARIES}) else() get_filename_component(a_blas_lib_dir "${blas_lib}" PATH) if (EXISTS "${a_blas_lib_dir}") - list(APPEND BLAS_LIBRARY_DIRS "${a_blas_lib_dir}" ) + list(APPEND BLAS_LIBRARY_DIRS "${a_blas_lib_dir}" ) endif() endif() endif() @@ -305,76 +329,70 @@ if (BLAS_LIBRARY_DIRS) list(REMOVE_DUPLICATES BLAS_LIBRARY_DIRS) endif () -# check that BLAS has been found +# check that BLASEXT has been found # --------------------------------- include(FindPackageHandleStandardArgs) if(BLA_VENDOR MATCHES "Intel*") - if(BLA_VENDOR MATCHES "Intel10_64lp*") - if(NOT BLASEXT_FIND_QUIETLY) - message(STATUS "BLAS found is Intel MKL:" - "\n we manage two lists of libs, one sequential and one parallel if found" - "\n (see BLAS_SEQ_LIBRARIES and BLAS_PAR_LIBRARIES)") - message(STATUS "BLAS sequential libraries stored in BLAS_SEQ_LIBRARIES") - endif() - find_package_handle_standard_args(BLAS DEFAULT_MSG - BLAS_SEQ_LIBRARIES - BLAS_LIBRARY_DIRS - BLAS_INCLUDE_DIRS) - if(BLAS_PAR_LIBRARIES) - if(NOT BLASEXT_FIND_QUIETLY) - message(STATUS "BLAS parallel libraries stored in BLAS_PAR_LIBRARIES") - endif() - find_package_handle_standard_args(BLAS DEFAULT_MSG - BLAS_PAR_LIBRARIES) - endif() - else() + if(NOT BLASEXT_FIND_QUIETLY) + message(STATUS "BLAS found is Intel MKL") + message(STATUS "BLAS sequential libraries stored in BLAS_SEQ_LIBRARIES") + endif() + find_package_handle_standard_args(BLASEXT DEFAULT_MSG + BLAS_SEQ_LIBRARIES + BLAS_LIBRARY_DIRS + BLAS_INCLUDE_DIRS) + if(BLA_VENDOR MATCHES "Intel10_64lp*" AND BLAS_PAR_LIBRARIES) if(NOT BLASEXT_FIND_QUIETLY) - message(STATUS "BLAS sequential libraries stored in BLAS_SEQ_LIBRARIES") + message(STATUS "BLAS parallel libraries stored in BLAS_PAR_LIBRARIES") endif() - find_package_handle_standard_args(BLAS DEFAULT_MSG - BLAS_SEQ_LIBRARIES - BLAS_LIBRARY_DIRS - BLAS_INCLUDE_DIRS) + find_package_handle_standard_args(BLASEXT DEFAULT_MSG + BLAS_PAR_LIBRARIES) endif() elseif(BLA_VENDOR MATCHES "ACML*") if(NOT BLASEXT_FIND_QUIETLY) - message(STATUS "BLAS found is ACML:" - "\n we manage two lists of libs, one sequential and one parallel if found" - "\n (see BLAS_SEQ_LIBRARIES and BLAS_PAR_LIBRARIES)") + message(STATUS "BLAS found is ACML") message(STATUS "BLAS sequential libraries stored in BLAS_SEQ_LIBRARIES") endif() - find_package_handle_standard_args(BLAS DEFAULT_MSG + find_package_handle_standard_args(BLASEXT DEFAULT_MSG BLAS_SEQ_LIBRARIES BLAS_LIBRARY_DIRS) if(BLAS_PAR_LIBRARIES) if(NOT BLASEXT_FIND_QUIETLY) message(STATUS "BLAS parallel libraries stored in BLAS_PAR_LIBRARIES") endif() - find_package_handle_standard_args(BLAS DEFAULT_MSG + find_package_handle_standard_args(BLASEXT DEFAULT_MSG BLAS_PAR_LIBRARIES) endif() elseif(BLA_VENDOR MATCHES "IBMESSL*") if(NOT BLASEXT_FIND_QUIETLY) - message(STATUS "BLAS found is ESSL:" - "\n we manage two lists of libs, one sequential and one parallel if found" - "\n (see BLAS_SEQ_LIBRARIES and BLAS_PAR_LIBRARIES)") + message(STATUS "BLAS found is ESSL") message(STATUS "BLAS sequential libraries stored in BLAS_SEQ_LIBRARIES") endif() - find_package_handle_standard_args(BLAS DEFAULT_MSG + find_package_handle_standard_args(BLASEXT DEFAULT_MSG BLAS_SEQ_LIBRARIES BLAS_LIBRARY_DIRS) if(BLAS_PAR_LIBRARIES) if(NOT BLASEXT_FIND_QUIETLY) message(STATUS "BLAS parallel libraries stored in BLAS_PAR_LIBRARIES") endif() - find_package_handle_standard_args(BLAS DEFAULT_MSG + find_package_handle_standard_args(BLASEXT DEFAULT_MSG BLAS_PAR_LIBRARIES) endif() else() if(NOT BLASEXT_FIND_QUIETLY) message(STATUS "BLAS sequential libraries stored in BLAS_SEQ_LIBRARIES") endif() - find_package_handle_standard_args(BLAS DEFAULT_MSG + find_package_handle_standard_args(BLASEXT DEFAULT_MSG BLAS_SEQ_LIBRARIES BLAS_LIBRARY_DIRS) endif() + +if (BLAS_LIBRARIES) + set(BLASEXT_LIBRARIES ${BLAS_LIBRARIES}) +endif() +if (BLAS_INCLUDE_DIRS) + set(BLASEXT_INCLUDE_DIRS ${BLAS_INCLUDE_DIRS}) +endif() +if (BLAS_LIBRARY_DIRS) + set(BLASEXT_LIBRARY_DIRS ${BLAS_LIBRARY_DIRS}) +endif() diff --git a/CMakeModules/morse/find/FindCBLAS.cmake b/CMakeModules/morse/find/FindCBLAS.cmake index 550236a6ca8ecc235d463373959fcb08a4bcf09c..81f4ddf565d3544600350b6f82b7535bbd2c3994 100644 --- a/CMakeModules/morse/find/FindCBLAS.cmake +++ b/CMakeModules/morse/find/FindCBLAS.cmake @@ -372,6 +372,9 @@ endif(BLAS_FOUND) if (CBLAS_LIBRARIES) list(GET CBLAS_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + if (NOT CBLAS_LIBRARY_DIRS) + set(CBLAS_LIBRARY_DIRS "${first_lib_path}") + endif() if (${first_lib_path} MATCHES "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)") string(REGEX REPLACE "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)" "" not_cached_dir "${first_lib_path}") set(CBLAS_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of CBLAS library" FORCE) diff --git a/CMakeModules/morse/find/FindCHAMELEON.cmake b/CMakeModules/morse/find/FindCHAMELEON.cmake index 3be331e5b8b2d3c163bc34dde4efcfeadfc3c3f3..60c0b5caa9415f9caf4e4d12fc5d7d21a0f00e56 100644 --- a/CMakeModules/morse/find/FindCHAMELEON.cmake +++ b/CMakeModules/morse/find/FindCHAMELEON.cmake @@ -141,28 +141,28 @@ if(PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_GIVEN_BY_USER) #endif() else() message(STATUS "${Magenta}Looking for CHAMELEON - not found using PkgConfig." - "\n Perhaps you should add the directory containing chameleon.pc" - "\n to the PKG_CONFIG_PATH environment variable.${ColourReset}") + "\n Perhaps you should add the directory containing chameleon.pc" + "\n to the PKG_CONFIG_PATH environment variable.${ColourReset}") endif() endif() if (CHAMELEON_FIND_VERSION_EXACT) if( NOT (CHAMELEON_FIND_VERSION_MAJOR STREQUAL CHAMELEON_VERSION_MAJOR) OR - NOT (CHAMELEON_FIND_VERSION_MINOR STREQUAL CHAMELEON_VERSION_MINOR) ) + NOT (CHAMELEON_FIND_VERSION_MINOR STREQUAL CHAMELEON_VERSION_MINOR) ) if(NOT CHAMELEON_FIND_QUIETLY) - message(FATAL_ERROR - "CHAMELEON version found is ${CHAMELEON_VERSION_STRING}" - "when required is ${CHAMELEON_FIND_VERSION}") + message(FATAL_ERROR + "CHAMELEON version found is ${CHAMELEON_VERSION_STRING}" + "when required is ${CHAMELEON_FIND_VERSION}") endif() endif() else() # if the version found is older than the required then error if( (CHAMELEON_FIND_VERSION_MAJOR STRGREATER CHAMELEON_VERSION_MAJOR) OR - (CHAMELEON_FIND_VERSION_MINOR STRGREATER CHAMELEON_VERSION_MINOR) ) + (CHAMELEON_FIND_VERSION_MINOR STRGREATER CHAMELEON_VERSION_MINOR) ) if(NOT CHAMELEON_FIND_QUIETLY) - message(FATAL_ERROR - "CHAMELEON version found is ${CHAMELEON_VERSION_STRING}" - "when required is ${CHAMELEON_FIND_VERSION} or newer") + message(FATAL_ERROR + "CHAMELEON version found is ${CHAMELEON_VERSION_STRING}" + "when required is ${CHAMELEON_FIND_VERSION} or newer") endif() endif() endif() @@ -213,8 +213,8 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_FOUN list(APPEND CHAMELEON_EXTRA_LIBRARIES "${CHAMELEON_M_m_LIBRARY}") else() if (CHAMELEON_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find libm on your system." - "Are you sure to a have a C compiler installed?") + message(FATAL_ERROR "Could NOT find libm on your system." + "Are you sure to a have a C compiler installed?") endif() endif() endif() @@ -236,7 +236,7 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_FOUN list(APPEND CHAMELEON_EXTRA_LIBRARIES "${CHAMELEON_RT_rt_LIBRARY}") else() if (CHAMELEON_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find librt on your system") + message(FATAL_ERROR "Could NOT find librt on your system") endif() endif() endif() @@ -345,7 +345,7 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_FOUN # at cmake configure if (CHAMELEON_LOOK_FOR_MPI) if(NOT MPI_C_COMPILER) - set(MPI_C_COMPILER mpicc) + set(MPI_C_COMPILER mpicc) endif() list(APPEND STARPU_COMPONENT_LIST "MPI") endif() @@ -357,10 +357,10 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_FOUN endif() if (CHAMELEON_FIND_REQUIRED AND CHAMELEON_FIND_REQUIRED_STARPU) find_package(STARPU ${CHAMELEON_STARPU_VERSION} REQUIRED - COMPONENTS ${STARPU_COMPONENT_LIST}) + COMPONENTS ${STARPU_COMPONENT_LIST}) else() find_package(STARPU ${CHAMELEON_STARPU_VERSION} - COMPONENTS ${STARPU_COMPONENT_LIST}) + COMPONENTS ${STARPU_COMPONENT_LIST}) endif() endif() @@ -421,15 +421,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_FOUN if(CHAMELEON_DIR) set(CHAMELEON_morse.h_DIRS "CHAMELEON_morse.h_DIRS-NOTFOUND") find_path(CHAMELEON_morse.h_DIRS - NAMES morse.h - HINTS ${CHAMELEON_DIR} - PATH_SUFFIXES "include" "include/chameleon") + NAMES morse.h + HINTS ${CHAMELEON_DIR} + PATH_SUFFIXES "include" "include/chameleon") else() set(CHAMELEON_morse.h_DIRS "CHAMELEON_morse.h_DIRS-NOTFOUND") find_path(CHAMELEON_morse.h_DIRS - NAMES morse.h - HINTS ${_inc_env} - PATH_SUFFIXES "chameleon") + NAMES morse.h + HINTS ${_inc_env} + PATH_SUFFIXES "chameleon") endif() endif() mark_as_advanced(CHAMELEON_morse.h_DIRS) @@ -463,9 +463,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_FOUN string(REPLACE ":" ";" _lib_env "$ENV{LIB}") else() if(APPLE) - string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") else() - string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") endif() list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") @@ -490,24 +490,24 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_FOUN foreach(chameleon_lib ${CHAMELEON_libs_to_find}) set(CHAMELEON_${chameleon_lib}_LIBRARY "CHAMELEON_${chameleon_lib}_LIBRARY-NOTFOUND") find_library(CHAMELEON_${chameleon_lib}_LIBRARY - NAMES ${chameleon_lib} - HINTS ${CHAMELEON_LIBDIR}) + NAMES ${chameleon_lib} + HINTS ${CHAMELEON_LIBDIR}) endforeach() else() if(CHAMELEON_DIR) foreach(chameleon_lib ${CHAMELEON_libs_to_find}) - set(CHAMELEON_${chameleon_lib}_LIBRARY "CHAMELEON_${chameleon_lib}_LIBRARY-NOTFOUND") - find_library(CHAMELEON_${chameleon_lib}_LIBRARY - NAMES ${chameleon_lib} - HINTS ${CHAMELEON_DIR} - PATH_SUFFIXES lib lib32 lib64) + set(CHAMELEON_${chameleon_lib}_LIBRARY "CHAMELEON_${chameleon_lib}_LIBRARY-NOTFOUND") + find_library(CHAMELEON_${chameleon_lib}_LIBRARY + NAMES ${chameleon_lib} + HINTS ${CHAMELEON_DIR} + PATH_SUFFIXES lib lib32 lib64) endforeach() else() foreach(chameleon_lib ${CHAMELEON_libs_to_find}) - set(CHAMELEON_${chameleon_lib}_LIBRARY "CHAMELEON_${chameleon_lib}_LIBRARY-NOTFOUND") - find_library(CHAMELEON_${chameleon_lib}_LIBRARY - NAMES ${chameleon_lib} - HINTS ${_lib_env}) + set(CHAMELEON_${chameleon_lib}_LIBRARY "CHAMELEON_${chameleon_lib}_LIBRARY-NOTFOUND") + find_library(CHAMELEON_${chameleon_lib}_LIBRARY + NAMES ${chameleon_lib} + HINTS ${_lib_env}) endforeach() endif() endif() @@ -546,180 +546,180 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_FOUN endif() foreach(libdir ${CHAMELEON_LIBRARY_DIRS}) if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") + list(APPEND REQUIRED_LIBDIRS "${libdir}") endif() endforeach() set(REQUIRED_LIBS "${CHAMELEON_LIBRARIES}") # STARPU if (STARPU_FOUND AND CHAMELEON_LOOK_FOR_STARPU) if (STARPU_INCLUDE_DIRS_DEP) - list(APPEND REQUIRED_INCDIRS "${STARPU_INCLUDE_DIRS_DEP}") + list(APPEND REQUIRED_INCDIRS "${STARPU_INCLUDE_DIRS_DEP}") elseif (STARPU_INCLUDE_DIRS) - list(APPEND REQUIRED_INCDIRS "${STARPU_INCLUDE_DIRS}") + list(APPEND REQUIRED_INCDIRS "${STARPU_INCLUDE_DIRS}") endif() if(STARPU_LIBRARY_DIRS_DEP) - list(APPEND REQUIRED_LIBDIRS "${STARPU_LIBRARY_DIRS_DEP}") + list(APPEND REQUIRED_LIBDIRS "${STARPU_LIBRARY_DIRS_DEP}") elseif(STARPU_LIBRARY_DIRS) - list(APPEND REQUIRED_LIBDIRS "${STARPU_LIBRARY_DIRS}") + list(APPEND REQUIRED_LIBDIRS "${STARPU_LIBRARY_DIRS}") endif() if (STARPU_LIBRARIES_DEP) - list(APPEND REQUIRED_LIBS "${STARPU_LIBRARIES_DEP}") + list(APPEND REQUIRED_LIBS "${STARPU_LIBRARIES_DEP}") elseif (STARPU_LIBRARIES) - foreach(lib ${STARPU_LIBRARIES}) - if (EXISTS ${lib} OR ${lib} MATCHES "^-") - list(APPEND REQUIRED_LIBS "${lib}") - else() - list(APPEND REQUIRED_LIBS "-l${lib}") - endif() - endforeach() + foreach(lib ${STARPU_LIBRARIES}) + if (EXISTS ${lib} OR ${lib} MATCHES "^-") + list(APPEND REQUIRED_LIBS "${lib}") + else() + list(APPEND REQUIRED_LIBS "-l${lib}") + endif() + endforeach() endif() endif() # QUARK if (QUARK_FOUND AND CHAMELEON_LOOK_FOR_QUARK) if (QUARK_INCLUDE_DIRS_DEP) - list(APPEND REQUIRED_INCDIRS "${QUARK_INCLUDE_DIRS_DEP}") + list(APPEND REQUIRED_INCDIRS "${QUARK_INCLUDE_DIRS_DEP}") elseif(QUARK_INCLUDE_DIRS) - list(APPEND REQUIRED_INCDIRS "${QUARK_INCLUDE_DIRS}") + list(APPEND REQUIRED_INCDIRS "${QUARK_INCLUDE_DIRS}") endif() if(QUARK_LIBRARY_DIRS_DEP) - list(APPEND REQUIRED_LIBDIRS "${QUARK_LIBRARY_DIRS_DEP}") + list(APPEND REQUIRED_LIBDIRS "${QUARK_LIBRARY_DIRS_DEP}") elseif(QUARK_LIBRARY_DIRS) - list(APPEND REQUIRED_LIBDIRS "${QUARK_LIBRARY_DIRS}") + list(APPEND REQUIRED_LIBDIRS "${QUARK_LIBRARY_DIRS}") endif() if (QUARK_LIBRARY_DIRS_DEP) - list(APPEND REQUIRED_LIBS "${QUARK_LIBRARIES_DEP}") + list(APPEND REQUIRED_LIBS "${QUARK_LIBRARIES_DEP}") elseif (QUARK_LIBRARY_DIRS_DEP) - list(APPEND REQUIRED_LIBS "${QUARK_LIBRARIES}") + list(APPEND REQUIRED_LIBS "${QUARK_LIBRARIES}") endif() endif() # CUDA if (CUDA_FOUND AND CHAMELEON_LOOK_FOR_CUDA) if (CUDA_INCLUDE_DIRS) - list(APPEND REQUIRED_INCDIRS "${CUDA_INCLUDE_DIRS}") + list(APPEND REQUIRED_INCDIRS "${CUDA_INCLUDE_DIRS}") endif() foreach(libdir ${CUDA_LIBRARY_DIRS}) - if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") - endif() + if (libdir) + list(APPEND REQUIRED_LIBDIRS "${libdir}") + endif() endforeach() list(APPEND REQUIRED_LIBS "${CUDA_CUBLAS_LIBRARIES};${CUDA_LIBRARIES}") endif() # MAGMA if (MAGMA_FOUND AND CHAMELEON_LOOK_FOR_MAGMA) if (MAGMA_INCLUDE_DIRS_DEP) - list(APPEND REQUIRED_INCDIRS "${MAGMA_INCLUDE_DIRS_DEP}") + list(APPEND REQUIRED_INCDIRS "${MAGMA_INCLUDE_DIRS_DEP}") elseif(MAGMA_INCLUDE_DIRS) - list(APPEND REQUIRED_INCDIRS "${MAGMA_INCLUDE_DIRS}") + list(APPEND REQUIRED_INCDIRS "${MAGMA_INCLUDE_DIRS}") endif() if (MAGMA_LIBRARY_DIRS_DEP) - list(APPEND REQUIRED_LIBDIRS "${MAGMA_LIBRARY_DIRS_DEP}") + list(APPEND REQUIRED_LIBDIRS "${MAGMA_LIBRARY_DIRS_DEP}") elseif(MAGMA_LIBRARY_DIRS) - list(APPEND REQUIRED_LIBDIRS "${MAGMA_LIBRARY_DIRS}") + list(APPEND REQUIRED_LIBDIRS "${MAGMA_LIBRARY_DIRS}") endif() if (MAGMA_LIBRARIES_DEP) - list(APPEND REQUIRED_LIBS "${MAGMA_LIBRARIES_DEP}") + list(APPEND REQUIRED_LIBS "${MAGMA_LIBRARIES_DEP}") elseif(MAGMA_LIBRARIES) - foreach(lib ${MAGMA_LIBRARIES}) - if (EXISTS ${lib} OR ${lib} MATCHES "^-") - list(APPEND REQUIRED_LIBS "${lib}") - else() - list(APPEND REQUIRED_LIBS "-l${lib}") - endif() - endforeach() + foreach(lib ${MAGMA_LIBRARIES}) + if (EXISTS ${lib} OR ${lib} MATCHES "^-") + list(APPEND REQUIRED_LIBS "${lib}") + else() + list(APPEND REQUIRED_LIBS "-l${lib}") + endif() + endforeach() endif() endif() # MPI if (MPI_FOUND AND CHAMELEON_LOOK_FOR_MPI) if (MPI_C_INCLUDE_PATH) - list(APPEND REQUIRED_INCDIRS "${MPI_C_INCLUDE_PATH}") + list(APPEND REQUIRED_INCDIRS "${MPI_C_INCLUDE_PATH}") endif() if (MPI_C_LINK_FLAGS) - if (${MPI_C_LINK_FLAGS} MATCHES " -") - string(REGEX REPLACE " -" "-" MPI_C_LINK_FLAGS ${MPI_C_LINK_FLAGS}) - endif() - list(APPEND REQUIRED_LDFLAGS "${MPI_C_LINK_FLAGS}") + if (${MPI_C_LINK_FLAGS} MATCHES " -") + string(REGEX REPLACE " -" "-" MPI_C_LINK_FLAGS ${MPI_C_LINK_FLAGS}) + endif() + list(APPEND REQUIRED_LDFLAGS "${MPI_C_LINK_FLAGS}") endif() list(APPEND REQUIRED_LIBS "${MPI_C_LIBRARIES}") endif() # HWLOC if (HWLOC_FOUND) if (HWLOC_INCLUDE_DIRS) - list(APPEND REQUIRED_INCDIRS "${HWLOC_INCLUDE_DIRS}") + list(APPEND REQUIRED_INCDIRS "${HWLOC_INCLUDE_DIRS}") endif() foreach(libdir ${HWLOC_LIBRARY_DIRS}) - if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") - endif() + if (libdir) + list(APPEND REQUIRED_LIBDIRS "${libdir}") + endif() endforeach() foreach(lib ${HWLOC_LIBRARIES}) - if (EXISTS ${lib} OR ${lib} MATCHES "^-") - list(APPEND REQUIRED_LIBS "${lib}") - else() - list(APPEND REQUIRED_LIBS "-l${lib}") - endif() + if (EXISTS ${lib} OR ${lib} MATCHES "^-") + list(APPEND REQUIRED_LIBS "${lib}") + else() + list(APPEND REQUIRED_LIBS "-l${lib}") + endif() endforeach() endif() # TMG if (TMG_FOUND) if (TMG_INCLUDE_DIRS_DEP) - list(APPEND REQUIRED_INCDIRS "${TMG_INCLUDE_DIRS_DEP}") + list(APPEND REQUIRED_INCDIRS "${TMG_INCLUDE_DIRS_DEP}") elseif (TMG_INCLUDE_DIRS) - list(APPEND REQUIRED_INCDIRS "${TMG_INCLUDE_DIRS}") + list(APPEND REQUIRED_INCDIRS "${TMG_INCLUDE_DIRS}") endif() if(TMG_LIBRARY_DIRS_DEP) - list(APPEND REQUIRED_LIBDIRS "${TMG_LIBRARY_DIRS_DEP}") + list(APPEND REQUIRED_LIBDIRS "${TMG_LIBRARY_DIRS_DEP}") elseif(TMG_LIBRARY_DIRS) - list(APPEND REQUIRED_LIBDIRS "${TMG_LIBRARY_DIRS}") + list(APPEND REQUIRED_LIBDIRS "${TMG_LIBRARY_DIRS}") endif() if (TMG_LIBRARIES_DEP) - list(APPEND REQUIRED_LIBS "${TMG_LIBRARIES_DEP}") + list(APPEND REQUIRED_LIBS "${TMG_LIBRARIES_DEP}") elseif(TMG_LIBRARIES) - list(APPEND REQUIRED_LIBS "${TMG_LIBRARIES}") + list(APPEND REQUIRED_LIBS "${TMG_LIBRARIES}") endif() if (TMG_LINKER_FLAGS) - list(APPEND REQUIRED_LDFLAGS "${TMG_LINKER_FLAGS}") + list(APPEND REQUIRED_LDFLAGS "${TMG_LINKER_FLAGS}") endif() endif() # LAPACKE if (LAPACKE_FOUND) if (LAPACKE_INCLUDE_DIRS_DEP) - list(APPEND REQUIRED_INCDIRS "${LAPACKE_INCLUDE_DIRS_DEP}") + list(APPEND REQUIRED_INCDIRS "${LAPACKE_INCLUDE_DIRS_DEP}") elseif (LAPACKE_INCLUDE_DIRS) - list(APPEND REQUIRED_INCDIRS "${LAPACKE_INCLUDE_DIRS}") + list(APPEND REQUIRED_INCDIRS "${LAPACKE_INCLUDE_DIRS}") endif() if(LAPACKE_LIBRARY_DIRS_DEP) - list(APPEND REQUIRED_LIBDIRS "${LAPACKE_LIBRARY_DIRS_DEP}") + list(APPEND REQUIRED_LIBDIRS "${LAPACKE_LIBRARY_DIRS_DEP}") elseif(LAPACKE_LIBRARY_DIRS) - list(APPEND REQUIRED_LIBDIRS "${LAPACKE_LIBRARY_DIRS}") + list(APPEND REQUIRED_LIBDIRS "${LAPACKE_LIBRARY_DIRS}") endif() if (LAPACKE_LIBRARIES_DEP) - list(APPEND REQUIRED_LIBS "${LAPACKE_LIBRARIES_DEP}") + list(APPEND REQUIRED_LIBS "${LAPACKE_LIBRARIES_DEP}") elseif(LAPACKE_LIBRARIES) - list(APPEND REQUIRED_LIBS "${LAPACKE_LIBRARIES}") + list(APPEND REQUIRED_LIBS "${LAPACKE_LIBRARIES}") endif() if (LAPACK_LINKER_FLAGS) - list(APPEND REQUIRED_LDFLAGS "${LAPACK_LINKER_FLAGS}") + list(APPEND REQUIRED_LDFLAGS "${LAPACK_LINKER_FLAGS}") endif() endif() # CBLAS if (CBLAS_FOUND) if (CBLAS_INCLUDE_DIRS_DEP) - list(APPEND REQUIRED_INCDIRS "${CBLAS_INCLUDE_DIRS_DEP}") + list(APPEND REQUIRED_INCDIRS "${CBLAS_INCLUDE_DIRS_DEP}") elseif (CBLAS_INCLUDE_DIRS) - list(APPEND REQUIRED_INCDIRS "${CBLAS_INCLUDE_DIRS}") + list(APPEND REQUIRED_INCDIRS "${CBLAS_INCLUDE_DIRS}") endif() if(CBLAS_LIBRARY_DIRS_DEP) - list(APPEND REQUIRED_LIBDIRS "${CBLAS_LIBRARY_DIRS_DEP}") + list(APPEND REQUIRED_LIBDIRS "${CBLAS_LIBRARY_DIRS_DEP}") elseif(CBLAS_LIBRARY_DIRS) - list(APPEND REQUIRED_LIBDIRS "${CBLAS_LIBRARY_DIRS}") + list(APPEND REQUIRED_LIBDIRS "${CBLAS_LIBRARY_DIRS}") endif() if (CBLAS_LIBRARIES_DEP) - list(APPEND REQUIRED_LIBS "${CBLAS_LIBRARIES_DEP}") + list(APPEND REQUIRED_LIBS "${CBLAS_LIBRARIES_DEP}") elseif(CBLAS_LIBRARIES) - list(APPEND REQUIRED_LIBS "${CBLAS_LIBRARIES}") + list(APPEND REQUIRED_LIBS "${CBLAS_LIBRARIES}") endif() if (BLAS_LINKER_FLAGS) - list(APPEND REQUIRED_LDFLAGS "${BLAS_LINKER_FLAGS}") + list(APPEND REQUIRED_LDFLAGS "${BLAS_LINKER_FLAGS}") endif() endif() # EXTRA LIBS such that pthread, m, rt @@ -752,13 +752,13 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT CHAMELEON_FOUN list(REMOVE_DUPLICATES CHAMELEON_LINKER_FLAGS) else() if(NOT CHAMELEON_FIND_QUIETLY) - message(STATUS "Looking for chameleon : test of MORSE_Init fails") - message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") - message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") - message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") - message(STATUS "Maybe CHAMELEON is linked with specific libraries. " - "Have you tried with COMPONENTS (STARPU/QUARK, CUDA, MAGMA, MPI, FXT)? " - "See the explanation in FindCHAMELEON.cmake.") + message(STATUS "Looking for chameleon : test of MORSE_Init fails") + message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") + message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") + message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") + message(STATUS "Maybe CHAMELEON is linked with specific libraries. " + "Have you tried with COMPONENTS (STARPU/QUARK, CUDA, MAGMA, MPI, FXT)? " + "See the explanation in FindCHAMELEON.cmake.") endif() endif() set(CMAKE_REQUIRED_INCLUDES) @@ -772,12 +772,13 @@ if (CHAMELEON_LIBRARIES) if (CHAMELEON_LIBRARY_DIRS) foreach(dir ${CHAMELEON_LIBRARY_DIRS}) if ("${dir}" MATCHES "chameleon") - set(first_lib_path "${dir}") + set(first_lib_path "${dir}") endif() endforeach() else() list(GET CHAMELEON_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + set(CHAMELEON_LIBRARY_DIRS "${first_lib_path}") endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") diff --git a/CMakeModules/morse/find/FindEZTRACE.cmake b/CMakeModules/morse/find/FindEZTRACE.cmake index 4c7447a86d581959ae81e502f46f49b62b65313e..68f5106b7633d9e4f8004eeea0d3e47a91b7260f 100644 --- a/CMakeModules/morse/find/FindEZTRACE.cmake +++ b/CMakeModules/morse/find/FindEZTRACE.cmake @@ -82,8 +82,8 @@ if( PKG_CONFIG_EXECUTABLE AND NOT EZTRACE_GIVEN_BY_USER ) #endif() else() message(STATUS "${Magenta}Looking for EZTRACE - not found using PkgConfig." - "\n Perhaps you should add the directory containing eztrace.pc to" - "\n the PKG_CONFIG_PATH environment variable.${ColourReset}") + "\n Perhaps you should add the directory containing eztrace.pc to" + "\n the PKG_CONFIG_PATH environment variable.${ColourReset}") endif() endif() @@ -180,15 +180,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT EZTRACE_FOUND) if(EZTRACE_DIR) set(EZTRACE_eztrace.h_DIRS "EZTRACE_eztrace.h_DIRS-NOTFOUND") find_path(EZTRACE_eztrace.h_DIRS - NAMES eztrace.h - HINTS ${EZTRACE_DIR} - PATH_SUFFIXES "include" "include/eztrace") + NAMES eztrace.h + HINTS ${EZTRACE_DIR} + PATH_SUFFIXES "include" "include/eztrace") else() set(EZTRACE_eztrace.h_DIRS "EZTRACE_eztrace.h_DIRS-NOTFOUND") find_path(EZTRACE_eztrace.h_DIRS - NAMES eztrace.h - HINTS ${PATH_TO_LOOK_FOR} - PATH_SUFFIXES "eztrace") + NAMES eztrace.h + HINTS ${PATH_TO_LOOK_FOR} + PATH_SUFFIXES "eztrace") endif() endif() mark_as_advanced(EZTRACE_eztrace.h_DIRS) @@ -225,9 +225,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT EZTRACE_FOUND) string(REPLACE ":" ";" _lib_env "$ENV{LIB}") else() if(APPLE) - string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") else() - string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") endif() list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") @@ -251,14 +251,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT EZTRACE_FOUND) if(EZTRACE_DIR) set(EZTRACE_eztrace_LIBRARY "EZTRACE_eztrace_LIBRARY-NOTFOUND") find_library(EZTRACE_eztrace_LIBRARY - NAMES eztrace - HINTS ${EZTRACE_DIR} - PATH_SUFFIXES lib lib32 lib64) + NAMES eztrace + HINTS ${EZTRACE_DIR} + PATH_SUFFIXES lib lib32 lib64) else() set(EZTRACE_eztrace_LIBRARY "EZTRACE_eztrace_LIBRARY-NOTFOUND") find_library(EZTRACE_eztrace_LIBRARY - NAMES eztrace - HINTS ${PATH_TO_LOOK_FOR}) + NAMES eztrace + HINTS ${PATH_TO_LOOK_FOR}) endif() endif() mark_as_advanced(EZTRACE_eztrace_LIBRARY) @@ -315,10 +315,10 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT EZTRACE_FOUND) if(NOT EZTRACE_WORKS) if(NOT EZTRACE_FIND_QUIETLY) - message(STATUS "Looking for eztrace : test of eztrace_topology_init with eztrace library fails") - message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") - message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") - message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") + message(STATUS "Looking for eztrace : test of eztrace_topology_init with eztrace library fails") + message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") + message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") + message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") endif() endif() set(CMAKE_REQUIRED_INCLUDES) @@ -334,6 +334,7 @@ if (EZTRACE_LIBRARIES) else() list(GET EZTRACE_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + set(EZTRACE_LIBRARY_DIRS "${first_lib_path}") endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") diff --git a/CMakeModules/morse/find/FindFABULOUS.cmake b/CMakeModules/morse/find/FindFABULOUS.cmake index 321ab43d01c662a915b8910f7f911ddbf9656241..9d353ca70908818349457faa8b987f6d69df04e4 100644 --- a/CMakeModules/morse/find/FindFABULOUS.cmake +++ b/CMakeModules/morse/find/FindFABULOUS.cmake @@ -7,9 +7,10 @@ # Once done this will define # FABULOUS_FOUND - System has fabulous # FABULOUS_INCLUDE_DIRS - The fabulous include directories +# FABULOUS_MODULE_DIRS - The fabulous module directories for Fortran API # FABULOUS_LIBRARIES - The libraries needed to use fabulous # FABULOUS_DEFINITIONS - Compiler switches required for using fabulous - +# include(FindPackageHandleStandardArgs) macro(FABULOUS_FIND_LIBRARIES_FROM_PKGCONFIG_RESULTS _prefix _pc_xprefix) @@ -115,6 +116,8 @@ if ((NOT FABULOUS_FOUND) AND (FABULOUS_GIVEN_BY_USER OR (NOT PKG_CONFIG_FOUND))) endif() find_path(FABULOUS_INCLUDE_DIRS NAMES fabulous.h HINTS ${FABULOUS_INCDIR}) + find_path(FABULOUS_MODULE_DIRS NAMES fabulous_mod.mod HINTS ${FABULOUS_INCDIR} + PATH_SUFFIXES fabulous) find_library(FABULOUS_STATIC_LIBRARY NAMES libfabulous.a HINTS ${FABULOUS_LIBDIR}) find_library(FABULOUS_SHARED_LIBRARY NAMES libfabulous.so HINTS ${FABULOUS_LIBDIR}) else() @@ -127,6 +130,9 @@ if ((NOT FABULOUS_FOUND) AND (FABULOUS_GIVEN_BY_USER OR (NOT PKG_CONFIG_FOUND))) find_path(FABULOUS_INCLUDE_DIRS NAMES fabulous.h HINTS ${FABULOUS_DIR} PATH_SUFFIXES include include/fabulous) + find_path(FABULOUS_MODULE_DIRS NAMES fabulous_mod.mod + HINTS ${FABULOUS_DIR} + PATH_SUFFIXES include include/fabulous) find_library(FABULOUS_STATIC_LIBRARY NAMES libfabulous.a HINTS ${FABULOUS_DIR} PATH_SUFFIXES lib lib32 lib64 lib/fabulous lib32/fabulous lib64/fabulous) @@ -139,17 +145,18 @@ if ((NOT FABULOUS_FOUND) AND (FABULOUS_GIVEN_BY_USER OR (NOT PKG_CONFIG_FOUND))) find_package_handle_standard_args(FABULOUS_SHARED DEFAULT_MSG FABULOUS_SHARED_LIBRARY) mark_as_advanced(FABULOUS_STATIC_LIBRARY FABULOUS_SHARED_LIBRARY) + if (FABULOUS_FIND_REQUIRED) + find_package(CBLAS REQUIRED) + find_package(LAPACKE REQUIRED) + else() + find_package(CBLAS) + find_package(LAPACKE) + endif() + if (FABULOUS_STATIC_FOUND AND NOT FABULOUS_SHARED_FOUND) - if (FABULOUS_FIND_REQUIRED) - find_package(CBLAS REQUIRED) - find_package(LAPACKE REQUIRED) - else() - find_package(CBLAS) - find_package(LAPACKE) - endif() - set(FABULOUS_LIBRARIES ${FABULOUS_STATIC_LIBRARY} ${CBLAS_LIBRARIES} ${LAPACKE_LIBRARIES}) + set(FABULOUS_LIBRARIES ${FABULOUS_STATIC_LIBRARY} ${CBLAS_LIBRARIES} ${LAPACKE_LIBRARIES} "-lstdc++" "-lm") elseif(FABULOUS_SHARED_FOUND) - set(FABULOUS_LIBRARIES ${FABULOUS_SHARED_LIBRARY}) + set(FABULOUS_LIBRARIES ${FABULOUS_SHARED_LIBRARY} ${CBLAS_LIBRARIES} ${LAPACKE_LIBRARIES}) endif() fabulous_check_function_exists(FABULOUS fabulous_create) find_package_handle_standard_args( diff --git a/CMakeModules/morse/find/FindFFTW.cmake b/CMakeModules/morse/find/FindFFTW.cmake index 14fbb7d2b94c17ce06ae5747f11642730c6ffdde..486cda3fcd9cd96008aa9a96a8cea6a111cf2588 100644 --- a/CMakeModules/morse/find/FindFFTW.cmake +++ b/CMakeModules/morse/find/FindFFTW.cmake @@ -3,7 +3,7 @@ # @copyright (c) 2009-2014 The University of Tennessee and The University # of Tennessee Research Foundation. # All rights reserved. -# @copyright (c) 2012-2015 Inria. All rights reserved. +# @copyright (c) 2012-2018 Inria. All rights reserved. # @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved. # ### @@ -113,38 +113,38 @@ if( FFTW_FIND_COMPONENTS ) # means we look for the Intel MKL version of FFTW set(FFTW_LOOK_FOR_MKL ON) if (FFTW_LOOK_FOR_FFTW_LONG) - if (NOT FFTW_FIND_QUIETLY) - message(WARNING "Looking for FFTW -- long precision functions do not exist in MKL FFTW") - endif() - set(FFTW_LOOK_FOR_FFTW_LONG OFF) + if (NOT FFTW_FIND_QUIETLY) + message(WARNING "Looking for FFTW -- long precision functions do not exist in MKL FFTW") + endif() + set(FFTW_LOOK_FOR_FFTW_LONG OFF) endif() if (FFTW_LOOK_FOR_FFTW_QUAD) - if (NOT FFTW_FIND_QUIETLY) - message(WARNING "Looking for FFTW -- quadruple functions do not exist in MKL FFTW") - endif() - set(FFTW_LOOK_FOR_FFTW_QUAD OFF) + if (NOT FFTW_FIND_QUIETLY) + message(WARNING "Looking for FFTW -- quadruple functions do not exist in MKL FFTW") + endif() + set(FFTW_LOOK_FOR_FFTW_QUAD OFF) endif() endif() if (${component} STREQUAL "ESSL") # means we look for the Intel MKL version of FFTW set(FFTW_LOOK_FOR_ESSL ON) if (FFTW_LOOK_FOR_FFTW_LONG) - if (NOT FFTW_FIND_QUIETLY) - message(WARNING "Looking for FFTW -- long precision functions do not exist in FFTW_ESSL") - endif() - set(FFTW_LOOK_FOR_FFTW_LONG OFF) + if (NOT FFTW_FIND_QUIETLY) + message(WARNING "Looking for FFTW -- long precision functions do not exist in FFTW_ESSL") + endif() + set(FFTW_LOOK_FOR_FFTW_LONG OFF) endif() if (FFTW_LOOK_FOR_FFTW_QUAD) - if (NOT FFTW_FIND_QUIETLY) - message(WARNING "Looking for FFTW -- quadruple functions do not exist in FFTW_ESSL") - endif() - set(FFTW_LOOK_FOR_FFTW_QUAD OFF) + if (NOT FFTW_FIND_QUIETLY) + message(WARNING "Looking for FFTW -- quadruple functions do not exist in FFTW_ESSL") + endif() + set(FFTW_LOOK_FOR_FFTW_QUAD OFF) endif() if (FFTW_LOOK_FOR_OMP) - if (NOT FFTW_FIND_QUIETLY) - message(WARNING "Looking for FFTW -- FFTW_ESSL does not use OpenMP") - endif() - set(FFTW_LOOK_FOR_OMP OFF) + if (NOT FFTW_FIND_QUIETLY) + message(WARNING "Looking for FFTW -- FFTW_ESSL does not use OpenMP") + endif() + set(FFTW_LOOK_FOR_OMP OFF) endif() endif() endforeach() @@ -231,90 +231,90 @@ if (NOT FFTW_LOOK_FOR_MKL AND NOT FFTW_LOOK_FOR_ESSL) pkg_search_module(FFTW3 fftw3) if (FFTW3F_FOUND) set(FFTW_C_FLAGS "${FFTW3F_CFLAGS_OTHER}") - if (NOT FFTW_FIND_QUIETLY) - message(STATUS "Looking for FFTW3F - found using PkgConfig") - endif() - if (FFTW3F_LIBRARIES) - list(APPEND FFTW_LIBRARIES "${FFTW3F_LIBRARIES}") - endif() - if(FFTW3F_INCLUDE_DIRS) - list(APPEND FFTW_INCLUDE_DIRS "${FFTW3F_INCLUDE_DIRS}") - else() - if (NOT FFTW_FIND_QUIETLY) - message(WARNING "FFTW3F_INCLUDE_DIRS is empty using PkgConfig." - "Perhaps the path to fftw3f headers is already present in your" - "CPATH/C(PLUS)_INCLUDE_PATH environment variables.") - endif() - endif() - if(FFTW3F_LIBRARY_DIRS) - list(APPEND FFTW_LIBRARY_DIRS "${FFTW3F_LIBRARY_DIRS}") - endif() + if (NOT FFTW_FIND_QUIETLY) + message(STATUS "Looking for FFTW3F - found using PkgConfig") + endif() + if (FFTW3F_LIBRARIES) + list(APPEND FFTW_LIBRARIES "${FFTW3F_LIBRARIES}") + endif() + if(FFTW3F_INCLUDE_DIRS) + list(APPEND FFTW_INCLUDE_DIRS "${FFTW3F_INCLUDE_DIRS}") + else() + if (NOT FFTW_FIND_QUIETLY) + message(WARNING "FFTW3F_INCLUDE_DIRS is empty using PkgConfig." + "Perhaps the path to fftw3f headers is already present in your" + "CPATH/C(PLUS)_INCLUDE_PATH environment variables.") + endif() + endif() + if(FFTW3F_LIBRARY_DIRS) + list(APPEND FFTW_LIBRARY_DIRS "${FFTW3F_LIBRARY_DIRS}") + endif() else(FFTW3F_FOUND) - if (NOT FFTW_FIND_QUIETLY) - message(STATUS "Looking for FFTW3F - not found using PkgConfig." - "\n Perhaps you should add the directory containing fftw3f.pc to" - "\n the PKG_CONFIG_PATH environment variable.") - endif() + if (NOT FFTW_FIND_QUIETLY) + message(STATUS "Looking for FFTW3F - not found using PkgConfig." + "\n Perhaps you should add the directory containing fftw3f.pc to" + "\n the PKG_CONFIG_PATH environment variable.") + endif() endif(FFTW3F_FOUND) elseif(FFTW_LOOK_FOR_FFTW_LONG) pkg_search_module(FFTW3L fftw3l) pkg_search_module(FFTW3 fftw3) if (FFTW3L_FOUND) set(FFTW_C_FLAGS "${FFTW3L_CFLAGS_OTHER}") - if (NOT FFTW_FIND_QUIETLY) - message(STATUS "Looking for FFTW3L - found using PkgConfig") - endif() - if (FFTW3L_LIBRARIES) - list(APPEND FFTW_LIBRARIES "${FFTW3L_LIBRARIES}") - endif() - if(FFTW3L_INCLUDE_DIRS) - list(APPEND FFTW_INCLUDE_DIRS "${FFTW3L_INCLUDE_DIRS}") - else() - if (NOT FFTW_FIND_QUIETLY) - message(WARNING "FFTW3L_INCLUDE_DIRS is empty using PkgConfig." - "Perhaps the path to fftw3l headers is already present in your" - "CPATH/C(PLUS)_INCLUDE_PATH environment variables.") - endif() - endif() - if(FFTW3L_LIBRARY_DIRS) - list(APPEND FFTW_LIBRARY_DIRS "${FFTW3L_LIBRARY_DIRS}") - endif() + if (NOT FFTW_FIND_QUIETLY) + message(STATUS "Looking for FFTW3L - found using PkgConfig") + endif() + if (FFTW3L_LIBRARIES) + list(APPEND FFTW_LIBRARIES "${FFTW3L_LIBRARIES}") + endif() + if(FFTW3L_INCLUDE_DIRS) + list(APPEND FFTW_INCLUDE_DIRS "${FFTW3L_INCLUDE_DIRS}") + else() + if (NOT FFTW_FIND_QUIETLY) + message(WARNING "FFTW3L_INCLUDE_DIRS is empty using PkgConfig." + "Perhaps the path to fftw3l headers is already present in your" + "CPATH/C(PLUS)_INCLUDE_PATH environment variables.") + endif() + endif() + if(FFTW3L_LIBRARY_DIRS) + list(APPEND FFTW_LIBRARY_DIRS "${FFTW3L_LIBRARY_DIRS}") + endif() else(FFTW3L_FOUND) - if (NOT FFTW_FIND_QUIETLY) - message(STATUS "Looking for FFTW3L - not found using PkgConfig." - "\n Perhaps you should add the directory containing fftw3l.pc to" - "\n the PKG_CONFIG_PATH environment variable.") - endif() + if (NOT FFTW_FIND_QUIETLY) + message(STATUS "Looking for FFTW3L - not found using PkgConfig." + "\n Perhaps you should add the directory containing fftw3l.pc to" + "\n the PKG_CONFIG_PATH environment variable.") + endif() endif(FFTW3L_FOUND) elseif(FFTW_LOOK_FOR_FFTW_QUAD) pkg_search_module(FFTW3Q fftw3q) pkg_search_module(FFTW3 fftw3) if (FFTW3Q_FOUND) set(FFTW_C_FLAGS "${FFTW3Q_CFLAGS_OTHER}") - if (NOT FFTW_FIND_QUIETLY) - message(STATUS "Looking for FFTW3Q - found using PkgConfig") - endif() - if (FFTW3Q_LIBRARIES) - list(APPEND FFTW_LIBRARIES "${FFTW3Q_LIBRARIES}") - endif() - if(FFTW3Q_INCLUDE_DIRS) - list(APPEND FFTW_INCLUDE_DIRS "${FFTW3Q_INCLUDE_DIRS}") - else() - if (NOT FFTW_FIND_QUIETLY) - message(WARNING "FFTW3Q_INCLUDE_DIRS is empty using PkgConfig." - "Perhaps the path to fftw3q headers is already present in your" - "CPATH/C(PLUS)_INCLUDE_PATH environment variables.") - endif() - endif() - if(FFTW3Q_LIBRARY_DIRS) - list(APPEND FFTW_LIBRARY_DIRS "${FFTW3Q_LIBRARY_DIRS}") - endif() + if (NOT FFTW_FIND_QUIETLY) + message(STATUS "Looking for FFTW3Q - found using PkgConfig") + endif() + if (FFTW3Q_LIBRARIES) + list(APPEND FFTW_LIBRARIES "${FFTW3Q_LIBRARIES}") + endif() + if(FFTW3Q_INCLUDE_DIRS) + list(APPEND FFTW_INCLUDE_DIRS "${FFTW3Q_INCLUDE_DIRS}") + else() + if (NOT FFTW_FIND_QUIETLY) + message(WARNING "FFTW3Q_INCLUDE_DIRS is empty using PkgConfig." + "Perhaps the path to fftw3q headers is already present in your" + "CPATH/C(PLUS)_INCLUDE_PATH environment variables.") + endif() + endif() + if(FFTW3Q_LIBRARY_DIRS) + list(APPEND FFTW_LIBRARY_DIRS "${FFTW3Q_LIBRARY_DIRS}") + endif() else(FFTW3Q_FOUND) - if (NOT FFTW_FIND_QUIETLY) - message(STATUS "Looking for FFTW3Q - not found using PkgConfig." - "\n Perhaps you should add the directory containing fftw3q.pc to" - "\n the PKG_CONFIG_PATH environment variable.") - endif() + if (NOT FFTW_FIND_QUIETLY) + message(STATUS "Looking for FFTW3Q - not found using PkgConfig." + "\n Perhaps you should add the directory containing fftw3q.pc to" + "\n the PKG_CONFIG_PATH environment variable.") + endif() endif(FFTW3Q_FOUND) else() pkg_search_module(FFTW3 fftw3) @@ -322,28 +322,28 @@ if (NOT FFTW_LOOK_FOR_MKL AND NOT FFTW_LOOK_FOR_ESSL) if (FFTW3_FOUND) set(FFTW_C_FLAGS "${FFTW3_CFLAGS_OTHER}") if (NOT FFTW_FIND_QUIETLY) - message(STATUS "Looking for FFTW3 - found using PkgConfig") + message(STATUS "Looking for FFTW3 - found using PkgConfig") endif() if (FFTW3_LIBRARIES) - list(APPEND FFTW_LIBRARIES "${FFTW3_LIBRARIES}") + list(APPEND FFTW_LIBRARIES "${FFTW3_LIBRARIES}") endif() if(FFTW3_INCLUDE_DIRS) - list(APPEND FFTW_INCLUDE_DIRS "${FFTW3_INCLUDE_DIRS}") + list(APPEND FFTW_INCLUDE_DIRS "${FFTW3_INCLUDE_DIRS}") else() - if (NOT FFTW_FIND_QUIETLY) - message(WARNING "FFTW3_INCLUDE_DIRS is empty using PkgConfig." - "Perhaps the path to fftw3 headers is already present in your" - "CPATH/C(PLUS)_INCLUDE_PATH environment variables.") - endif() + if (NOT FFTW_FIND_QUIETLY) + message(WARNING "FFTW3_INCLUDE_DIRS is empty using PkgConfig." + "Perhaps the path to fftw3 headers is already present in your" + "CPATH/C(PLUS)_INCLUDE_PATH environment variables.") + endif() endif() if(FFTW3_LIBRARY_DIRS) - list(APPEND FFTW_LIBRARY_DIRS "${FFTW3_LIBRARY_DIRS}") + list(APPEND FFTW_LIBRARY_DIRS "${FFTW3_LIBRARY_DIRS}") endif() else(FFTW3_FOUND) if (NOT FFTW_FIND_QUIETLY) - message(STATUS "Looking for FFTW3 - not found using PkgConfig." - "\n Perhaps you should add the directory containing fftw3.pc to" - "\n the PKG_CONFIG_PATH environment variable.") + message(STATUS "Looking for FFTW3 - not found using PkgConfig." + "\n Perhaps you should add the directory containing fftw3.pc to" + "\n the PKG_CONFIG_PATH environment variable.") endif() endif(FFTW3_FOUND) @@ -425,15 +425,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR if(FFTW_DIR) set(FFTW_${FFTW3_HEADER_TO_FIND}_DIRS "FFTW_${FFTW3_HEADER_TO_FIND}_DIRS-NOTFOUND") find_path(FFTW_${FFTW3_HEADER_TO_FIND}_DIRS - NAMES ${FFTW3_HEADER_TO_FIND} - HINTS ${FFTW_DIR} - PATH_SUFFIXES "include" "include/fftw") + NAMES ${FFTW3_HEADER_TO_FIND} + HINTS ${FFTW_DIR} + PATH_SUFFIXES "include" "include/fftw") else() set(FFTW_${FFTW3_HEADER_TO_FIND}_DIRS "FFTW_${FFTW3_HEADER_TO_FIND}_DIRS-NOTFOUND") find_path(FFTW_${FFTW3_HEADER_TO_FIND}_DIRS - NAMES ${FFTW3_HEADER_TO_FIND} - HINTS ${PATH_TO_LOOK_FOR} - PATH_SUFFIXES "fftw") + NAMES ${FFTW3_HEADER_TO_FIND} + HINTS ${PATH_TO_LOOK_FOR} + PATH_SUFFIXES "fftw") endif() endif() mark_as_advanced(FFTW_${FFTW3_HEADER_TO_FIND}_DIRS) @@ -473,20 +473,20 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR if (ENV_MKLROOT) list(APPEND _lib_env "${ENV_MKLROOT}/lib") if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") - list(APPEND _lib_env "${ENV_MKLROOT}/lib64") - list(APPEND _lib_env "${ENV_MKLROOT}/lib/intel64") + list(APPEND _lib_env "${ENV_MKLROOT}/lib64") + list(APPEND _lib_env "${ENV_MKLROOT}/lib/intel64") else() - list(APPEND _lib_env "${ENV_MKLROOT}/lib32") - list(APPEND _lib_env "${ENV_MKLROOT}/lib/ia32") + list(APPEND _lib_env "${ENV_MKLROOT}/lib32") + list(APPEND _lib_env "${ENV_MKLROOT}/lib/ia32") endif() endif() if(WIN32) string(REPLACE ":" ";" _lib_env2 "$ENV{LIB}") else() if(APPLE) - string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env2 "$ENV{DYLD_LIBRARY_PATH}") else() - string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env2 "$ENV{LD_LIBRARY_PATH}") endif() list(APPEND _lib_env "${_lib_env2}") list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") @@ -526,7 +526,7 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR endif() if (FFTW_LOOK_FOR_FFTW_QUAD) if (NOT FFTW_LOOK_FOR_MKL AND NOT FFTW_LOOK_FOR_ESSL) - list(APPEND FFTW_libs_to_find "quadmath") + list(APPEND FFTW_libs_to_find "quadmath") endif() endif() @@ -540,27 +540,27 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR # call cmake macro to find the lib path if(FFTW_LIBDIR) foreach(fftw_lib ${FFTW_libs_to_find}) - set(FFTW_${fftw_lib}_LIBRARY "FFTW_${fftw_lib}_LIBRARY-NOTFOUND") - find_library(FFTW_${fftw_lib}_LIBRARY - NAMES ${fftw_lib} - HINTS ${FFTW_LIBDIR}) + set(FFTW_${fftw_lib}_LIBRARY "FFTW_${fftw_lib}_LIBRARY-NOTFOUND") + find_library(FFTW_${fftw_lib}_LIBRARY + NAMES ${fftw_lib} + HINTS ${FFTW_LIBDIR}) endforeach() else() if(FFTW_DIR) - foreach(fftw_lib ${FFTW_libs_to_find}) - set(FFTW_${fftw_lib}_LIBRARY "FFTW_${fftw_lib}_LIBRARY-NOTFOUND") - find_library(FFTW_${fftw_lib}_LIBRARY - NAMES ${fftw_lib} - HINTS ${FFTW_DIR} - PATH_SUFFIXES lib lib32 lib64) - endforeach() + foreach(fftw_lib ${FFTW_libs_to_find}) + set(FFTW_${fftw_lib}_LIBRARY "FFTW_${fftw_lib}_LIBRARY-NOTFOUND") + find_library(FFTW_${fftw_lib}_LIBRARY + NAMES ${fftw_lib} + HINTS ${FFTW_DIR} + PATH_SUFFIXES lib lib32 lib64) + endforeach() else() - foreach(fftw_lib ${FFTW_libs_to_find}) - set(FFTW_${fftw_lib}_LIBRARY "FFTW_${fftw_lib}_LIBRARY-NOTFOUND") - find_library(FFTW_${fftw_lib}_LIBRARY - NAMES ${fftw_lib} - HINTS ${PATH_TO_LOOK_FOR}) - endforeach() + foreach(fftw_lib ${FFTW_libs_to_find}) + set(FFTW_${fftw_lib}_LIBRARY "FFTW_${fftw_lib}_LIBRARY-NOTFOUND") + find_library(FFTW_${fftw_lib}_LIBRARY + NAMES ${fftw_lib} + HINTS ${PATH_TO_LOOK_FOR}) + endforeach() endif() endif() @@ -569,15 +569,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR foreach(fftw_lib ${FFTW_libs_to_find}) if (FFTW_${fftw_lib}_LIBRARY) - get_filename_component(${fftw_lib}_lib_path "${FFTW_${fftw_lib}_LIBRARY}" PATH) - # set cmake variables - list(APPEND FFTW_LIBRARIES "${FFTW_${fftw_lib}_LIBRARY}") - list(APPEND FFTW_LIBRARY_DIRS "${${fftw_lib}_lib_path}") + get_filename_component(${fftw_lib}_lib_path "${FFTW_${fftw_lib}_LIBRARY}" PATH) + # set cmake variables + list(APPEND FFTW_LIBRARIES "${FFTW_${fftw_lib}_LIBRARY}") + list(APPEND FFTW_LIBRARY_DIRS "${${fftw_lib}_lib_path}") else () - list(APPEND FFTW_LIBRARIES "${FFTW_${fftw_lib}_LIBRARY}") - if (NOT FFTW_FIND_QUIETLY) - message(STATUS "Looking for FFTW -- lib ${fftw_lib} not found") - endif() + list(APPEND FFTW_LIBRARIES "${FFTW_${fftw_lib}_LIBRARY}") + if (NOT FFTW_FIND_QUIETLY) + message(STATUS "Looking for FFTW -- lib ${fftw_lib} not found") + endif() endif () mark_as_advanced(FFTW_${fftw_lib}_LIBRARY) @@ -586,7 +586,7 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR # check if one lib is NOTFOUND foreach(lib ${FFTW_LIBRARIES}) if (NOT lib) - set(FFTW_LIBRARIES "FFTW_LIBRARIES-NOTFOUND") + set(FFTW_LIBRARIES "FFTW_LIBRARIES-NOTFOUND") endif() endforeach() @@ -597,67 +597,67 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR # FFTW relies on blas libs if (FFTW_LOOK_FOR_THREADS) if (FFTW_LOOK_FOR_MKL) - if (BLAS_PAR_LIBRARIES) - list(APPEND FFTW_LIBRARIES "${BLAS_PAR_LIBRARIES}") - if (NOT FFTW_FIND_QUIETLY) - message(STATUS "Multithreaded FFTW has been found: ${FFTW_LIBRARIES}") - endif() - else() - if (NOT FFTW_FIND_QUIETLY) - if (FFTW_FIND_REQUIRED AND FFTW_FIND_REQUIRED_MKL) - message(FATAL_ERROR "FFTW is required but not found.") - else() - message(STATUS "Multithreaded FFTW not found.") - endif() - endif() - endif(BLAS_PAR_LIBRARIES) + if (BLAS_PAR_LIBRARIES) + list(APPEND FFTW_LIBRARIES "${BLAS_PAR_LIBRARIES}") + if (NOT FFTW_FIND_QUIETLY) + message(STATUS "Multithreaded FFTW has been found: ${FFTW_LIBRARIES}") + endif() + else() + if (NOT FFTW_FIND_QUIETLY) + if (FFTW_FIND_REQUIRED AND FFTW_FIND_REQUIRED_MKL) + message(FATAL_ERROR "FFTW is required but not found.") + else() + message(STATUS "Multithreaded FFTW not found.") + endif() + endif() + endif(BLAS_PAR_LIBRARIES) elseif (FFTW_LOOK_FOR_ESSL) - if (FFTW_LIBRARIES AND BLAS_PAR_LIBRARIES) - list(APPEND FFTW_LIBRARIES "${BLAS_PAR_LIBRARIES}") - if (NOT FFTW_FIND_QUIETLY) - message(STATUS "Multithreaded FFTW has been found: ${FFTW_LIBRARIES}") - endif() - else() - if (NOT FFTW_FIND_QUIETLY) - if (FFTW_FIND_REQUIRED AND FFTW_FIND_REQUIRED_MKL) - message(FATAL_ERROR "FFTW is required but not found.") - else() - message(STATUS "Multithreaded FFTW not found.") - endif() - endif() - endif(FFTW_LIBRARIES AND BLAS_PAR_LIBRARIES) + if (FFTW_LIBRARIES AND BLAS_PAR_LIBRARIES) + list(APPEND FFTW_LIBRARIES "${BLAS_PAR_LIBRARIES}") + if (NOT FFTW_FIND_QUIETLY) + message(STATUS "Multithreaded FFTW has been found: ${FFTW_LIBRARIES}") + endif() + else() + if (NOT FFTW_FIND_QUIETLY) + if (FFTW_FIND_REQUIRED AND FFTW_FIND_REQUIRED_MKL) + message(FATAL_ERROR "FFTW is required but not found.") + else() + message(STATUS "Multithreaded FFTW not found.") + endif() + endif() + endif(FFTW_LIBRARIES AND BLAS_PAR_LIBRARIES) endif() else(FFTW_LOOK_FOR_THREADS) if (FFTW_LOOK_FOR_MKL) - if (BLAS_SEQ_LIBRARIES) - list(APPEND FFTW_LIBRARIES "${BLAS_SEQ_LIBRARIES}") - if (NOT FFTW_FIND_QUIETLY) - message(STATUS "FFTW has been found: ${FFTW_LIBRARIES}") - endif() - else() - if (NOT FFTW_FIND_QUIETLY) - if (FFTW_FIND_REQUIRED AND FFTW_FIND_REQUIRED_MKL) - message(FATAL_ERROR "FFTW is required but not found.") - else() - message(STATUS "FFTW not found.") - endif() - endif() - endif(BLAS_SEQ_LIBRARIES) + if (BLAS_SEQ_LIBRARIES) + list(APPEND FFTW_LIBRARIES "${BLAS_SEQ_LIBRARIES}") + if (NOT FFTW_FIND_QUIETLY) + message(STATUS "FFTW has been found: ${FFTW_LIBRARIES}") + endif() + else() + if (NOT FFTW_FIND_QUIETLY) + if (FFTW_FIND_REQUIRED AND FFTW_FIND_REQUIRED_MKL) + message(FATAL_ERROR "FFTW is required but not found.") + else() + message(STATUS "FFTW not found.") + endif() + endif() + endif(BLAS_SEQ_LIBRARIES) elseif (FFTW_LOOK_FOR_ESSL) - if (FFTW_LIBRARIES AND BLAS_SEQ_LIBRARIES) - list(APPEND FFTW_LIBRARIES "${BLAS_SEQ_LIBRARIES}") - if (NOT FFTW_FIND_QUIETLY) - message(STATUS "FFTW has been found: ${FFTW_LIBRARIES}") - endif() - else() - if (NOT FFTW_FIND_QUIETLY) - if (FFTW_FIND_REQUIRED AND FFTW_FIND_REQUIRED_MKL) - message(FATAL_ERROR "FFTW is required but not found.") - else() - message(STATUS "FFTW not found.") - endif() - endif() - endif(FFTW_LIBRARIES AND BLAS_SEQ_LIBRARIES) + if (FFTW_LIBRARIES AND BLAS_SEQ_LIBRARIES) + list(APPEND FFTW_LIBRARIES "${BLAS_SEQ_LIBRARIES}") + if (NOT FFTW_FIND_QUIETLY) + message(STATUS "FFTW has been found: ${FFTW_LIBRARIES}") + endif() + else() + if (NOT FFTW_FIND_QUIETLY) + if (FFTW_FIND_REQUIRED AND FFTW_FIND_REQUIRED_MKL) + message(FATAL_ERROR "FFTW is required but not found.") + else() + message(STATUS "FFTW not found.") + endif() + endif() + endif(FFTW_LIBRARIES AND BLAS_SEQ_LIBRARIES) endif() endif(FFTW_LOOK_FOR_THREADS) @@ -665,7 +665,7 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR list(APPEND FFTW_LIBRARY_DIRS "${BLAS_LIBRARY_DIRS}") else() if (NOT FFTW_FIND_QUIETLY) - message(WARNING "FFTW_LIBRARY_DIRS may not be complete because BLAS_LIBRARY_DIRS is empty.") + message(WARNING "FFTW_LIBRARY_DIRS may not be complete because BLAS_LIBRARY_DIRS is empty.") endif() endif() @@ -704,7 +704,7 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR endif() # OMP if(FFTW_LOOK_FOR_OMP) - set(REQUIRED_FLAGS "-fopenmp") + list(APPEND REQUIRED_FLAGS "${OPENMP_C_FLAGS}") #if (CMAKE_C_COMPILER_ID STREQUAL "GNU") # # either gomp ... # list(APPEND REQUIRED_LIBS "-lgomp") @@ -718,7 +718,7 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR if(FFTW_LOOK_FOR_MKL) list(APPEND REQUIRED_LIBS "${CMAKE_THREAD_LIBS_INIT}") if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_SYSTEM_NAME STREQUAL "Linux") - list(APPEND REQUIRED_LDFLAGS "-Wl,--no-as-needed") + list(APPEND REQUIRED_LDFLAGS "-Wl,--no-as-needed") endif() endif() # m @@ -761,11 +761,11 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR list(REMOVE_DUPLICATES FFTW_LINKER_FLAGS) else() if(NOT FFTW_FIND_QUIETLY) - message(STATUS "Looking for FFTW : test of ${FFTW_PREC_TESTFUNC}fftw_execute_ with fftw library fails") - message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") - message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") - message(STATUS "CMAKE_REQUIRED_FLAGS: ${CMAKE_REQUIRED_FLAGS}") - message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") + message(STATUS "Looking for FFTW : test of ${FFTW_PREC_TESTFUNC}fftw_execute_ with fftw library fails") + message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") + message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") + message(STATUS "CMAKE_REQUIRED_FLAGS: ${CMAKE_REQUIRED_FLAGS}") + message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") endif() endif() set(CMAKE_REQUIRED_INCLUDES) @@ -783,6 +783,9 @@ endif( (NOT PKG_CONFIG_EXECUTABLE) OR if (FFTW_LIBRARIES) list(GET FFTW_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + if (NOT FFTW_LIBRARY_DIRS) + set(FFTW_LIBRARY_DIRS "${first_lib_path}") + endif() if (${first_lib_path} MATCHES "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)") string(REGEX REPLACE "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)" "" not_cached_dir "${first_lib_path}") set(FFTW_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of FFTW library" FORCE) diff --git a/CMakeModules/morse/find/FindFXT.cmake b/CMakeModules/morse/find/FindFXT.cmake index 754ee7d651c2c792dbde76be087b171dd8ca9a33..81704c2d693c122a771d7655878456e1d9c080b0 100644 --- a/CMakeModules/morse/find/FindFXT.cmake +++ b/CMakeModules/morse/find/FindFXT.cmake @@ -78,8 +78,8 @@ if(PKG_CONFIG_EXECUTABLE AND NOT FXT_GIVEN_BY_USER) #endif() else() message(STATUS "${Magenta}Looking for FXT - not found using PkgConfig." - "\n Perhaps you should add the directory containing fxt.pc to the" - "\n PKG_CONFIG_PATH environment variable.${ColourReset}") + "\n Perhaps you should add the directory containing fxt.pc to the" + "\n PKG_CONFIG_PATH environment variable.${ColourReset}") endif() endif() @@ -137,15 +137,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT FXT_FOUND) OR if(FXT_DIR) set(FXT_fxt.h_DIRS "FXT_fxt.h_DIRS-NOTFOUND") find_path(FXT_fxt.h_DIRS - NAMES fxt.h - HINTS ${FXT_DIR} - PATH_SUFFIXES "include" "include/fxt") + NAMES fxt.h + HINTS ${FXT_DIR} + PATH_SUFFIXES "include" "include/fxt") else() set(FXT_fxt.h_DIRS "FXT_fxt.h_DIRS-NOTFOUND") find_path(FXT_fxt.h_DIRS - NAMES fxt.h - HINTS ${_inc_env} - PATH_SUFFIXES "fxt") + NAMES fxt.h + HINTS ${_inc_env} + PATH_SUFFIXES "fxt") endif() endif() mark_as_advanced(FXT_fxt.h_DIRS) @@ -183,9 +183,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT FXT_FOUND) OR string(REPLACE ":" ";" _lib_env "$ENV{LIB}") else() if(APPLE) - string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") else() - string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") endif() list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") @@ -206,14 +206,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT FXT_FOUND) OR if(FXT_DIR) set(FXT_fxt_LIBRARY "FXT_fxt_LIBRARY-NOTFOUND") find_library(FXT_fxt_LIBRARY - NAMES fxt - HINTS ${FXT_DIR} - PATH_SUFFIXES lib lib32 lib64) + NAMES fxt + HINTS ${FXT_DIR} + PATH_SUFFIXES lib lib32 lib64) else() set(FXT_fxt_LIBRARY "FXT_fxt_LIBRARY-NOTFOUND") find_library(FXT_fxt_LIBRARY - NAMES fxt - HINTS ${_lib_env}) + NAMES fxt + HINTS ${_lib_env}) endif() endif() mark_as_advanced(FXT_fxt_LIBRARY) @@ -270,10 +270,10 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT FXT_FOUND) OR if(NOT FXT_WORKS) if(NOT FXT_FIND_QUIETLY) - message(STATUS "Looking for fxt : test of fut_keychange with fxt library fails") - message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") - message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") - message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") + message(STATUS "Looking for fxt : test of fut_keychange with fxt library fails") + message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") + message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") + message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") endif() endif() set(CMAKE_REQUIRED_INCLUDES) @@ -289,6 +289,7 @@ if (FXT_LIBRARIES) else() list(GET FXT_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + set(FXT_LIBRARY_DIRS "${first_lib_path}") endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") diff --git a/CMakeModules/morse/find/FindGTG.cmake b/CMakeModules/morse/find/FindGTG.cmake index dbdaf01d716e89bf3b053f3600e73003b0918659..eda344b899b0896d51b18b4435f368470ccbfba3 100644 --- a/CMakeModules/morse/find/FindGTG.cmake +++ b/CMakeModules/morse/find/FindGTG.cmake @@ -78,8 +78,8 @@ if(PKG_CONFIG_EXECUTABLE AND NOT GTG_GIVEN_BY_USER) #endif() else() message(STATUS "${Magenta}Looking for GTG - not found using PkgConfig." - "\n Perhaps you should add the directory containing gtg.pc to the" - "\n PKG_CONFIG_PATH environment variable.${ColourReset}") + "\n Perhaps you should add the directory containing gtg.pc to the" + "\n PKG_CONFIG_PATH environment variable.${ColourReset}") endif() endif() @@ -137,15 +137,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT GTG_FOUND) OR if(GTG_DIR) set(GTG_GTG.h_DIRS "GTG_GTG.h_DIRS-NOTFOUND") find_path(GTG_GTG.h_DIRS - NAMES GTG.h - HINTS ${GTG_DIR} - PATH_SUFFIXES "include" "include/gtg") + NAMES GTG.h + HINTS ${GTG_DIR} + PATH_SUFFIXES "include" "include/gtg") else() set(GTG_GTG.h_DIRS "GTG_GTG.h_DIRS-NOTFOUND") find_path(GTG_GTG.h_DIRS - NAMES GTG.h - HINTS ${_inc_env} - PATH_SUFFIXES "gtg") + NAMES GTG.h + HINTS ${_inc_env} + PATH_SUFFIXES "gtg") endif() endif() mark_as_advanced(GTG_GTG.h_DIRS) @@ -183,9 +183,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT GTG_FOUND) OR string(REPLACE ":" ";" _lib_env "$ENV{LIB}") else() if(APPLE) - string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") else() - string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") endif() list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") @@ -206,14 +206,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT GTG_FOUND) OR if(GTG_DIR) set(GTG_gtg_LIBRARY "GTG_gtg_LIBRARY-NOTFOUND") find_library(GTG_gtg_LIBRARY - NAMES gtg - HINTS ${GTG_DIR} - PATH_SUFFIXES lib lib32 lib64) + NAMES gtg + HINTS ${GTG_DIR} + PATH_SUFFIXES lib lib32 lib64) else() set(GTG_gtg_LIBRARY "GTG_gtg_LIBRARY-NOTFOUND") find_library(GTG_gtg_LIBRARY - NAMES gtg - HINTS ${_lib_env}) + NAMES gtg + HINTS ${_lib_env}) endif() endif() mark_as_advanced(GTG_gtg_LIBRARY) @@ -270,10 +270,10 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT GTG_FOUND) OR if(NOT GTG_WORKS) if(NOT GTG_FIND_QUIETLY) - message(STATUS "Looking for gtg : test of GTG_start with gtg library fails") - message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") - message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") - message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") + message(STATUS "Looking for gtg : test of GTG_start with gtg library fails") + message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") + message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") + message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") endif() endif() set(CMAKE_REQUIRED_INCLUDES) @@ -289,6 +289,7 @@ if (GTG_LIBRARIES) else() list(GET GTG_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + set(GTG_LIBRARY_DIRS "${first_lib_path}") endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") diff --git a/CMakeModules/morse/find/FindHQR.cmake b/CMakeModules/morse/find/FindHQR.cmake index 14863c2b8e5e6e31499cf968d3903598475a07bc..982c9c6b1ae74029a2b32e8305fb7c8220b3b49f 100644 --- a/CMakeModules/morse/find/FindHQR.cmake +++ b/CMakeModules/morse/find/FindHQR.cmake @@ -77,8 +77,8 @@ if(PKG_CONFIG_EXECUTABLE AND NOT HQR_GIVEN_BY_USER) #endif() else() message(STATUS "${Magenta}Looking for HQR - not found using PkgConfig." - "\n Perhaps you should add the directory containing hqr.pc to the" - "\n PKG_CONFIG_PATH environment variable.${ColourReset}") + "\n Perhaps you should add the directory containing hqr.pc to the" + "\n PKG_CONFIG_PATH environment variable.${ColourReset}") endif() endif() @@ -133,14 +133,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT HQR_FOUND) OR if(HQR_DIR) set(HQR_libhqr.h_DIRS "HQR_libhqr.h_DIRS-NOTFOUND") find_path(HQR_libhqr.h_DIRS - NAMES libhqr.h - HINTS ${HQR_DIR} + NAMES libhqr.h + HINTS ${HQR_DIR}) else() set(HQR_libhqr.h_DIRS "HQR_libhqr.h_DIRS-NOTFOUND") find_path(HQR_libhqr.h_DIRS - NAMES libhqr.h - HINTS ${_inc_env} - PATH_SUFFIXES "hqr") + NAMES libhqr.h + HINTS ${_inc_env} + PATH_SUFFIXES "hqr") endif() endif() mark_as_advanced(HQR_libhqr.h_DIRS) @@ -177,9 +177,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT HQR_FOUND) OR string(REPLACE ":" ";" _lib_env "$ENV{LIB}") else() if(APPLE) - string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") else() - string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") endif() list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") @@ -200,14 +200,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT HQR_FOUND) OR if(HQR_DIR) set(HQR_hqr_LIBRARY "HQR_hqr_LIBRARY-NOTFOUND") find_library(HQR_hqr_LIBRARY - NAMES hqr - HINTS ${HQR_DIR} - PATH_SUFFIXES lib lib32 lib64) + NAMES hqr + HINTS ${HQR_DIR} + PATH_SUFFIXES lib lib32 lib64) else() set(HQR_hqr_LIBRARY "HQR_hqr_LIBRARY-NOTFOUND") find_library(HQR_hqr_LIBRARY - NAMES hqr - HINTS ${_lib_env}) + NAMES hqr + HINTS ${_lib_env}) endif() endif() mark_as_advanced(HQR_hqr_LIBRARY) @@ -259,15 +259,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT HQR_FOUND) OR # test link unset(HQR_WORKS CACHE) include(CheckFunctionExists) - check_function_exists(libhqr_hqr_init HQR_WORKS) + check_function_exists(libhqr_init_hqr HQR_WORKS) mark_as_advanced(HQR_WORKS) if(NOT HQR_WORKS) if(NOT HQR_FIND_QUIETLY) - message(STATUS "Looking for hqr : test of libhqr_hqr_init with hqr library fails") - message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") - message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") - message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") + message(STATUS "Looking for hqr : test of libhqr_hqr_init with hqr library fails") + message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") + message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") + message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") endif() endif() set(CMAKE_REQUIRED_INCLUDES) @@ -283,6 +283,7 @@ if (HQR_LIBRARIES) else() list(GET HQR_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + set(HQR_LIBRARY_DIRS "${first_lib_path}") endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") diff --git a/CMakeModules/morse/find/FindHWLOC.cmake b/CMakeModules/morse/find/FindHWLOC.cmake index 4d7c47f7ba6d4ff7507894c5c25c234a8ffbea95..5c868b2adbf76ab7c1d27585bcde77b64d3d2e74 100644 --- a/CMakeModules/morse/find/FindHWLOC.cmake +++ b/CMakeModules/morse/find/FindHWLOC.cmake @@ -81,8 +81,8 @@ if( PKG_CONFIG_EXECUTABLE AND NOT HWLOC_GIVEN_BY_USER ) #endif() else() message(STATUS "${Magenta}Looking for HWLOC - not found using PkgConfig." - "\n Perhaps you should add the directory containing hwloc.pc to" - "\n the PKG_CONFIG_PATH environment variable.${ColourReset}") + "\n Perhaps you should add the directory containing hwloc.pc to" + "\n the PKG_CONFIG_PATH environment variable.${ColourReset}") endif() endif() @@ -141,15 +141,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT HWLOC_FOUND) O if(HWLOC_DIR) set(HWLOC_hwloc.h_DIRS "HWLOC_hwloc.h_DIRS-NOTFOUND") find_path(HWLOC_hwloc.h_DIRS - NAMES hwloc.h - HINTS ${HWLOC_DIR} - PATH_SUFFIXES "include" "include/hwloc") + NAMES hwloc.h + HINTS ${HWLOC_DIR} + PATH_SUFFIXES "include" "include/hwloc") else() set(HWLOC_hwloc.h_DIRS "HWLOC_hwloc.h_DIRS-NOTFOUND") find_path(HWLOC_hwloc.h_DIRS - NAMES hwloc.h - HINTS ${PATH_TO_LOOK_FOR} - PATH_SUFFIXES "hwloc") + NAMES hwloc.h + HINTS ${PATH_TO_LOOK_FOR} + PATH_SUFFIXES "hwloc") endif() endif() mark_as_advanced(HWLOC_hwloc.h_DIRS) @@ -186,9 +186,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT HWLOC_FOUND) O string(REPLACE ":" ";" _lib_env "$ENV{LIB}") else() if(APPLE) - string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") else() - string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") endif() list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") @@ -212,14 +212,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT HWLOC_FOUND) O if(HWLOC_DIR) set(HWLOC_hwloc_LIBRARY "HWLOC_hwloc_LIBRARY-NOTFOUND") find_library(HWLOC_hwloc_LIBRARY - NAMES hwloc - HINTS ${HWLOC_DIR} - PATH_SUFFIXES lib lib32 lib64) + NAMES hwloc + HINTS ${HWLOC_DIR} + PATH_SUFFIXES lib lib32 lib64) else() set(HWLOC_hwloc_LIBRARY "HWLOC_hwloc_LIBRARY-NOTFOUND") find_library(HWLOC_hwloc_LIBRARY - NAMES hwloc - HINTS ${PATH_TO_LOOK_FOR}) + NAMES hwloc + HINTS ${PATH_TO_LOOK_FOR}) endif() endif() mark_as_advanced(HWLOC_hwloc_LIBRARY) @@ -276,10 +276,10 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT HWLOC_FOUND) O if(NOT HWLOC_WORKS) if(NOT HWLOC_FIND_QUIETLY) - message(STATUS "Looking for hwloc : test of hwloc_topology_init with hwloc library fails") - message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") - message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") - message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") + message(STATUS "Looking for hwloc : test of hwloc_topology_init with hwloc library fails") + message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") + message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") + message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") endif() endif() set(CMAKE_REQUIRED_INCLUDES) @@ -295,6 +295,7 @@ if (HWLOC_LIBRARIES) else() list(GET HWLOC_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + set(HWLOC_LIBRARY_DIRS "${first_lib_path}") endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") @@ -338,7 +339,7 @@ if (HWLOC_FOUND) check_struct_has_member( "struct hwloc_obj" parent hwloc.h HAVE_HWLOC_PARENT_MEMBER ) check_struct_has_member( "struct hwloc_cache_attr_s" size hwloc.h HAVE_HWLOC_CACHE_ATTR ) check_c_source_compiles( "#include <hwloc.h> - int main(void) { hwloc_obj_t o; o->type = HWLOC_OBJ_PU; return 0;}" HAVE_HWLOC_OBJ_PU) + int main(void) { hwloc_obj_t o; o->type = HWLOC_OBJ_PU; return 0;}" HAVE_HWLOC_OBJ_PU) include(CheckLibraryExists) check_library_exists(${HWLOC_LIBRARIES} hwloc_bitmap_free "" HAVE_HWLOC_BITMAP) diff --git a/CMakeModules/morse/find/FindHYPRE.cmake b/CMakeModules/morse/find/FindHYPRE.cmake index 944b5ecbdb952d13a4b2e0bee15352cda500bc52..8823f6a1b6f993dc699f884885ec174083814bea 100644 --- a/CMakeModules/morse/find/FindHYPRE.cmake +++ b/CMakeModules/morse/find/FindHYPRE.cmake @@ -1,4 +1,7 @@ ### +# WARNING: only HYPRE lib is searched for now +# it is surely too simple, must be completed +### # # @copyright (c) 2009-2014 The University of Tennessee and The University # of Tennessee Research Foundation. diff --git a/CMakeModules/morse/find/FindLAPACK.cmake b/CMakeModules/morse/find/FindLAPACK.cmake index 0a517819e60c9d81e1147f9bcf8e2a1a327547b8..d07c61eec189f244bf5eae2e426547af6bc7efc9 100644 --- a/CMakeModules/morse/find/FindLAPACK.cmake +++ b/CMakeModules/morse/find/FindLAPACK.cmake @@ -244,7 +244,6 @@ macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas _threads find_library(${_prefix}_${_library}_LIBRARY NAMES ${_library} HINTS ${_libdir} - NO_DEFAULT_PATH ) mark_as_advanced(${_prefix}_${_library}_LIBRARY) # Print status if not found @@ -719,6 +718,9 @@ set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) if (LAPACK_FOUND) list(GET LAPACK_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + if (NOT LAPACK_LIBRARY_DIRS) + set(LAPACK_LIBRARY_DIRS "${first_lib_path}") + endif() if (${first_lib_path} MATCHES "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)") string(REGEX REPLACE "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)" "" not_cached_dir "${first_lib_path}") set(LAPACK_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of LAPACK library" FORCE) diff --git a/CMakeModules/morse/find/FindLAPACKE.cmake b/CMakeModules/morse/find/FindLAPACKE.cmake index 55fc87e6960acd11223a2ea65cea10f36ec1de94..50085299203215b714c64c2914aac61cc3005458 100644 --- a/CMakeModules/morse/find/FindLAPACKE.cmake +++ b/CMakeModules/morse/find/FindLAPACKE.cmake @@ -3,7 +3,7 @@ # @copyright (c) 2009-2014 The University of Tennessee and The University # of Tennessee Research Foundation. # All rights reserved. -# @copyright (c) 2012-2016 Inria. All rights reserved. +# @copyright (c) 2012-2017 Inria. All rights reserved. # @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved. # ### @@ -18,6 +18,11 @@ # LAPACKE depends on the following libraries: # - LAPACK # +# COMPONENTS are optional libraries CHAMELEON could be linked with, +# Use it to drive detection of a specific compilation chain +# COMPONENTS can be some of the following: +# - TMG: to check that LAPACKE provides the tmglib interface +# # This module finds headers and lapacke library. # Results are reported in variables: # LAPACKE_FOUND - True if headers and requested libraries were found @@ -49,7 +54,7 @@ # Copyright 2012-2013 Emmanuel Agullo # Copyright 2012-2013 Mathieu Faverge # Copyright 2012 Cedric Castagnede -# Copyright 2013-2016 Florent Pruvost +# Copyright 2013-2017 Florent Pruvost # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file MORSE-Copyright.txt for details. @@ -68,6 +73,16 @@ if (NOT LAPACKE_FOUND) endif() endif() +# to check that LAPACKE provides the tmglib interface +set(LAPACKE_WITH_TMG OFF) +if( LAPACKE_FIND_COMPONENTS ) + foreach( component ${LAPACKE_FIND_COMPONENTS} ) + if (${component} STREQUAL "TMG") + set(LAPACKE_WITH_TMG ON) + endif() + endforeach() +endif() + # LAPACKE depends on LAPACK anyway, try to find it if (NOT LAPACK_FOUND) if(LAPACKE_FIND_REQUIRED) @@ -324,6 +339,10 @@ if (LAPACK_FOUND) unset(LAPACKE_WORKS CACHE) include(CheckFunctionExists) check_function_exists(LAPACKE_dgeqrf LAPACKE_WORKS) + if (LAPACKE_WORKS AND LAPACKE_WITH_TMG) + unset(LAPACKE_WORKS CACHE) + check_function_exists(LAPACKE_dlatms_work LAPACKE_WORKS) + endif() mark_as_advanced(LAPACKE_WORKS) if(LAPACKE_WORKS) @@ -362,6 +381,9 @@ endif(LAPACK_FOUND) if (LAPACKE_LIBRARIES) list(GET LAPACKE_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + if (NOT LAPACKE_LIBRARY_DIRS) + set(LAPACKE_LIBRARY_DIRS "${first_lib_path}") + endif() if (${first_lib_path} MATCHES "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)") string(REGEX REPLACE "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)" "" not_cached_dir "${first_lib_path}") set(LAPACKE_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of LAPACKE library" FORCE) diff --git a/CMakeModules/morse/find/FindLAPACKEXT.cmake b/CMakeModules/morse/find/FindLAPACKEXT.cmake index bf62c3d7071cce623a64a78aa55c52935b0e5256..7cce67022fbeb3503ec6d67a0ee878a67bb226af 100644 --- a/CMakeModules/morse/find/FindLAPACKEXT.cmake +++ b/CMakeModules/morse/find/FindLAPACKEXT.cmake @@ -3,7 +3,7 @@ # @copyright (c) 2009-2014 The University of Tennessee and The University # of Tennessee Research Foundation. # All rights reserved. -# @copyright (c) 2012-2014 Inria. All rights reserved. +# @copyright (c) 2012-2017 Inria. All rights reserved. # @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved. # ### @@ -18,17 +18,21 @@ # # The following variables have been added to manage links with sequential or multithreaded # versions: -# LAPACK_INCLUDE_DIRS - LAPACK include directories -# LAPACK_LIBRARY_DIRS - Link directories for LAPACK libraries -# LAPACK_SEQ_LIBRARIES - LAPACK component libraries to be linked (sequential) -# LAPACK_PAR_LIBRARIES - LAPACK component libraries to be linked (multithreaded) +# LAPACK_INCLUDE_DIRS - LAPACK include directories +# LAPACK_LIBRARY_DIRS - Link directories for LAPACK libraries +# LAPACK_SEQ_LIBRARIES - LAPACK component libraries to be linked (sequential) +# LAPACK_PAR_LIBRARIES - LAPACK component libraries to be linked (multithreaded) +# LAPACKEXT_FOUND - if a LAPACK has been found +# LAPACKEXT_LIBRARIES - Idem LAPACK_LIBRARIES +# LAPACKEXT_INCLUDE_DIRS - Idem LAPACK_INCLUDE_DIRS +# LAPACKEXT_LIBRARY_DIRS - Idem LAPACK_LIBRARY_DIRS #============================================================================= # Copyright 2012-2013 Inria # Copyright 2012-2013 Emmanuel Agullo # Copyright 2012-2013 Mathieu Faverge # Copyright 2012 Cedric Castagnede -# Copyright 2013 Florent Pruvost +# Copyright 2013-2017 Florent Pruvost # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file MORSE-Copyright.txt for details. @@ -40,9 +44,10 @@ # (To distribute this file outside of Morse, substitute the full # License text for the above reference.) -# macro to factorize this call -macro(find_package_lapack) - if(LAPACKEXT_FIND_REQUIRED) +# Macro to factorize this call. required arguments allows to decide if +# the REQUIRED option must be given to find_package calls +macro(find_package_lapack required) + if(LAPACKEXT_FIND_REQUIRED AND required) if(LAPACKEXT_FIND_QUIETLY) find_package(LAPACK REQUIRED QUIET) else() @@ -57,22 +62,12 @@ macro(find_package_lapack) endif() endmacro() -# LAPACKEXT depends on BLASEXT -# call our extended module for BLAS -#---------------------------------- +# LAPACKEXT depends on BLAS if (NOT BLAS_FOUND) - if(LAPACKEXT_FIND_REQUIRED) - if(LAPACKEXT_FIND_QUIETLY) - find_package(BLAS REQUIRED QUIET) - else() - find_package(BLAS REQUIRED) - endif() + if(LAPACKEXT_FIND_QUIETLY) + find_package(BLAS QUIET) else() - if(LAPACKEXT_FIND_QUIETLY) - find_package(BLAS QUIET) - else() - find_package(BLAS) - endif() + find_package(BLAS) endif() endif () @@ -123,13 +118,13 @@ if(BLA_VENDOR MATCHES "Intel*") else() if(LAPACK_DIR) find_path(LAPACK_mkl_lapack.h_INCLUDE_DIRS - NAMES mkl_lapack.h - HINTS ${LAPACK_DIR} - PATH_SUFFIXES include) + NAMES mkl_lapack.h + HINTS ${LAPACK_DIR} + PATH_SUFFIXES include) else() find_path(LAPACK_mkl_lapack.h_INCLUDE_DIRS - NAMES mkl_lapack.h - HINTS ${_inc_env}) + NAMES mkl_lapack.h + HINTS ${_inc_env}) endif() endif() mark_as_advanced(LAPACK_mkl_lapack.h_INCLUDE_DIRS) @@ -151,7 +146,7 @@ if(BLA_VENDOR MATCHES "Intel*") ## look for the sequential version set(BLA_VENDOR "Intel10_64lp_seq") endif() - find_package_lapack() + find_package_lapack(0) if (LAPACK_FOUND) if(BLAS_SEQ_LIBRARIES) @@ -162,9 +157,9 @@ if(BLA_VENDOR MATCHES "Intel*") # if BLAS Intel 10 64 bit -> save sequential and multithreaded versions if(BLA_VENDOR MATCHES "Intel10_64lp*") if(BLAS_PAR_LIBRARIES) - set(LAPACK_PAR_LIBRARIES "${BLAS_PAR_LIBRARIES}") + set(LAPACK_PAR_LIBRARIES "${BLAS_PAR_LIBRARIES}") else() - set(LAPACK_PAR_LIBRARIES "${LAPACK_PAR_LIBRARIES-NOTFOUND}") + set(LAPACK_PAR_LIBRARIES "${LAPACK_PAR_LIBRARIES-NOTFOUND}") endif() endif() endif() @@ -173,7 +168,7 @@ elseif(BLA_VENDOR MATCHES "IBMESSL*") ## look for the sequential version set(BLA_VENDOR "IBMESSL") - find_package_lapack() + find_package_lapack(0) if (LAPACK_FOUND) if(LAPACK_LIBRARIES) @@ -185,7 +180,7 @@ elseif(BLA_VENDOR MATCHES "IBMESSL*") ## look for the multithreaded version set(BLA_VENDOR "IBMESSLMT") - find_package_lapack() + find_package_lapack(0) if (LAPACK_FOUND) if(LAPACK_LIBRARIES) @@ -200,7 +195,7 @@ elseif(BLA_VENDOR MATCHES "ACML*") ### # look for libs ### - find_package_lapack() + find_package_lapack(0) if (LAPACK_FOUND) if(BLAS_SEQ_LIBRARIES) @@ -235,7 +230,7 @@ else() # all the possibilities # BLA_F95 if set on tries to find the f95 interfaces for LAPACK/LAPACK # Remark: it looks only into paths contained in the system environment variables - find_package_lapack() + find_package_lapack(0) if(LAPACK_FOUND) set(LAPACK_SEQ_LIBRARIES "${LAPACK_LIBRARIES}") @@ -265,7 +260,7 @@ foreach(lapack_lib ${LAPACK_LIBRARIES}) else() get_filename_component(a_lapack_lib_dir "${lapack_lib}" PATH) if (EXISTS "${a_lapack_lib_dir}") - list(APPEND LAPACK_LIBRARY_DIRS "${a_lapack_lib_dir}" ) + list(APPEND LAPACK_LIBRARY_DIRS "${a_lapack_lib_dir}" ) endif() endif() endif() @@ -274,77 +269,70 @@ if (LAPACK_LIBRARY_DIRS) list(REMOVE_DUPLICATES LAPACK_LIBRARY_DIRS) endif () -# check that LAPACK has been found -# --------------------------------- +# check that LAPACKEXT has been found +# ----------------------------------- include(FindPackageHandleStandardArgs) if(BLA_VENDOR MATCHES "Intel*") - if(BLA_VENDOR MATCHES "Intel10_64lp*") if(NOT LAPACKEXT_FIND_QUIETLY) - message(STATUS "LAPACK found is Intel MKL:" - "\n we manage two lists of libs, one sequential and one parallel" - "\n (see LAPACK_SEQ_LIBRARIES and LAPACK_PAR_LIBRARIES)") + message(STATUS "LAPACK found is Intel MKL") message(STATUS "LAPACK sequential libraries stored in LAPACK_SEQ_LIBRARIES") endif() - find_package_handle_standard_args(LAPACK DEFAULT_MSG + find_package_handle_standard_args(LAPACKEXT DEFAULT_MSG LAPACK_SEQ_LIBRARIES LAPACK_LIBRARY_DIRS LAPACK_INCLUDE_DIRS) - if(LAPACK_PAR_LIBRARIES) + if(BLA_VENDOR MATCHES "Intel10_64lp*" AND LAPACK_PAR_LIBRARIES) if(NOT LAPACKEXT_FIND_QUIETLY) - message(STATUS "LAPACK parallel libraries stored in LAPACK_PAR_LIBRARIES") + message(STATUS "LAPACK parallel libraries stored in LAPACK_PAR_LIBRARIES") endif() - find_package_handle_standard_args(LAPACK DEFAULT_MSG - LAPACK_PAR_LIBRARIES) - endif() - - else() - if(NOT LAPACKEXT_FIND_QUIETLY) - message(STATUS "LAPACK sequential libraries stored in LAPACK_SEQ_LIBRARIES") + find_package_handle_standard_args(LAPACKEXT DEFAULT_MSG + LAPACK_PAR_LIBRARIES) endif() - find_package_handle_standard_args(LAPACK DEFAULT_MSG - LAPACK_SEQ_LIBRARIES - LAPACK_LIBRARY_DIRS - LAPACK_INCLUDE_DIRS) - endif() elseif(BLA_VENDOR MATCHES "ACML*") if(NOT LAPACKEXT_FIND_QUIETLY) - message(STATUS "LAPACK found is ACML:" - "\n we manage two lists of libs, one sequential and one parallel" - "\n (see LAPACK_SEQ_LIBRARIES and LAPACK_PAR_LIBRARIES)") + message(STATUS "LAPACK found is ACML") message(STATUS "LAPACK sequential libraries stored in LAPACK_SEQ_LIBRARIES") endif() - find_package_handle_standard_args(LAPACK DEFAULT_MSG + find_package_handle_standard_args(LAPACKEXT DEFAULT_MSG LAPACK_SEQ_LIBRARIES LAPACK_LIBRARY_DIRS) if(LAPACK_PAR_LIBRARIES) if(NOT LAPACKEXT_FIND_QUIETLY) message(STATUS "LAPACK parallel libraries stored in LAPACK_PAR_LIBRARIES") endif() - find_package_handle_standard_args(LAPACK DEFAULT_MSG + find_package_handle_standard_args(LAPACKEXT DEFAULT_MSG LAPACK_PAR_LIBRARIES) endif() elseif(BLA_VENDOR MATCHES "IBMESSL*") if(NOT LAPACKEXT_FIND_QUIETLY) - message(STATUS "LAPACK found is IBMESSL:" - "\n we manage two lists of libs, one sequential and one parallel" - "\n (see LAPACK_SEQ_LIBRARIES and LAPACK_PAR_LIBRARIES)") + message(STATUS "LAPACK found is IBMESSL") message(STATUS "LAPACK sequential libraries stored in LAPACK_SEQ_LIBRARIES") endif() - find_package_handle_standard_args(LAPACK DEFAULT_MSG + find_package_handle_standard_args(LAPACKEXT DEFAULT_MSG LAPACK_SEQ_LIBRARIES LAPACK_LIBRARY_DIRS) if(LAPACK_PAR_LIBRARIES) if(NOT LAPACKEXT_FIND_QUIETLY) message(STATUS "LAPACK parallel libraries stored in LAPACK_PAR_LIBRARIES") endif() - find_package_handle_standard_args(LAPACK DEFAULT_MSG + find_package_handle_standard_args(LAPACKEXT DEFAULT_MSG LAPACK_PAR_LIBRARIES) endif() else() if(NOT LAPACKEXT_FIND_QUIETLY) message(STATUS "LAPACK sequential libraries stored in LAPACK_SEQ_LIBRARIES") endif() - find_package_handle_standard_args(LAPACK DEFAULT_MSG + find_package_handle_standard_args(LAPACKEXT DEFAULT_MSG LAPACK_SEQ_LIBRARIES LAPACK_LIBRARY_DIRS) endif() + +if (LAPACK_LIBRARIES) + set(LAPACKEXT_LIBRARIES ${LAPACK_LIBRARIES}) +endif() +if (LAPACK_INCLUDE_DIRS) + set(LAPACKEXT_INCLUDE_DIRS ${LAPACK_INCLUDE_DIRS}) +endif() +if (LAPACK_LIBRARY_DIRS) + set(LAPACKEXT_LIBRARY_DIRS ${LAPACK_LIBRARY_DIRS}) +endif() diff --git a/CMakeModules/morse/find/FindMAGMA.cmake b/CMakeModules/morse/find/FindMAGMA.cmake index c4f740ae45770c404eba6d429ba79377266154a1..040aeac461498ce44e518c18e2c516aebdfe023a 100644 --- a/CMakeModules/morse/find/FindMAGMA.cmake +++ b/CMakeModules/morse/find/FindMAGMA.cmake @@ -1,4 +1,6 @@ ### +# WARNING: not maintained anymore +### # # @copyright (c) 2009-2014 The University of Tennessee and The University # of Tennessee Research Foundation. @@ -126,28 +128,28 @@ if(PKG_CONFIG_EXECUTABLE AND NOT MAGMA_GIVEN_BY_USER) #endif() else() message(STATUS "${Magenta}Looking for MAGMA - not found using PkgConfig. " - "\n Perhaps you should add the directory containing magma.pc " - "\n to the PKG_CONFIG_PATH environment variable.${ColourReset}") + "\n Perhaps you should add the directory containing magma.pc " + "\n to the PKG_CONFIG_PATH environment variable.${ColourReset}") endif() endif() if (MAGMA_FIND_VERSION_EXACT) if( NOT (MAGMA_FIND_VERSION_MAJOR STREQUAL MAGMA_VERSION_MAJOR) OR - NOT (MAGMA_FIND_VERSION_MINOR STREQUAL MAGMA_VERSION_MINOR) ) + NOT (MAGMA_FIND_VERSION_MINOR STREQUAL MAGMA_VERSION_MINOR) ) if(NOT MAGMA_FIND_QUIETLY) - message(FATAL_ERROR - "MAGMA version found is ${MAGMA_VERSION_STRING} " - "when required is ${MAGMA_FIND_VERSION}") + message(FATAL_ERROR + "MAGMA version found is ${MAGMA_VERSION_STRING} " + "when required is ${MAGMA_FIND_VERSION}") endif() endif() else() # if the version found is older than the required then error if( (MAGMA_FIND_VERSION_MAJOR STRGREATER MAGMA_VERSION_MAJOR) OR - (MAGMA_FIND_VERSION_MINOR STRGREATER MAGMA_VERSION_MINOR) ) + (MAGMA_FIND_VERSION_MINOR STRGREATER MAGMA_VERSION_MINOR) ) if(NOT MAGMA_FIND_QUIETLY) - message(FATAL_ERROR - "MAGMA version found is ${MAGMA_VERSION_STRING} " - "when required is ${MAGMA_FIND_VERSION} or newer") + message(FATAL_ERROR + "MAGMA version found is ${MAGMA_VERSION_STRING} " + "when required is ${MAGMA_FIND_VERSION} or newer") endif() endif() endif() @@ -219,14 +221,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT MAGMA_FOUND) O if(MAGMA_DIR) set(MAGMA_magma.h_DIRS "MAGMA_magma.h_DIRS-NOTFOUND") find_path(MAGMA_magma.h_DIRS - NAMES magma.h - HINTS ${MAGMA_DIR} - PATH_SUFFIXES "include" "include/magma") + NAMES magma.h + HINTS ${MAGMA_DIR} + PATH_SUFFIXES "include" "include/magma") else() set(MAGMA_magma.h_DIRS "MAGMA_magma.h_DIRS-NOTFOUND") find_path(MAGMA_magma.h_DIRS - NAMES magma.h - HINTS ${_inc_env}) + NAMES magma.h + HINTS ${_inc_env}) endif() endif() mark_as_advanced(MAGMA_magma.h_DIRS) @@ -260,9 +262,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT MAGMA_FOUND) O string(REPLACE ":" ";" _lib_env "$ENV{LIB}") else() if(APPLE) - string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") else() - string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") endif() list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") @@ -283,14 +285,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT MAGMA_FOUND) O if(MAGMA_DIR) set(MAGMA_magma_LIBRARY "MAGMA_magma_LIBRARY-NOTFOUND") find_library(MAGMA_magma_LIBRARY - NAMES magma - HINTS ${MAGMA_DIR} - PATH_SUFFIXES lib lib32 lib64) + NAMES magma + HINTS ${MAGMA_DIR} + PATH_SUFFIXES lib lib32 lib64) else() set(MAGMA_magma_LIBRARY "MAGMA_magma_LIBRARY-NOTFOUND") find_library(MAGMA_magma_LIBRARY - NAMES magma - HINTS ${_lib_env}) + NAMES magma + HINTS ${_lib_env}) endif() endif() mark_as_advanced(MAGMA_magma_LIBRARY) @@ -392,11 +394,11 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT MAGMA_FOUND) O list(REMOVE_DUPLICATES MAGMA_LINKER_FLAGS) else() if(NOT MAGMA_FIND_QUIETLY) - message(STATUS "Looking for magma : test of magma_dgetrf with - magma, cblas, cuda and lapack libraries fails") - message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") - message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") - message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") + message(STATUS "Looking for magma : test of magma_dgetrf with + magma, cblas, cuda and lapack libraries fails") + message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") + message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") + message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") endif() endif() set(CMAKE_REQUIRED_INCLUDES) @@ -410,12 +412,13 @@ if (MAGMA_LIBRARIES) if (MAGMA_LIBRARY_DIRS) foreach(dir ${MAGMA_LIBRARY_DIRS}) if ("${dir}" MATCHES "magma") - set(first_lib_path "${dir}") + set(first_lib_path "${dir}") endif() endforeach() else() list(GET MAGMA_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + set(MAGMA_LIBRARY_DIRS "${first_lib_path}") endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") diff --git a/CMakeModules/morse/find/FindMETIS.cmake b/CMakeModules/morse/find/FindMETIS.cmake index ea67563d7c7c7eabb4e71c7ee256d2b2e7808492..a50af750a44a4fbb49dea0bfe2c2b8dac99263fa 100644 --- a/CMakeModules/morse/find/FindMETIS.cmake +++ b/CMakeModules/morse/find/FindMETIS.cmake @@ -244,6 +244,9 @@ endif(METIS_LIBRARIES) if (METIS_LIBRARIES) list(GET METIS_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + if (NOT METIS_LIBRARY_DIRS) + set(METIS_LIBRARY_DIRS "${first_lib_path}") + endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") set(METIS_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of METIS library" FORCE) diff --git a/CMakeModules/morse/find/FindMPIEXT.cmake b/CMakeModules/morse/find/FindMPIEXT.cmake index 1409989751594a714a0d4d17a23adb194aff356e..417eccb6c1ba152b941701c6cef2afcec3287629 100644 --- a/CMakeModules/morse/find/FindMPIEXT.cmake +++ b/CMakeModules/morse/find/FindMPIEXT.cmake @@ -3,6 +3,7 @@ # This module allows to find MPI libraries by calling the official FindMPI module # and adds an additional variable indicating the level of thread supported: # MPI_THREAD_SUPPORTED_LEVEL - MPI_THREAD_MULTIPLE, MPI_THREAD_SERIALIZED, MPI_THREAD_FUNNELED, or MPI_THREAD_SINGLE +# MPIEXT_FOUND - if a MPI has been found #============================================================================= # Copyright 2012-2013 Inria @@ -29,8 +30,10 @@ if (NOT MPI_FOUND) find_package(MPI) endif() endif () +set(MPIEXT_FOUND ${MPI_FOUND}) if (MPI_FOUND) + set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES}) set(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES}) set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS}) @@ -103,9 +106,9 @@ int main(int argc, char **argv) { if(NOT SERIALIZED_TEST_RUNS) check_c_source_runs("${MPI_C_TEST_FUNNELED_SOURCE}" FUNNELED_TEST_RUNS) if(NOT FUNNELED_TEST_RUNS) - set(MPI_THREAD_SUPPORTED_LEVEL "MPI_THREAD_SINGLE") + set(MPI_THREAD_SUPPORTED_LEVEL "MPI_THREAD_SINGLE") else(NOT FUNNELED_TEST_RUNS) - set(MPI_THREAD_SUPPORTED_LEVEL "MPI_THREAD_FUNNELED") + set(MPI_THREAD_SUPPORTED_LEVEL "MPI_THREAD_FUNNELED") endif(NOT FUNNELED_TEST_RUNS) else(NOT SERIALIZED_TEST_RUNS) set(MPI_THREAD_SUPPORTED_LEVEL "MPI_THREAD_SERIALIZED") @@ -117,4 +120,5 @@ int main(int argc, char **argv) { set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE}) set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE}) set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE}) + endif(MPI_FOUND) diff --git a/CMakeModules/morse/find/FindMUMPS.cmake b/CMakeModules/morse/find/FindMUMPS.cmake index f901df48e104f3b7c309c06b5f2686990ed69efd..4e991e310559f80678671f4a9a6871257d337c56 100644 --- a/CMakeModules/morse/find/FindMUMPS.cmake +++ b/CMakeModules/morse/find/FindMUMPS.cmake @@ -341,16 +341,16 @@ else() set(MUMPS_${mumps_hdr}_DIRS "MUMPS_${mumps_hdr}_INCLUDE_DIRS-NOTFOUND") foreach(mumps_hdr ${MUMPS_hdrs_to_find}) find_path(MUMPS_${mumps_hdr}_DIRS - NAMES ${mumps_hdr} - HINTS ${MUMPS_DIR} - PATH_SUFFIXES "include") + NAMES ${mumps_hdr} + HINTS ${MUMPS_DIR} + PATH_SUFFIXES "include") endforeach() else() foreach(mumps_hdr ${MUMPS_hdrs_to_find}) set(MUMPS_${mumps_hdr}_DIRS "MUMPS_${mumps_hdr}_INCLUDE_DIRS-NOTFOUND") find_path(MUMPS_${mumps_hdr}_DIRS - NAMES ${mumps_hdr} - HINTS ${_inc_env}) + NAMES ${mumps_hdr} + HINTS ${_inc_env}) endforeach() endif() endif() @@ -434,16 +434,16 @@ else() foreach(mumps_lib ${MUMPS_libs_to_find}) set(MUMPS_${mumps_lib}_LIBRARY "MUMPS_${mumps_lib}_LIBRARY-NOTFOUND") find_library(MUMPS_${mumps_lib}_LIBRARY - NAMES ${mumps_lib} - HINTS ${MUMPS_DIR} - PATH_SUFFIXES lib lib32 lib64) + NAMES ${mumps_lib} + HINTS ${MUMPS_DIR} + PATH_SUFFIXES lib lib32 lib64) endforeach() else() foreach(mumps_lib ${MUMPS_libs_to_find}) set(MUMPS_${mumps_lib}_LIBRARY "MUMPS_${mumps_lib}_LIBRARY-NOTFOUND") find_library(MUMPS_${mumps_lib}_LIBRARY - NAMES ${mumps_lib} - HINTS ${_lib_env}) + NAMES ${mumps_lib} + HINTS ${_lib_env}) endforeach() endif() endif() @@ -587,7 +587,7 @@ if(MUMPS_LIBRARIES) endif() foreach(libdir ${SCALAPACK_LIBRARY_DIRS}) if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") + list(APPEND REQUIRED_LIBDIRS "${libdir}") endif() endforeach() list(APPEND REQUIRED_LIBS "${SCALAPACK_LIBRARIES}") @@ -602,7 +602,7 @@ if(MUMPS_LIBRARIES) endif() if (MPI_Fortran_LINK_FLAGS) if (${MPI_Fortran_LINK_FLAGS} MATCHES " -") - string(REGEX REPLACE " -" "-" MPI_Fortran_LINK_FLAGS ${MPI_Fortran_LINK_FLAGS}) + string(REGEX REPLACE " -" "-" MPI_Fortran_LINK_FLAGS ${MPI_Fortran_LINK_FLAGS}) endif() list(APPEND REQUIRED_LDFLAGS "${MPI_Fortran_LINK_FLAGS}") endif() @@ -615,7 +615,7 @@ if(MUMPS_LIBRARIES) endif() foreach(libdir ${BLAS_LIBRARY_DIRS}) if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") + list(APPEND REQUIRED_LIBDIRS "${libdir}") endif() endforeach() list(APPEND REQUIRED_LIBS "${BLAS_LIBRARIES}") @@ -630,7 +630,7 @@ if(MUMPS_LIBRARIES) endif() foreach(libdir ${SCOTCH_LIBRARY_DIRS}) if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") + list(APPEND REQUIRED_LIBDIRS "${libdir}") endif() endforeach() list(APPEND REQUIRED_LIBS "${SCOTCH_LIBRARIES}") @@ -642,7 +642,7 @@ if(MUMPS_LIBRARIES) endif() foreach(libdir ${PTSCOTCH_LIBRARY_DIRS}) if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") + list(APPEND REQUIRED_LIBDIRS "${libdir}") endif() endforeach() list(APPEND REQUIRED_LIBS "${PTSCOTCH_LIBRARIES}") @@ -654,7 +654,7 @@ if(MUMPS_LIBRARIES) endif() foreach(libdir ${METIS_LIBRARY_DIRS}) if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") + list(APPEND REQUIRED_LIBDIRS "${libdir}") endif() endforeach() list(APPEND REQUIRED_LIBS "${METIS_LIBRARIES}") @@ -666,7 +666,7 @@ if(MUMPS_LIBRARIES) endif() foreach(libdir ${PARMETIS_LIBRARY_DIRS}) if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") + list(APPEND REQUIRED_LIBDIRS "${libdir}") endif() endforeach() list(APPEND REQUIRED_LIBS "${PARMETIS_LIBRARIES}") @@ -746,8 +746,8 @@ if(MUMPS_LIBRARIES) message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") message(STATUS "Maybe MUMPS is linked with specific libraries. " - "Have you tried with COMPONENTS (MPI/SEQ, SCOTCH, PTSCOTCH, METIS, PARMETIS)? " - "See the explanation in FindMUMPS.cmake.") + "Have you tried with COMPONENTS (MPI/SEQ, SCOTCH, PTSCOTCH, METIS, PARMETIS)? " + "See the explanation in FindMUMPS.cmake.") endif() endif() @@ -760,6 +760,9 @@ endif(MUMPS_LIBRARIES) if (MUMPS_LIBRARIES) list(GET MUMPS_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + if (NOT MUMPS_LIBRARY_DIRS) + set(MUMPS_LIBRARY_DIRS "${first_lib_path}") + endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") set(MUMPS_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of MUMPS library" FORCE) diff --git a/CMakeModules/morse/find/FindPAMPA.cmake b/CMakeModules/morse/find/FindPAMPA.cmake index f5f295376f61cbc9bd902a8321217890e428e6f3..8ff5e466e3ba795ec4ca6b3da21f75b6262609b6 100644 --- a/CMakeModules/morse/find/FindPAMPA.cmake +++ b/CMakeModules/morse/find/FindPAMPA.cmake @@ -128,18 +128,18 @@ else() foreach(pampa_hdr ${PAMPA_hdrs_to_find}) set(PAMPA_${pampa_hdr}_DIRS "PAMPA_${pampa_hdr}_DIRS-NOTFOUND") find_path(PAMPA_${pampa_hdr}_DIRS - NAMES ${pampa_hdr} - HINTS ${PAMPA_DIR} - PATH_SUFFIXES "include" "include/pampa") + NAMES ${pampa_hdr} + HINTS ${PAMPA_DIR} + PATH_SUFFIXES "include" "include/pampa") mark_as_advanced(PAMPA_${pampa_hdr}_DIRS) endforeach() else() foreach(pampa_hdr ${PAMPA_hdrs_to_find}) set(PAMPA_${pampa_hdr}_DIRS "PAMPA_${pampa_hdr}_DIRS-NOTFOUND") find_path(PAMPA_${pampa_hdr}_DIRS - NAMES ${pampa_hdr} - HINTS ${_inc_env} - PATH_SUFFIXES "pampa") + NAMES ${pampa_hdr} + HINTS ${_inc_env} + PATH_SUFFIXES "pampa") mark_as_advanced(PAMPA_${pampa_hdr}_DIRS) endforeach() endif() @@ -203,16 +203,16 @@ else() foreach(pampa_lib ${PAMPA_libs_to_find}) set(PAMPA_${pampa_lib}_LIBRARY "PAMPA_${pampa_lib}_LIBRARY-NOTFOUND") find_library(PAMPA_${pampa_lib}_LIBRARY - NAMES ${pampa_lib} - HINTS ${PAMPA_DIR} - PATH_SUFFIXES lib lib32 lib64) + NAMES ${pampa_lib} + HINTS ${PAMPA_DIR} + PATH_SUFFIXES lib lib32 lib64) endforeach() else() foreach(pampa_lib ${PAMPA_libs_to_find}) set(PAMPA_${pampa_lib}_LIBRARY "PAMPA_${pampa_lib}_LIBRARY-NOTFOUND") find_library(PAMPA_${pampa_lib}_LIBRARY - NAMES ${pampa_lib} - HINTS ${_lib_env}) + NAMES ${pampa_lib} + HINTS ${_lib_env}) endforeach() endif() endif() @@ -265,7 +265,7 @@ if(PAMPA_LIBRARIES) endif() if (MPI_C_LINK_FLAGS) if (${MPI_C_LINK_FLAGS} MATCHES " -") - string(REGEX REPLACE " -" "-" MPI_C_LINK_FLAGS ${MPI_C_LINK_FLAGS}) + string(REGEX REPLACE " -" "-" MPI_C_LINK_FLAGS ${MPI_C_LINK_FLAGS}) endif() list(APPEND REQUIRED_LDFLAGS "${MPI_C_LINK_FLAGS}") endif() @@ -323,6 +323,9 @@ endif(PAMPA_LIBRARIES) if (PAMPA_LIBRARIES) list(GET PAMPA_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + if (NOT PAMPA_LIBRARY_DIRS) + set(PAMPA_LIBRARY_DIRS "${first_lib_path}") + endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") set(PAMPA_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of PAMPA library" FORCE) diff --git a/CMakeModules/morse/find/FindPAPI.cmake b/CMakeModules/morse/find/FindPAPI.cmake index c8395aec200cd97500ecb3364e3d621c1fa3ec16..0bc40483b79ae64974ca0dcc70f37258090a9a3d 100644 --- a/CMakeModules/morse/find/FindPAPI.cmake +++ b/CMakeModules/morse/find/FindPAPI.cmake @@ -78,8 +78,8 @@ if(PKG_CONFIG_EXECUTABLE AND NOT PAPI_GIVEN_BY_USER) #endif() else() message(STATUS "${Magenta}Looking for PAPI - not found using PkgConfig." - "\n Perhaps you should add the directory containing papi.pc to the" - "\n PKG_CONFIG_PATH environment variable.${ColourReset}") + "\n Perhaps you should add the directory containing papi.pc to the" + "\n PKG_CONFIG_PATH environment variable.${ColourReset}") endif() endif() @@ -137,15 +137,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT PAPI_FOUND) OR if(PAPI_DIR) set(PAPI_papi.h_DIRS "PAPI_papi.h_DIRS-NOTFOUND") find_path(PAPI_papi.h_DIRS - NAMES papi.h - HINTS ${PAPI_DIR} - PATH_SUFFIXES "include" "include/papi") + NAMES papi.h + HINTS ${PAPI_DIR} + PATH_SUFFIXES "include" "include/papi") else() set(PAPI_papi.h_DIRS "PAPI_papi.h_DIRS-NOTFOUND") find_path(PAPI_papi.h_DIRS - NAMES papi.h - HINTS ${_inc_env} - PATH_SUFFIXES "papi") + NAMES papi.h + HINTS ${_inc_env} + PATH_SUFFIXES "papi") endif() endif() mark_as_advanced(PAPI_papi.h_DIRS) @@ -183,9 +183,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT PAPI_FOUND) OR string(REPLACE ":" ";" _lib_env "$ENV{LIB}") else() if(APPLE) - string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") else() - string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") endif() list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") @@ -206,14 +206,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT PAPI_FOUND) OR if(PAPI_DIR) set(PAPI_papi_LIBRARY "PAPI_papi_LIBRARY-NOTFOUND") find_library(PAPI_papi_LIBRARY - NAMES papi - HINTS ${PAPI_DIR} - PATH_SUFFIXES lib lib32 lib64) + NAMES papi + HINTS ${PAPI_DIR} + PATH_SUFFIXES lib lib32 lib64) else() set(PAPI_papi_LIBRARY "PAPI_papi_LIBRARY-NOTFOUND") find_library(PAPI_papi_LIBRARY - NAMES papi - HINTS ${_lib_env}) + NAMES papi + HINTS ${_lib_env}) endif() endif() mark_as_advanced(PAPI_papi_LIBRARY) @@ -270,10 +270,10 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT PAPI_FOUND) OR if(NOT PAPI_WORKS) if(NOT PAPI_FIND_QUIETLY) - message(STATUS "Looking for papi : test of PAPI_start with papi library fails") - message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") - message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") - message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") + message(STATUS "Looking for papi : test of PAPI_start with papi library fails") + message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") + message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") + message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") endif() endif() set(CMAKE_REQUIRED_INCLUDES) @@ -289,6 +289,7 @@ if (PAPI_LIBRARIES) else() list(GET PAPI_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + set(PAPI_LIBRARY_DIRS "${first_lib_path}") endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") diff --git a/CMakeModules/morse/find/FindPARMETIS.cmake b/CMakeModules/morse/find/FindPARMETIS.cmake index fd2bd3f49c8b3d230868f0b228ca7b363c735872..427f046d83e49057fe516f648db8a1c0236104f7 100644 --- a/CMakeModules/morse/find/FindPARMETIS.cmake +++ b/CMakeModules/morse/find/FindPARMETIS.cmake @@ -3,7 +3,7 @@ # @copyright (c) 2009-2014 The University of Tennessee and The University # of Tennessee Research Foundation. # All rights reserved. -# @copyright (c) 2012-2014 Inria. All rights reserved. +# @copyright (c) 2012-2017 Inria. All rights reserved. # @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved. # ### @@ -14,6 +14,10 @@ # [REQUIRED] # Fail with error if parmetis is not found # ) # +# PARMETIS depends on the following libraries: +# - METIS +# - MPI +# # This module finds headers and parmetis library. # Results are reported in variables: # PARMETIS_FOUND - True if headers and requested libraries were found @@ -23,9 +27,12 @@ # # The user can give specific paths where to find the libraries adding cmake # options at configure (ex: cmake path/to/project -DPARMETIS_DIR=path/to/parmetis): -# PARMETIS_DIR - Where to find the base directory of parmetis -# PARMETIS_INCDIR - Where to find the header files -# PARMETIS_LIBDIR - Where to find the library files +# PARMETIS_DIR - Where to find the base directory of parmetis +# PARMETIS_INCDIR - Where to find the header files +# PARMETIS_LIBDIR - Where to find the library files +# PARMETIS_INCLUDE_DIRS_DEP - parmetis + dependencies include directories +# PARMETIS_LIBRARY_DIRS_DEP - parmetis + dependencies link directories +# PARMETIS_LIBRARIES_DEP - parmetis libraries + dependencies # The module can also look for the following environment variables if paths # are not given as cmake variable: PARMETIS_DIR, PARMETIS_INCDIR, PARMETIS_LIBDIR @@ -34,7 +41,7 @@ # Copyright 2012-2013 Emmanuel Agullo # Copyright 2012-2013 Mathieu Faverge # Copyright 2012 Cedric Castagnede -# Copyright 2013 Florent Pruvost +# Copyright 2017 Florent Pruvost # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file MORSE-Copyright.txt for details. @@ -53,6 +60,23 @@ if (NOT PARMETIS_FOUND) endif() endif() +# PARMETIS depends on METIS, try to find it +if (NOT METIS_FOUND) + if(PARMETIS_FIND_REQUIRED) + find_package(METIS REQUIRED) + else() + find_package(METIS) + endif() +endif() + +# PARMETIS depends on MPI, try to find it +if (NOT MPI_FOUND) + if(PARMETIS_FIND_REQUIRED) + find_package(MPI REQUIRED) + else() + find_package(MPI) + endif() +endif() # Looking for include # ------------------- @@ -205,6 +229,31 @@ if(PARMETIS_LIBRARIES) set(REQUIRED_LIBDIRS "${PARMETIS_LIBRARY_DIRS}") endif() set(REQUIRED_LIBS "${PARMETIS_LIBRARIES}") + # METIS + if (METIS_FOUND) + if (METIS_INCLUDE_DIRS) + list(APPEND REQUIRED_INCDIRS "${METIS_INCLUDE_DIRS}") + endif() + foreach(libdir ${METIS_LIBRARY_DIRS}) + if (libdir) + list(APPEND REQUIRED_LIBDIRS "${libdir}") + endif() + endforeach() + list(APPEND REQUIRED_LIBS "${METIS_LIBRARIES}") + endif() + # MPI + if (MPI_FOUND) + if (MPI_C_INCLUDE_PATH) + list(APPEND REQUIRED_INCDIRS "${MPI_C_INCLUDE_PATH}") + endif() + if (MPI_C_LINK_FLAGS) + if (${MPI_C_LINK_FLAGS} MATCHES " -") + string(REGEX REPLACE " -" "-" MPI_C_LINK_FLAGS ${MPI_C_LINK_FLAGS}) + endif() + list(APPEND REQUIRED_LDFLAGS "${MPI_C_LINK_FLAGS}") + endif() + list(APPEND REQUIRED_LIBS "${MPI_C_LIBRARIES}") + endif() # m find_library(M_LIBRARY NAMES m) mark_as_advanced(M_LIBRARY) @@ -227,7 +276,16 @@ if(PARMETIS_LIBRARIES) check_function_exists(ParMETIS_V3_NodeND PARMETIS_WORKS) mark_as_advanced(PARMETIS_WORKS) - if(NOT PARMETIS_WORKS) + if(PARMETIS_WORKS) + # save link with dependencies + set(PARMETIS_LIBRARIES_DEP "${REQUIRED_LIBS}") + set(PARMETIS_LIBRARY_DIRS_DEP "${REQUIRED_LIBDIRS}") + set(PARMETIS_INCLUDE_DIRS_DEP "${REQUIRED_INCDIRS}") + set(PARMETIS_LINKER_FLAGS "${REQUIRED_LDFLAGS}") + list(REMOVE_DUPLICATES PARMETIS_LIBRARY_DIRS_DEP) + list(REMOVE_DUPLICATES PARMETIS_INCLUDE_DIRS_DEP) + list(REMOVE_DUPLICATES PARMETIS_LINKER_FLAGS) + else() if(NOT PARMETIS_FIND_QUIETLY) message(STATUS "Looking for PARMETIS : test of ParMETIS_V3_NodeND with PARMETIS library fails") message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") @@ -243,6 +301,9 @@ endif(PARMETIS_LIBRARIES) if (PARMETIS_LIBRARIES) list(GET PARMETIS_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + if (NOT PARMETIS_LIBRARY_DIRS) + set(PARMETIS_LIBRARY_DIRS "${first_lib_path}") + endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") set(PARMETIS_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of PARMETIS library" FORCE) diff --git a/CMakeModules/morse/find/FindPARSEC.cmake b/CMakeModules/morse/find/FindPARSEC.cmake index dd79f3e81d37615b6f0074c2beb6e97c09c83ea5..b6768b20c099aa9ed68b1fb9914bffbd64677ede 100644 --- a/CMakeModules/morse/find/FindPARSEC.cmake +++ b/CMakeModules/morse/find/FindPARSEC.cmake @@ -626,6 +626,7 @@ if (PARSEC_LIBRARIES) else() list(GET PARSEC_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + set(PARSEC_LIBRARY_DIRS "${first_lib_path}") endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") diff --git a/CMakeModules/morse/find/FindPASTIX.cmake b/CMakeModules/morse/find/FindPASTIX.cmake index bb278e924e556cf909eb7674542bb90277b7dbbf..0123113d37847bacc0a032506279a2ffaf5a234b 100644 --- a/CMakeModules/morse/find/FindPASTIX.cmake +++ b/CMakeModules/morse/find/FindPASTIX.cmake @@ -27,6 +27,7 @@ # - MPI: to activate detection of the parallel MPI version (default) # it looks for Threads, HWLOC, BLAS, MPI and ScaLAPACK libraries # - SEQ: to activate detection of the sequential version (exclude MPI version) +# - PARSEC: to activate detection of PASTIX with PARSEC # - STARPU: to activate detection of StarPU version # it looks for MPI version of StarPU (default behaviour) # if SEQ and STARPU are given, it looks for a StarPU without MPI @@ -84,6 +85,7 @@ endif() set(PASTIX_LOOK_FOR_MPI ON) set(PASTIX_LOOK_FOR_SEQ OFF) set(PASTIX_LOOK_FOR_STARPU OFF) +set(PASTIX_LOOK_FOR_PARSEC OFF) set(PASTIX_LOOK_FOR_STARPU_CUDA OFF) set(PASTIX_LOOK_FOR_STARPU_FXT OFF) set(PASTIX_LOOK_FOR_SCOTCH ON) @@ -102,6 +104,9 @@ if( PASTIX_FIND_COMPONENTS ) set(PASTIX_LOOK_FOR_SEQ OFF) set(PASTIX_LOOK_FOR_MPI ON) endif() + if (${component} STREQUAL "PARSEC") + set(PASTIX_LOOK_FOR_PARSEC ON) + endif() if (${component} STREQUAL "STARPU") # means we look for PaStiX with StarPU set(PASTIX_LOOK_FOR_STARPU ON) @@ -165,7 +170,7 @@ if(UNIX OR WIN32) else() if (PASTIX_FIND_REQUIRED) message(FATAL_ERROR "Could NOT find libm on your system." - "Are you sure to a have a C compiler installed?") + "Are you sure to a have a C compiler installed?") endif() endif() endif() @@ -240,6 +245,19 @@ if (NOT MPI_FOUND AND PASTIX_LOOK_FOR_MPI) endif() endif (NOT MPI_FOUND AND PASTIX_LOOK_FOR_MPI) +# PASTIX may depends on SCOTCH +#----------------------------- +if (NOT PARSEC_FOUND AND PASTIX_LOOK_FOR_PARSEC) + if (NOT PASTIX_FIND_QUIETLY) + message(STATUS "Looking for PASTIX - Try to detect PARSEC") + endif() + if (PASTIX_FIND_REQUIRED AND PASTIX_FIND_REQUIRED_PARSEC) + find_package(PARSEC REQUIRED) + else() + find_package(PARSEC) + endif() +endif() + # PASTIX may depend on STARPU #---------------------------- if( NOT STARPU_FOUND AND PASTIX_LOOK_FOR_STARPU) @@ -446,16 +464,16 @@ else() foreach(pastix_lib ${PASTIX_libs_to_find}) set(PASTIX_${pastix_lib}_LIBRARY "PASTIX_${pastix_lib}_LIBRARY-NOTFOUND") find_library(PASTIX_${pastix_lib}_LIBRARY - NAMES ${pastix_lib} - HINTS ${PASTIX_DIR} - PATH_SUFFIXES lib lib32 lib64) + NAMES ${pastix_lib} + HINTS ${PASTIX_DIR} + PATH_SUFFIXES lib lib32 lib64) endforeach() else() foreach(pastix_lib ${PASTIX_libs_to_find}) set(PASTIX_${pastix_lib}_LIBRARY "PASTIX_${pastix_lib}_LIBRARY-NOTFOUND") find_library(PASTIX_${pastix_lib}_LIBRARY - NAMES ${pastix_lib} - HINTS ${_lib_env}) + NAMES ${pastix_lib} + HINTS ${_lib_env}) endforeach() endif() endif() @@ -498,6 +516,30 @@ if(PASTIX_LIBRARIES) endif() endforeach() set(REQUIRED_LIBS "${PASTIX_LIBRARIES}") + # PARSEC + if (PASTIX_LOOK_FOR_PARSEC AND PARSEC_FOUND) + if (PARSEC_INCLUDE_DIRS_DEP) + list(APPEND REQUIRED_INCDIRS "${PARSEC_INCLUDE_DIRS_DEP}") + elseif (PARSEC_INCLUDE_DIRS) + list(APPEND REQUIRED_INCDIRS "${PARSEC_INCLUDE_DIRS}") + endif() + if(PARSEC_LIBRARY_DIRS_DEP) + list(APPEND REQUIRED_LIBDIRS "${PARSEC_LIBRARY_DIRS_DEP}") + elseif(PARSEC_LIBRARY_DIRS) + list(APPEND REQUIRED_LIBDIRS "${PARSEC_LIBRARY_DIRS}") + endif() + if (PARSEC_LIBRARIES_DEP) + list(APPEND REQUIRED_LIBS "${PARSEC_LIBRARIES_DEP}") + elseif (PARSEC_LIBRARIES) + foreach(lib ${PARSEC_LIBRARIES}) + if (EXISTS ${lib} OR ${lib} MATCHES "^-") + list(APPEND REQUIRED_LIBS "${lib}") + else() + list(APPEND REQUIRED_LIBS "-l${lib}") + endif() + endforeach() + endif() + endif() # STARPU if (PASTIX_LOOK_FOR_STARPU AND STARPU_FOUND) if (STARPU_INCLUDE_DIRS_DEP) @@ -514,11 +556,11 @@ if(PASTIX_LIBRARIES) list(APPEND REQUIRED_LIBS "${STARPU_LIBRARIES_DEP}") elseif (STARPU_LIBRARIES) foreach(lib ${STARPU_LIBRARIES}) - if (EXISTS ${lib} OR ${lib} MATCHES "^-") - list(APPEND REQUIRED_LIBS "${lib}") - else() - list(APPEND REQUIRED_LIBS "-l${lib}") - endif() + if (EXISTS ${lib} OR ${lib} MATCHES "^-") + list(APPEND REQUIRED_LIBS "${lib}") + else() + list(APPEND REQUIRED_LIBS "-l${lib}") + endif() endforeach() endif() endif() @@ -529,7 +571,7 @@ if(PASTIX_LIBRARIES) endif() foreach(libdir ${CUDA_LIBRARY_DIRS}) if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") + list(APPEND REQUIRED_LIBDIRS "${libdir}") endif() endforeach() list(APPEND REQUIRED_LIBS "${CUDA_CUBLAS_LIBRARIES};${CUDA_LIBRARIES}") @@ -541,7 +583,7 @@ if(PASTIX_LIBRARIES) endif() if (MPI_C_LINK_FLAGS) if (${MPI_C_LINK_FLAGS} MATCHES " -") - string(REGEX REPLACE " -" "-" MPI_C_LINK_FLAGS ${MPI_C_LINK_FLAGS}) + string(REGEX REPLACE " -" "-" MPI_C_LINK_FLAGS ${MPI_C_LINK_FLAGS}) endif() list(APPEND REQUIRED_LDFLAGS "${MPI_C_LINK_FLAGS}") endif() @@ -554,14 +596,14 @@ if(PASTIX_LIBRARIES) endif() foreach(libdir ${HWLOC_LIBRARY_DIRS}) if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") + list(APPEND REQUIRED_LIBDIRS "${libdir}") endif() endforeach() foreach(lib ${HWLOC_LIBRARIES}) if (EXISTS ${lib} OR ${lib} MATCHES "^-") - list(APPEND REQUIRED_LIBS "${lib}") + list(APPEND REQUIRED_LIBS "${lib}") else() - list(APPEND REQUIRED_LIBS "-l${lib}") + list(APPEND REQUIRED_LIBS "-l${lib}") endif() endforeach() endif() @@ -572,7 +614,7 @@ if(PASTIX_LIBRARIES) endif() foreach(libdir ${BLAS_LIBRARY_DIRS}) if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") + list(APPEND REQUIRED_LIBDIRS "${libdir}") endif() endforeach() list(APPEND REQUIRED_LIBS "${BLAS_LIBRARIES}") @@ -587,7 +629,7 @@ if(PASTIX_LIBRARIES) endif() foreach(libdir ${SCOTCH_LIBRARY_DIRS}) if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") + list(APPEND REQUIRED_LIBDIRS "${libdir}") endif() endforeach() list(APPEND REQUIRED_LIBS "${SCOTCH_LIBRARIES}") @@ -599,7 +641,7 @@ if(PASTIX_LIBRARIES) endif() foreach(libdir ${PTSCOTCH_LIBRARY_DIRS}) if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") + list(APPEND REQUIRED_LIBDIRS "${libdir}") endif() endforeach() list(APPEND REQUIRED_LIBS "${PTSCOTCH_LIBRARIES}") @@ -611,7 +653,7 @@ if(PASTIX_LIBRARIES) endif() foreach(libdir ${METIS_LIBRARY_DIRS}) if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") + list(APPEND REQUIRED_LIBDIRS "${libdir}") endif() endforeach() list(APPEND REQUIRED_LIBS "${METIS_LIBRARIES}") @@ -674,8 +716,8 @@ if(PASTIX_LIBRARIES) message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") message(STATUS "Maybe PASTIX is linked with specific libraries. " - "Have you tried with COMPONENTS (MPI/SEQ, STARPU, STARPU_CUDA, SCOTCH, PTSCOTCH, METIS)? " - "See the explanation in FindPASTIX.cmake.") + "Have you tried with COMPONENTS (MPI/SEQ, PARSEC, STARPU, STARPU_CUDA, SCOTCH, PTSCOTCH, METIS)? " + "See the explanation in FindPASTIX.cmake.") endif() endif() set(CMAKE_REQUIRED_INCLUDES) @@ -686,6 +728,9 @@ endif(PASTIX_LIBRARIES) if (PASTIX_LIBRARIES) list(GET PASTIX_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + if (NOT PASTIX_LIBRARY_DIRS) + set(PASTIX_LIBRARY_DIRS "${first_lib_path}") + endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") set(PASTIX_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of PASTIX library" FORCE) diff --git a/CMakeModules/morse/find/FindPETSc.cmake b/CMakeModules/morse/find/FindPETSc.cmake index 1d7fb85953fbc681b3d0896d5602e9d2744610a7..c38f253f16b2654e22e32a01338a4bf42f24359d 100644 --- a/CMakeModules/morse/find/FindPETSc.cmake +++ b/CMakeModules/morse/find/FindPETSc.cmake @@ -1,318 +1,204 @@ -# - Try to find PETSc -# Once done this will define # -# PETSC_FOUND - system has PETSc -# PETSC_INCLUDES - the PETSc include directories -# PETSC_LIBRARIES - Link these to use PETSc -# PETSC_COMPILER - Compiler used by PETSc, helpful to find a compatible MPI -# PETSC_DEFINITIONS - Compiler switches for using PETSc +# @copyright (c) 2018 Inria. All rights reserved. +# +# Marc Fuentes +# Florent Pruvost +# +# https://gitlab.inria.fr/sed-bso/findPetsc +# +# INPUT +# ----- +# +# PETSc is not installed in a standard way on Unix systems so that +# this module requires hints to know where PETSc is installed. Please +# give the installation directory (contains ./include/petsc.h, ./lib/, etc): +# 1. by setting the PETSC_DIR variable +# a. as an environment variable, e.g. +# $ export PETSC_DIR=/usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real +# b. or as an CMake variable, e.g. +# $ cmake .. -DPETSC_DIR==/usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real +# 2. or by using the pkg-config mechanism, e.g. +# $ export PKG_CONFIG_PATH=/usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/lib/pkgconfig:$PKG_CONFIG_PATH +# +# OUTPUT +# ------- +# PETSC_INCLUDE_DIRS - the PETSc include directories +# PETSC_LIBRARIES - Link these to use PETSc +# PETSC_LIBRARY_DIRS - Link these to use PETSc # PETSC_MPIEXEC - Executable for running MPI programs -# PETSC_VERSION - Version string (MAJOR.MINOR.SUBMINOR) # -# Usage: -# find_package(PETSc COMPONENTS CXX) - required if build --with-clanguage=C++ --with-c-support=0 -# find_package(PETSc COMPONENTS C) - standard behavior of checking build using a C compiler -# find_package(PETSc) - same as above +# if pkg-config is used i.e. pkgconfig installed, PETSc.pc file path +# in the PKG_CONFIG_PATH environment variable and PETSC_DIR not set +# then the following variables are set (or empty) # -# Setting these changes the behavior of the search -# PETSC_DIR - directory in which PETSc resides -# PETSC_ARCH - build architecture +# PETSC_VERSION ... version of the module +# PETSC_PREFIX ... prefix-directory of the module +# PETSC_INCLUDEDIR ... include-dir of the module +# PETSC_LIBDIR ... lib-dir of the module # -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# <PREFIX>_FOUND ... set to 1 if module(s) exist +# <PREFIX>_LIBRARIES ... only the libraries (w/o the '-l') +# <PREFIX>_LIBRARY_DIRS ... the paths of the libraries (w/o the '-L') +# <PREFIX>_LDFLAGS ... all required linker flags +# <PREFIX>_LDFLAGS_OTHER ... all other linker flags +# <PREFIX>_INCLUDE_DIRS ... the '-I' preprocessor flags (w/o the '-I') +# <PREFIX>_CFLAGS ... all required cflags +# <PREFIX>_CFLAGS_OTHER ... the other compiler flags # +# <PREFIX> = PETSC for common case +# <PREFIX> = PETSC_STATIC for static linking +# +# find_package(PETSc [QUIET] [REQUIRED]) +# +# Setting these changes the behavior of the search +# PETSC_DIR - directory in which PETSc is installed +# PETSC_ARCH - build architecture -function (petsc_get_version) - if (EXISTS "${PETSC_DIR}/include/petscversion.h") - file (STRINGS "${PETSC_DIR}/include/petscversion.h" vstrings REGEX "#define PETSC_VERSION_(RELEASE|MAJOR|MINOR|SUBMINOR|PATCH) ") - foreach (line ${vstrings}) - string (REGEX REPLACE " +" ";" fields ${line}) # break line into three fields (the first is always "#define") - list (GET fields 1 var) - list (GET fields 2 val) - set (${var} ${val} PARENT_SCOPE) - set (${var} ${val}) # Also in local scope so we have access below - endforeach () - if (PETSC_VERSION_RELEASE) - set (PETSC_VERSION "${PETSC_VERSION_MAJOR}.${PETSC_VERSION_MINOR}.${PETSC_VERSION_SUBMINOR}p${PETSC_VERSION_PATCH}" PARENT_SCOPE) - else () - # make dev version compare higher than any patch level of a released version - set (PETSC_VERSION "${PETSC_VERSION_MAJOR}.${PETSC_VERSION_MINOR}.${PETSC_VERSION_SUBMINOR}.99" PARENT_SCOPE) - endif () - else () - message (SEND_ERROR "PETSC_DIR can not be used, ${PETSC_DIR}/include/petscversion.h does not exist") - endif () -endfunction () - -find_path (PETSC_DIR include/petsc.h - HINTS ENV PETSC_DIR - PATHS - ${AEROSOL_TOP_DIR}/../../petsc-3.3-p4 ${AEROSOL_TOP_DIR}/../../petsc-3.2-p7 ${AEROSOL_TOP_DIR}/../../petsc-3.2-p6 ${AEROSOL_TOP_DIR}/../../petsc-3.2-p5 - ${AEROSOL_TOP_DIR}/../../petsc - /usr/lib/petscdir/3.1 /usr/lib/petscdir/3.0.0 /usr/lib/petscdir/2.3.3 /usr/lib/petscdir/2.3.2 # Debian - $ENV{HOME}/petsc - DOC "PETSc Directory") - - -find_program (MAKE_EXECUTABLE NAMES make gmake) +# create a cmake cache variable +set(PETSC_DIR "" CACHE PATH "Installation directory of PETSC library") +if (NOT PETSc_FIND_QUIETLY AND NOT PETSC_DIR) + message(STATUS "A cache variable, namely PETSC_DIR, has been set + to specify a custom installation directory of PETSC") +endif() -if (PETSC_DIR AND NOT PETSC_ARCH) - set (_petsc_arches - $ENV{PETSC_ARCH} # If set, use environment variable first - arch-linux2-cxx-opt arch-linux2-c-opt - arch-linux2-cxx-debug arch-linux2-c-debug - linux-x86_64-python - linux-gnu-c-debug linux-gnu-c-opt # Debian defaults - x86_64-unknown-linux-gnu i386-unknown-linux-gnu) - set (petscconf "NOTFOUND" CACHE FILEPATH "Cleared" FORCE) - foreach (arch ${_petsc_arches}) - if (NOT PETSC_ARCH) - find_path (petscconf petscconf.h - HINTS ${PETSC_DIR} - PATH_SUFFIXES ${arch}/include bmake/${arch} - NO_DEFAULT_PATH) - if (petscconf) - set (PETSC_ARCH "${arch}" CACHE STRING "PETSc build architecture") - endif (petscconf) - endif (NOT PETSC_ARCH) - endforeach (arch) - set (petscconf "NOTFOUND" CACHE INTERNAL "Scratch variable" FORCE) -endif (PETSC_DIR AND NOT PETSC_ARCH) +# Use pkg-config to detect include/library dirs (if pkg-config is available) +# ------------------------------------------------------------------------------------- +include(FindPkgConfig) +find_package(PkgConfig QUIET) +if( PKG_CONFIG_EXECUTABLE AND NOT PETSC_DIR ) + pkg_search_module(PETSC PETSc) + if (NOT PETSc_FIND_QUIETLY) + if (PETSC_FOUND AND PETSC_LIBRARIES) + message(STATUS "Looking for PETSC - found using PkgConfig") + else() + message(STATUS "Looking for PETSC - not found using PkgConfig." + "\n Perhaps you should add the directory containing PETSc.pc to" + "\n the PKG_CONFIG_PATH environment variable.") + endif() + endif() + set(PETSC_DIR "${PETSC_PREFIX}") +endif() -set(PETSC_VALID_COMPONENTS - C - CXX) +# consider using the env. var. PETSC_DIR if not directly given through the CMake cache var. +if (NOT PETSC_DIR AND DEFINED ENV{PETSC_DIR}) + set(PETSC_DIR "$ENV{PETSC_DIR}") +endif() -if(NOT PETSc_FIND_COMPONENTS) - #on cherche si on a compile PETSc avec l'option --with-clanguage=cxx - #on regarde dans PETSC_ARCH si on trouve cxx - #on pourrait aussi chercher --with-clanguage=cxx dans configure.log - if (PETSC_ARCH) - string(REGEX MATCH "-cxx-" PETSc_FIND_COMPONENTS ${PETSC_ARCH}) - if(PETSc_FIND_COMPONENTS) - set(PETSC_LANGUAGE_BINDINGS "CXX") - else(PETSc_FIND_COMPONENTS) - set(PETSC_LANGUAGE_BINDINGS "C") - endif(PETSc_FIND_COMPONENTS) - endif(PETSC_ARCH) +if (PETSC_DIR) + if (EXISTS ${PETSC_DIR}) + if (EXISTS ${PETSC_DIR}/include/petsc.h) + if (NOT PETSc_FIND_QUIETLY) + message(STATUS "PETSC_DIR = ${PETSC_DIR} contains include/petsc.h") + endif() + else() + if (PETSc_FIND_REQUIRED) + message(FATAL_ERROR "include/petsc.h not found in PETSC_DIR = ${PETSC_DIR}") + endif() + endif() + else() + if (PETSc_FIND_REQUIRED) + message(FATAL_ERROR "PETSC_DIR defined, but ${PETSC_DIR} does not exist") + endif() + endif() else() - # Right now, this is designed for compatability with the --with-clanguage option, so - # only allow one item in the components list. - list(LENGTH ${PETSc_FIND_COMPONENTS} components_length) - if(${components_length} GREATER 1) - message(FATAL_ERROR "Only one component for PETSc is allowed to be specified") - endif() - list(FIND PETSC_VALID_COMPONENTS ${PETSc_FIND_COMPONENTS} component_location) - if(${component_location} EQUAL -1) - message(FATAL_ERROR "\"${PETSc_FIND_COMPONENTS}\" is not a valid PETSc component.") - else() - list(APPEND PETSC_LANGUAGE_BINDINGS ${PETSc_FIND_COMPONENTS}) + if (PETSc_FIND_REQUIRED) + message(FATAL_ERROR "\ +PETSc is not installed in a standard way on Unix systems so that +this module requires hints to know where PETSc is installed. Please +give the installation directory (contains ./include/petsc.h, ./lib/, etc): +1. by setting the PETSC_DIR variable + a. as an environment variable, e.g. + $ export PETSC_DIR=/usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real + b. or as an CMake variable, e.g. + $ cmake .. -DPETSC_DIR==/usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real +2. or by using the pkg-config mechanism, e.g. + $ export PKG_CONFIG_PATH=/usr/lib/petscdir/3.6.2/x86_64-linux-gnu-real/lib/pkgconfig:$PKG_CONFIG_PATH\ + ") endif() endif() -if (PETSC_DIR AND PETSC_ARCH) - SET( PETSC_FOUND TRUE) -else(PETSC_DIR AND PETSC_ARCH) - SET( PETSC_FOUND FALSE) -endif(PETSC_DIR AND PETSC_ARCH) - -set (petsc_slaves LIBRARIES_SYS LIBRARIES_VEC LIBRARIES_MAT LIBRARIES_DM LIBRARIES_KSP LIBRARIES_SNES LIBRARIES_TS - INCLUDE_DIR INCLUDE_CONF) -include (FindPackageMultipass) -find_package_multipass (PETSc petsc_config_current - STATES DIR ARCH - DEPENDENTS INCLUDES LIBRARIES COMPILER MPIEXEC ${petsc_slaves}) - -# Determine whether the PETSc layout is old-style (through 2.3.3) or -# new-style (>= 3.0.0) -if (EXISTS "${PETSC_DIR}/${PETSC_ARCH}/include/petscconf.h") # > 2.3.3 - set (petsc_conf_rules "${PETSC_DIR}/conf/rules") - set (petsc_conf_variables "${PETSC_DIR}/conf/variables") -elseif (EXISTS "${PETSC_DIR}/bmake/${PETSC_ARCH}/petscconf.h") # <= 2.3.3 - set (petsc_conf_rules "${PETSC_DIR}/bmake/common/rules") - set (petsc_conf_variables "${PETSC_DIR}/bmake/common/variables") -elseif (PETSC_DIR) - message (SEND_ERROR "The pair PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} do not specify a valid PETSc installation") -endif () - -if (petsc_conf_rules AND petsc_conf_variables AND NOT petsc_config_current) - petsc_get_version() - - # Put variables into environment since they are needed to get - # configuration (petscvariables) in the PETSc makefile - set (ENV{PETSC_DIR} "${PETSC_DIR}") - set (ENV{PETSC_ARCH} "${PETSC_ARCH}") - - # A temporary makefile to probe the PETSc configuration - set (petsc_config_makefile "${PROJECT_BINARY_DIR}/Makefile.petsc") - file (WRITE "${petsc_config_makefile}" - "## This file was autogenerated by FindPETSc.cmake -# PETSC_DIR = ${PETSC_DIR} -# PETSC_ARCH = ${PETSC_ARCH} -include ${petsc_conf_rules} -include ${petsc_conf_variables} -show : - @echo -n \${\${VARIABLE}} -") - - macro (PETSC_GET_VARIABLE name var) - set (${var} "NOTFOUND" CACHE INTERNAL "Cleared" FORCE) - execute_process (COMMAND ${MAKE_EXECUTABLE} --no-print-directory -f ${petsc_config_makefile} show VARIABLE=${name} - OUTPUT_VARIABLE ${var} - RESULT_VARIABLE petsc_return) - endmacro (PETSC_GET_VARIABLE) - petsc_get_variable (PETSC_LIB_DIR petsc_lib_dir) - petsc_get_variable (PETSC_EXTERNAL_LIB_BASIC petsc_libs_external) - petsc_get_variable (PETSC_CCPPFLAGS petsc_cpp_line) - petsc_get_variable (PETSC_INCLUDE petsc_include) - petsc_get_variable (PCC petsc_cc) - petsc_get_variable (MPIEXEC petsc_mpiexec) - # We are done with the temporary Makefile, calling PETSC_GET_VARIABLE after this point is invalid! - file (REMOVE ${petsc_config_makefile}) - - include (ResolveCompilerPaths) - # Extract include paths and libraries from compile command line - resolve_includes (petsc_includes_all "${petsc_cpp_line}") +find_file(petscconf NAMES petscconf.h HINTS ${PETSC_DIR}/include) +if (petscconf) + if (NOT PETSc_FIND_QUIETLY) + message(STATUS "petscconf.h is located ad ${petscconf}") + endif() +else() + if (PETSc_FIND_REQUIRED) + message(FATAL_ERROR "\petscconf.h not found + we must find it into PETSC_DIR/include/") + endif() +endif() - macro (PETSC_FIND_LIBRARY suffix name) - set (PETSC_LIBRARY_${suffix} "NOTFOUND" CACHE INTERNAL "Cleared" FORCE) # Clear any stale value, if we got here, we need to find it again - find_library (PETSC_LIBRARY_${suffix} NAMES ${name} HINTS ${petsc_lib_dir} NO_DEFAULT_PATH) - set (PETSC_LIBRARIES_${suffix} "${PETSC_LIBRARY_${suffix}}") - mark_as_advanced (PETSC_LIBRARY_${suffix}) - endmacro (PETSC_FIND_LIBRARY suffix name) +if (NOT PETSC_ARCH) + if (petscconf) + file(READ ${petscconf} contents) + string(REGEX MATCHALL "#define *PETSC_ARCH *\".+\" *\n" foundArch ${contents}) + string(REGEX REPLACE "#define *PETSC_ARCH *\"(.+)\" *\n" "\\1" archFromFile ${foundArch}) + if (NOT PETSc_FIND_QUIETLY) + message(STATUS "PETSC_ARCH taken from petscconf.h = ${archFromFile}") + endif() + if(archFromFile) + set(PETSC_ARCH ${archFromFile}) + endif(archFromFile) + endif(petscconf) +endif (NOT PETSC_ARCH) +if (NOT PETSc_FIND_QUIETLY) + message(STATUS "PETSC_ARCH = ${PETSC_ARCH}") +endif() - # Look for petscvec first, if it doesn't exist, we must be using single-library - petsc_find_library (VEC petscvec) - if (PETSC_LIBRARY_VEC) - petsc_find_library (SYS "petscsys;petsc") # libpetscsys is called libpetsc prior to 3.1 (when single-library was introduced) - petsc_find_library (MAT petscmat) - petsc_find_library (DM petscdm) - petsc_find_library (KSP petscksp) - petsc_find_library (SNES petscsnes) - petsc_find_library (TS petscts) - macro (PETSC_JOIN libs deps) - list (APPEND PETSC_LIBRARIES_${libs} ${PETSC_LIBRARIES_${deps}}) - endmacro (PETSC_JOIN libs deps) - petsc_join (VEC SYS) - petsc_join (MAT VEC) - petsc_join (DM MAT) - petsc_join (KSP DM) - petsc_join (SNES KSP) - petsc_join (TS SNES) - petsc_join (ALL TS) - else () - set (PETSC_LIBRARY_VEC "NOTFOUND" CACHE INTERNAL "Cleared" FORCE) # There is no libpetscvec - petsc_find_library (SINGLE petsc) - foreach (pkg SYS VEC MAT DM KSP SNES TS ALL) - set (PETSC_LIBRARIES_${pkg} "${PETSC_LIBRARY_SINGLE}") - endforeach () - endif () - if (PETSC_LIBRARY_TS) - message (STATUS "Recognized PETSc install with separate libraries for each package") - else () - message (STATUS "Recognized PETSc install with single library for all packages") - endif () +find_file(petscvariables NAMES petscvariables HINTS ${PETSC_DIR}/lib/petsc/conf/ ${PETSC_DIR}/conf) +if (petscvariables) + if (NOT PETSc_FIND_QUIETLY) + message(STATUS "petscvariables = ${petscvariables}") + endif() +else() + if (PETSc_FIND_REQUIRED) + message(FATAL_ERROR "petscvariables not found") + endif() +endif() - include(Check${PETSC_LANGUAGE_BINDINGS}SourceRuns) - macro (PETSC_TEST_RUNS includes libraries runs) - if(${PETSC_LANGUAGE_BINDINGS} STREQUAL "C") - set(_PETSC_ERR_FUNC "CHKERRQ(ierr)") - elseif(${PETSC_LANGUAGE_BINDINGS} STREQUAL "CXX") - set(_PETSC_ERR_FUNC "CHKERRXX(ierr)") +# function extracting the value of variable defined in a file under the form +# NAME_VAR = VARIABLE_CONTENT +# note that VARIABLE_CONTENT is assumed not to contain ";" +function(get_variable var filename out) + if (NOT EXISTS ${filename}) + message(FATAL_ERROR "${filename} does not exist") endif() - if (PETSC_VERSION VERSION_GREATER 3.1) - set (_PETSC_TSDestroy "TSDestroy(&ts)") - else () - set (_PETSC_TSDestroy "TSDestroy(ts)") - endif () - - set(_PETSC_TEST_SOURCE " -static const char help[] = \"PETSc test program.\"; -#include <petscts.h> -int main(int argc,char *argv[]) { -PetscErrorCode ierr; -TS ts; - -ierr = PetscInitialize(&argc,&argv,0,help);${_PETSC_ERR_FUNC}; -ierr = TSCreate(PETSC_COMM_WORLD,&ts);${_PETSC_ERR_FUNC}; -ierr = TSSetFromOptions(ts);${_PETSC_ERR_FUNC}; -ierr = ${_PETSC_TSDestroy};${_PETSC_ERR_FUNC}; -ierr = PetscFinalize();${_PETSC_ERR_FUNC}; -return 0; -} -") - multipass_source_runs ("${includes}" "${libraries}" "${_PETSC_TEST_SOURCE}" ${runs} "${PETSC_LANGUAGE_BINDINGS}") - if (${${runs}}) - set (PETSC_EXECUTABLE_RUNS "YES" CACHE BOOL - "Can the system successfully run a PETSc executable? This variable can be manually set to \"YES\" to force CMake to accept a given PETSc configuration, but this will almost always result in a broken build. If you change PETSC_DIR, PETSC_ARCH, or PETSC_CURRENT you would have to reset this variable." FORCE) - endif (${${runs}}) - endmacro (PETSC_TEST_RUNS) + file(READ ${filename} contents) + string(REGEX REPLACE "\n" ";" contents "${contents}") # we divide line by lines because it did work without doing that + foreach(Line ${contents}) + string(REGEX MATCHALL "^${var} = .*" foundVar ${Line}) + if (foundVar) + string(REGEX REPLACE "^${var} = (.+)" "\\1" value ${foundVar}) + break() + endif() + endforeach() + if(foundVar) + set(${out} "${value}" PARENT_SCOPE) + else() + message(FATAL_ERROR "${var} not found in ${filename}") + endif() +endfunction(get_variable) - find_path (PETSC_INCLUDE_DIR petscts.h HINTS "${PETSC_DIR}" PATH_SUFFIXES include NO_DEFAULT_PATH) - find_path (PETSC_INCLUDE_CONF petscconf.h HINTS "${PETSC_DIR}" PATH_SUFFIXES "${PETSC_ARCH}/include" "bmake/${PETSC_ARCH}" NO_DEFAULT_PATH) - mark_as_advanced (PETSC_INCLUDE_DIR PETSC_INCLUDE_CONF) - set (petsc_includes_minimal ${PETSC_INCLUDE_CONF} ${PETSC_INCLUDE_DIR}) +get_variable(PETSC_WITH_EXTERNAL_LIB ${petscvariables} PETSC_LIBRARIES_RAW) +get_variable(MPIEXEC ${petscvariables} PETSC_MPIEXEC) +get_variable(PETSC_CC_INCLUDES ${petscvariables} PETSC_INCLUDES_RAW) - petsc_test_runs ("${petsc_includes_minimal}" "${PETSC_LIBRARIES_TS}" petsc_works_minimal) - if (petsc_works_minimal) - message (STATUS "Minimal PETSc includes and libraries work. This probably means we are building with shared libs.") - set (petsc_includes_needed "${petsc_includes_minimal}") - else (petsc_works_minimal) # Minimal includes fail, see if just adding full includes fixes it - petsc_test_runs ("${petsc_includes_all}" "${PETSC_LIBRARIES_TS}" petsc_works_allincludes) - if (petsc_works_allincludes) # It does, we just need all the includes ( - message (STATUS "PETSc requires extra include paths, but links correctly with only interface libraries. This is an unexpected configuration (but it seems to work fine).") - set (petsc_includes_needed ${petsc_includes_all}) - else (petsc_works_allincludes) # We are going to need to link the external libs explicitly - resolve_libraries (petsc_libraries_external "${petsc_libs_external}") - foreach (pkg SYS VEC MAT DM KSP SNES TS ALL) - list (APPEND PETSC_LIBRARIES_${pkg} ${petsc_libraries_external}) - endforeach (pkg) - petsc_test_runs ("${petsc_includes_minimal}" "${PETSC_LIBRARIES_TS}" petsc_works_alllibraries) - if (petsc_works_alllibraries) - message (STATUS "PETSc only need minimal includes, but requires explicit linking to all dependencies. This is expected when PETSc is built with static libraries.") - set (petsc_includes_needed ${petsc_includes_minimal}) - else (petsc_works_alllibraries) - # It looks like we really need everything, should have listened to Matt - set (petsc_includes_needed ${petsc_includes_all}) - petsc_test_runs ("${petsc_includes_all}" "${PETSC_LIBRARIES_TS}" petsc_works_all) - if (petsc_works_all) # We fail anyways - message (STATUS "PETSc requires extra include paths and explicit linking to all dependencies. This probably means you have static libraries and something unexpected in PETSc headers.") - else (petsc_works_all) # We fail anyways - message (STATUS "PETSc could not be used, maybe the install is broken.") - endif (petsc_works_all) - endif (petsc_works_alllibraries) - endif (petsc_works_allincludes) - endif (petsc_works_minimal) +# extract include paths from petscvariables +string(REGEX REPLACE "-I" "" PETSC_INCLUDES_RAW ${PETSC_INCLUDES_RAW} ) +string(REGEX REPLACE " " ";" PETSC_INCLUDE_DIRS ${PETSC_INCLUDES_RAW} ) - # We do an out-of-source build so __FILE__ will be an absolute path, hence __INSDIR__ is superfluous - if (${PETSC_VERSION} VERSION_LESS 3.1) - set (PETSC_DEFINITIONS "-D__SDIR__=\"\"" CACHE STRING "PETSc definitions" FORCE) - else () - set (PETSC_DEFINITIONS "-D__INSDIR__=" CACHE STRING "PETSc definitions" FORCE) - endif () - # Sometimes this can be used to assist FindMPI.cmake - set (PETSC_MPIEXEC ${petsc_mpiexec} CACHE FILEPATH "Executable for running PETSc MPI programs" FORCE) - set (PETSC_INCLUDES ${petsc_includes_needed} CACHE STRING "PETSc include path" FORCE) - set (PETSC_LIBRARIES ${PETSC_LIBRARIES_ALL} CACHE STRING "PETSc libraries" FORCE) - set (PETSC_COMPILER ${petsc_cc} CACHE FILEPATH "PETSc compiler" FORCE) - # Note that we have forced values for all these choices. If you - # change these, you are telling the system to trust you that they - # work. It is likely that you will end up with a broken build. - mark_as_advanced (PETSC_INCLUDES PETSC_LIBRARIES PETSC_COMPILER PETSC_DEFINITIONS PETSC_MPIEXEC PETSC_EXECUTABLE_RUNS) -endif () +# extract libraries from petscvariables +string(REGEX MATCHALL " -l([^ ]+) " foundLibs ${PETSC_LIBRARIES_RAW}) +string(REGEX REPLACE " -l" "" PETSC_LIBRARIES ${foundLibs}) +string(REGEX REPLACE " " ";" PETSC_LIBRARIES ${PETSC_LIBRARIES}) -######## -# MESSAGE( "PETSC_DIR : ${PETSC_DIR}") -# MESSAGE( "PETSC_ARCH : ${PETSC_ARCH}") -# MESSAGE( "PETSC_FOUND : ${PETSC_FOUND}") -# MESSAGE( "PETSC_INCLUDES : ${PETSC_INCLUDES}") -# MESSAGE( "PETSC_LIBRARIES : ${PETSC_LIBRARIES}") -# MESSAGE( "PETSC_COMPILER : ${PETSC_COMPILER}") -# MESSAGE( "PETSC_DEFINITIONS : ${PETSC_DEFINITIONS}") -# MESSAGE( "PETSC_MPIEXEC : ${PETSC_MPIEXEC}") -# MESSAGE( "PETSC_VERSION : ${PETSC_VERSION}") -# MESSAGE( "PETSC_EXECUTABLE_RUNS : ${PETSC_EXECUTABLE_RUNS}") +# extract library directories from petscvariables +string(REGEX MATCHALL " -L([^ ]+) " foundLibPaths ${PETSC_LIBRARIES_RAW}) +string(REGEX REPLACE " -L" "" PETSC_LIBRARY_DIRS ${foundLibPaths}) +string(REGEX REPLACE " " ";" PETSC_LIBRARY_DIRS ${PETSC_LIBRARY_DIRS}) include (FindPackageHandleStandardArgs) find_package_handle_standard_args (PETSc - "PETSc could not be found. Be sure to set PETSC_DIR and PETSC_ARCH." - PETSC_INCLUDES PETSC_LIBRARIES PETSC_EXECUTABLE_RUNS) + "PETSc could not be found. Be sure to set PETSC_DIR." + PETSC_MPIEXEC PETSC_INCLUDE_DIRS PETSC_LIBRARIES PETSC_LIBRARY_DIRS) diff --git a/CMakeModules/morse/find/FindPTSCOTCH.cmake b/CMakeModules/morse/find/FindPTSCOTCH.cmake index 341358ca1dfe351c08f8bb42f7cc087d4eeb3e8e..04f6844409eb789068f23dde2cfa804aa4a16d77 100644 --- a/CMakeModules/morse/find/FindPTSCOTCH.cmake +++ b/CMakeModules/morse/find/FindPTSCOTCH.cmake @@ -148,18 +148,18 @@ else() foreach(ptscotch_hdr ${PTSCOTCH_hdrs_to_find}) set(PTSCOTCH_${ptscotch_hdr}_DIRS "PTSCOTCH_${ptscotch_hdr}_DIRS-NOTFOUND") find_path(PTSCOTCH_${ptscotch_hdr}_DIRS - NAMES ${ptscotch_hdr} - HINTS ${PTSCOTCH_DIR} - PATH_SUFFIXES "include" "include/scotch") + NAMES ${ptscotch_hdr} + HINTS ${PTSCOTCH_DIR} + PATH_SUFFIXES "include" "include/scotch") mark_as_advanced(PTSCOTCH_${ptscotch_hdr}_DIRS) endforeach() else() foreach(ptscotch_hdr ${PTSCOTCH_hdrs_to_find}) set(PTSCOTCH_${ptscotch_hdr}_DIRS "PTSCOTCH_${ptscotch_hdr}_DIRS-NOTFOUND") find_path(PTSCOTCH_${ptscotch_hdr}_DIRS - NAMES ${ptscotch_hdr} - HINTS ${_inc_env} - PATH_SUFFIXES "scotch") + NAMES ${ptscotch_hdr} + HINTS ${_inc_env} + PATH_SUFFIXES "scotch") mark_as_advanced(PTSCOTCH_${ptscotch_hdr}_DIRS) endforeach() endif() @@ -229,16 +229,16 @@ else() foreach(ptscotch_lib ${PTSCOTCH_libs_to_find}) set(PTSCOTCH_${ptscotch_lib}_LIBRARY "PTSCOTCH_${ptscotch_lib}_LIBRARY-NOTFOUND") find_library(PTSCOTCH_${ptscotch_lib}_LIBRARY - NAMES ${ptscotch_lib} - HINTS ${PTSCOTCH_DIR} - PATH_SUFFIXES lib lib32 lib64) + NAMES ${ptscotch_lib} + HINTS ${PTSCOTCH_DIR} + PATH_SUFFIXES lib lib32 lib64) endforeach() else() foreach(ptscotch_lib ${PTSCOTCH_libs_to_find}) set(PTSCOTCH_${ptscotch_lib}_LIBRARY "PTSCOTCH_${ptscotch_lib}_LIBRARY-NOTFOUND") find_library(PTSCOTCH_${ptscotch_lib}_LIBRARY - NAMES ${ptscotch_lib} - HINTS ${_lib_env}) + NAMES ${ptscotch_lib} + HINTS ${_lib_env}) endforeach() endif() endif() @@ -289,7 +289,7 @@ if(PTSCOTCH_LIBRARIES) endif() if (MPI_C_LINK_FLAGS) if (${MPI_C_LINK_FLAGS} MATCHES " -") - string(REGEX REPLACE " -" "-" MPI_C_LINK_FLAGS ${MPI_C_LINK_FLAGS}) + string(REGEX REPLACE " -" "-" MPI_C_LINK_FLAGS ${MPI_C_LINK_FLAGS}) endif() list(APPEND REQUIRED_LDFLAGS "${MPI_C_LINK_FLAGS}") endif() @@ -360,6 +360,9 @@ endif(PTSCOTCH_LIBRARIES) if (PTSCOTCH_LIBRARIES) list(GET PTSCOTCH_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + if (NOT PTSCOTCH_LIBRARY_DIRS) + set(PTSCOTCH_LIBRARY_DIRS "${first_lib_path}") + endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") set(PTSCOTCH_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of PTSCOTCH library" FORCE) diff --git a/CMakeModules/morse/find/FindQUARK.cmake b/CMakeModules/morse/find/FindQUARK.cmake index adc5b65c79e9fb1ac67fd4ff6682c6a7280336a2..31565a0af2b01a6e675ba209c5be26bff145f3a4 100644 --- a/CMakeModules/morse/find/FindQUARK.cmake +++ b/CMakeModules/morse/find/FindQUARK.cmake @@ -258,9 +258,9 @@ if(QUARK_LIBRARIES) endif() foreach(lib ${HWLOC_LIBRARIES}) if (EXISTS ${lib} OR ${lib} MATCHES "^-") - list(APPEND REQUIRED_LIBS "${lib}") + list(APPEND REQUIRED_LIBS "${lib}") else() - list(APPEND REQUIRED_LIBS "-l${lib}") + list(APPEND REQUIRED_LIBS "-l${lib}") endif() endforeach() endif() @@ -296,7 +296,7 @@ if(QUARK_LIBRARIES) message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") message(STATUS "Maybe QUARK is linked with specific libraries like. " - "Have you tried with COMPONENTS (HWLOC)? See the explanation in FindQUARK.cmake.") + "Have you tried with COMPONENTS (HWLOC)? See the explanation in FindQUARK.cmake.") endif() endif() set(CMAKE_REQUIRED_INCLUDES) @@ -307,6 +307,9 @@ endif(QUARK_LIBRARIES) if (QUARK_LIBRARIES) list(GET QUARK_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + if (NOT QUARK_LIBRARY_DIRS) + set(QUARK_LIBRARY_DIRS "${first_lib_path}") + endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") set(QUARK_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of QUARK library" FORCE) diff --git a/CMakeModules/morse/find/FindSCALAPACK.cmake b/CMakeModules/morse/find/FindSCALAPACK.cmake index 5a96239b5a903d84b4964eb56aa21f1967d11d0c..e2aa42f241f99baea32b3534ad28fc06d3388d75 100644 --- a/CMakeModules/morse/find/FindSCALAPACK.cmake +++ b/CMakeModules/morse/find/FindSCALAPACK.cmake @@ -68,18 +68,18 @@ macro(Print_Find_Library_Blas_Status _libname _lib_to_find) else() if(${LIBNAME}_DIR) message("${Yellow}${LIBNAME}_DIR is defined but ${_lib_to_find}" - "has not been found in ${ARGN}${ColourReset}") + "has not been found in ${ARGN}${ColourReset}") else() message("${Yellow}${_lib_to_find} not found." - "Nor ${LIBNAME}_DIR neither ${LIBNAME}_LIBDIR" - "are defined so that we look for ${_lib_to_find} in" - "system paths (Linux: LD_LIBRARY_PATH, Windows: LIB," - "Mac: DYLD_LIBRARY_PATH," - "CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES," - "CMAKE_C_IMPLICIT_LINK_DIRECTORIES)${ColourReset}") + "Nor ${LIBNAME}_DIR neither ${LIBNAME}_LIBDIR" + "are defined so that we look for ${_lib_to_find} in" + "system paths (Linux: LD_LIBRARY_PATH, Windows: LIB," + "Mac: DYLD_LIBRARY_PATH," + "CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES," + "CMAKE_C_IMPLICIT_LINK_DIRECTORIES)${ColourReset}") if(_lib_env) - message("${Yellow}${_lib_to_find} has not been found in" - "${_lib_env}${ColourReset}") + message("${Yellow}${_lib_to_find} has not been found in" + "${_lib_env}${ColourReset}") endif() endif() endif() @@ -145,11 +145,11 @@ macro(Check_Scalapack_Libraries LIBRARIES _prefix _name _flags _list _blaslapack list(APPEND _libdir "${BLAS_DIR}") list(APPEND _libdir "${BLAS_DIR}/lib") if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") - list(APPEND _libdir "${BLAS_DIR}/lib64") - list(APPEND _libdir "${BLAS_DIR}/lib/intel64") + list(APPEND _libdir "${BLAS_DIR}/lib64") + list(APPEND _libdir "${BLAS_DIR}/lib/intel64") else() - list(APPEND _libdir "${BLAS_DIR}/lib32") - list(APPEND _libdir "${BLAS_DIR}/lib/ia32") + list(APPEND _libdir "${BLAS_DIR}/lib32") + list(APPEND _libdir "${BLAS_DIR}/lib/ia32") endif() elseif(ENV_BLAS_LIBDIR) list(APPEND _libdir "${ENV_BLAS_LIBDIR}") @@ -157,11 +157,11 @@ macro(Check_Scalapack_Libraries LIBRARIES _prefix _name _flags _list _blaslapack list(APPEND _libdir "${ENV_BLAS_DIR}") list(APPEND _libdir "${ENV_BLAS_DIR}/lib") if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") - list(APPEND _libdir "${ENV_BLAS_DIR}/lib64") - list(APPEND _libdir "${ENV_BLAS_DIR}/lib/intel64") + list(APPEND _libdir "${ENV_BLAS_DIR}/lib64") + list(APPEND _libdir "${ENV_BLAS_DIR}/lib/intel64") else() - list(APPEND _libdir "${ENV_BLAS_DIR}/lib32") - list(APPEND _libdir "${ENV_BLAS_DIR}/lib/ia32") + list(APPEND _libdir "${ENV_BLAS_DIR}/lib32") + list(APPEND _libdir "${ENV_BLAS_DIR}/lib/ia32") endif() endif() if (SCALAPACK_LIBDIR) @@ -170,11 +170,11 @@ macro(Check_Scalapack_Libraries LIBRARIES _prefix _name _flags _list _blaslapack list(APPEND _libdir "${SCALAPACK_DIR}") list(APPEND _libdir "${SCALAPACK_DIR}/lib") if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") - list(APPEND _libdir "${SCALAPACK_DIR}/lib64") - list(APPEND _libdir "${SCALAPACK_DIR}/lib/intel64") + list(APPEND _libdir "${SCALAPACK_DIR}/lib64") + list(APPEND _libdir "${SCALAPACK_DIR}/lib/intel64") else() - list(APPEND _libdir "${SCALAPACK_DIR}/lib32") - list(APPEND _libdir "${SCALAPACK_DIR}/lib/ia32") + list(APPEND _libdir "${SCALAPACK_DIR}/lib32") + list(APPEND _libdir "${SCALAPACK_DIR}/lib/ia32") endif() elseif(ENV_SCALAPACK_LIBDIR) list(APPEND _libdir "${ENV_SCALAPACK_LIBDIR}") @@ -182,29 +182,29 @@ macro(Check_Scalapack_Libraries LIBRARIES _prefix _name _flags _list _blaslapack list(APPEND _libdir "${ENV_SCALAPACK_DIR}") list(APPEND _libdir "${ENV_SCALAPACK_DIR}/lib") if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") - list(APPEND _libdir "${ENV_SCALAPACK_DIR}/lib64") - list(APPEND _libdir "${ENV_SCALAPACK_DIR}/lib/intel64") + list(APPEND _libdir "${ENV_SCALAPACK_DIR}/lib64") + list(APPEND _libdir "${ENV_SCALAPACK_DIR}/lib/intel64") else() - list(APPEND _libdir "${ENV_SCALAPACK_DIR}/lib32") - list(APPEND _libdir "${ENV_SCALAPACK_DIR}/lib/ia32") + list(APPEND _libdir "${ENV_SCALAPACK_DIR}/lib32") + list(APPEND _libdir "${ENV_SCALAPACK_DIR}/lib/ia32") endif() else() if (ENV_MKLROOT) - list(APPEND _libdir "${ENV_MKLROOT}/lib") - if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") - list(APPEND _libdir "${ENV_MKLROOT}/lib64") - list(APPEND _libdir "${ENV_MKLROOT}/lib/intel64") - else() - list(APPEND _libdir "${ENV_MKLROOT}/lib32") - list(APPEND _libdir "${ENV_MKLROOT}/lib/ia32") - endif() + list(APPEND _libdir "${ENV_MKLROOT}/lib") + if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") + list(APPEND _libdir "${ENV_MKLROOT}/lib64") + list(APPEND _libdir "${ENV_MKLROOT}/lib/intel64") + else() + list(APPEND _libdir "${ENV_MKLROOT}/lib32") + list(APPEND _libdir "${ENV_MKLROOT}/lib/ia32") + endif() endif() if (WIN32) - string(REPLACE ":" ";" _libdir2 "$ENV{LIB}") + string(REPLACE ":" ";" _libdir2 "$ENV{LIB}") elseif (APPLE) - string(REPLACE ":" ";" _libdir2 "$ENV{DYLD_LIBRARY_PATH}") + string(REPLACE ":" ";" _libdir2 "$ENV{DYLD_LIBRARY_PATH}") else () - string(REPLACE ":" ";" _libdir2 "$ENV{LD_LIBRARY_PATH}") + string(REPLACE ":" ";" _libdir2 "$ENV{LD_LIBRARY_PATH}") endif () list(APPEND _libdir "${_libdir2}") list(APPEND _libdir "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") @@ -221,29 +221,29 @@ macro(Check_Scalapack_Libraries LIBRARIES _prefix _name _flags _list _blaslapack if(_libraries_work) if (BLA_STATIC) - if (WIN32) - set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) - endif ( WIN32 ) - if (APPLE) - set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) - else (APPLE) - set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) - endif (APPLE) + if (WIN32) + set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) + endif ( WIN32 ) + if (APPLE) + set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES}) + else (APPLE) + set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + endif (APPLE) else (BLA_STATIC) - if (CMAKE_SYSTEM_NAME STREQUAL "Linux") - # for ubuntu's libblas3gf and libscalapack3gf packages - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf) - endif () + if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + # for ubuntu's libblas3gf and libscalapack3gf packages + set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf) + endif () endif (BLA_STATIC) find_library(${_prefix}_${_library}_LIBRARY - NAMES ${_library} - HINTS ${_libdir} - ) + NAMES ${_library} + HINTS ${_libdir} + ) mark_as_advanced(${_prefix}_${_library}_LIBRARY) # Print status if not found # ------------------------- if (NOT ${_prefix}_${_library}_LIBRARY AND NOT SCALAPACK_FIND_QUIETLY AND SCALAPACK_VERBOSE) - Print_Find_Library_Blas_Status(scalapack ${_library} ${_libdir}) + Print_Find_Library_Blas_Status(scalapack ${_library} ${_libdir}) endif () set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) @@ -259,7 +259,7 @@ macro(Check_Scalapack_Libraries LIBRARIES _prefix _name _flags _list _blaslapack endif(UNIX AND BLA_STATIC) if (SCALAPACK_VERBOSE) message("${Cyan}SCALAPACK libs found. Try to compile symbol ${_name} with" - "following libraries: ${CMAKE_REQUIRED_LIBRARIES}") + "following libraries: ${CMAKE_REQUIRED_LIBRARIES}") endif () if(NOT SCALAPACK_FOUND) unset(${_prefix}${_combined_name}_WORKS CACHE) @@ -322,84 +322,96 @@ if(BLAS_FOUND AND LAPACK_FOUND AND MPI_FOUND) endif(NOT BLA_VENDOR) endif ($ENV{BLA_VENDOR} MATCHES ".+") - # Generic SCALAPACK library - if (BLA_VENDOR STREQUAL "Generic" OR - BLA_VENDOR STREQUAL "All") - if ( NOT SCALAPACK_LIBRARIES ) - check_scalapack_libraries( - SCALAPACK_LIBRARIES - SCALAPACK - pdgemm - "" - "scalapack" # scalapack lib to look for - "${LAPACK_LIBRARIES};${BLAS_LIBRARIES}" # blas and lapack libs - "${MPI_Fortran_LIBRARIES}" # mpi libs - "" # threads libs - ) - endif ( NOT SCALAPACK_LIBRARIES ) - endif () #intel scalapack if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") if (UNIX AND NOT WIN32) find_library(M_LIBRARY NAMES m) mark_as_advanced(M_LIBRARY) if(M_LIBRARY) - set(LM "-lm") + set(LM "-lm") else() - set(LM "") + set(LM "") endif() endif () if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX) if(SCALAPACK_FIND_QUIETLY OR NOT SCALAPACK_FIND_REQUIRED) - find_PACKAGE(Threads) + find_PACKAGE(Threads) else() - find_package(Threads REQUIRED) + find_package(Threads REQUIRED) endif() set(SCALAPACK_SEARCH_LIBS "") if (BLA_F95) - set(SCALAPACK_mkl_SEARCH_SYMBOL "PDGEMM") - set(_LIBRARIES SCALAPACK95_LIBRARIES) - set(_BLAS_LIBRARIES ${BLAS95_LIBRARIES}) - list(APPEND SCALAPACK_SEARCH_LIBS "mkl_scalapack_lp64") + set(SCALAPACK_mkl_SEARCH_SYMBOL "PDGEMM") + set(_LIBRARIES SCALAPACK95_LIBRARIES) + set(_BLAS_LIBRARIES ${BLAS95_LIBRARIES}) + list(APPEND SCALAPACK_SEARCH_LIBS "mkl_scalapack_lp64") else() - set(SCALAPACK_mkl_SEARCH_SYMBOL "pdgemm") - set(_LIBRARIES SCALAPACK_LIBRARIES) - set(_BLAS_LIBRARIES ${BLAS_LIBRARIES}) - list(APPEND SCALAPACK_SEARCH_LIBS "mkl_scalapack_lp64") + set(SCALAPACK_mkl_SEARCH_SYMBOL "pdgemm") + set(_LIBRARIES SCALAPACK_LIBRARIES) + set(_BLAS_LIBRARIES ${BLAS_LIBRARIES}) + list(APPEND SCALAPACK_SEARCH_LIBS "mkl_scalapack_lp64") endif() # First try empty scalapack libs if (NOT ${_LIBRARIES}) - check_scalapack_libraries( - ${_LIBRARIES} - BLAS - ${SCALAPACK_mkl_SEARCH_SYMBOL} - "" - "" - "${_BLAS_LIBRARIES}" - "" - "${MPI_Fortran_LIBRARIES}" - ) + check_scalapack_libraries( + ${_LIBRARIES} + BLAS + ${SCALAPACK_mkl_SEARCH_SYMBOL} + "" + "" + "${_BLAS_LIBRARIES}" + "" + "${MPI_Fortran_LIBRARIES}" + ) endif () # Then try the search libs foreach (IT ${SCALAPACK_SEARCH_LIBS}) - if (NOT ${_LIBRARIES}) - check_scalapack_libraries( - ${_LIBRARIES} - BLAS - ${SCALAPACK_mkl_SEARCH_SYMBOL} - "" - "${IT};mkl_blacs_intelmpi_lp64" - "${_BLAS_LIBRARIES}" - "" - "${MPI_Fortran_LIBRARIES}" - ) - endif () + if (NOT ${_LIBRARIES}) + check_scalapack_libraries( + ${_LIBRARIES} + BLAS + ${SCALAPACK_mkl_SEARCH_SYMBOL} + "" + "${IT};mkl_blacs_intelmpi_lp64" + "${_BLAS_LIBRARIES}" + "" + "${MPI_Fortran_LIBRARIES}" + ) + endif () endforeach () endif () endif() + # Generic SCALAPACK library + if (BLA_VENDOR STREQUAL "Generic" OR + BLA_VENDOR STREQUAL "All") + if ( NOT SCALAPACK_LIBRARIES ) + check_scalapack_libraries( + SCALAPACK_LIBRARIES + SCALAPACK + pdgemm + "" + "scalapack" # scalapack lib to look for + "${LAPACK_LIBRARIES};${BLAS_LIBRARIES}" # blas and lapack libs + "${MPI_Fortran_LIBRARIES}" # mpi libs + "" # threads libs + ) + endif ( NOT SCALAPACK_LIBRARIES ) + if ( NOT SCALAPACK_LIBRARIES ) + check_scalapack_libraries( + SCALAPACK_LIBRARIES + SCALAPACK + pdgemm + "" + "scalapack-openmpi" # scalapack lib to look for + "${LAPACK_LIBRARIES};${BLAS_LIBRARIES}" # blas and lapack libs + "${MPI_Fortran_LIBRARIES}" # mpi libs + "" # threads libs + ) + endif ( NOT SCALAPACK_LIBRARIES ) + endif () else(BLAS_FOUND AND LAPACK_FOUND AND MPI_FOUND) message(STATUS "SCALAPACK requires BLAS, LAPACK, and MPI") endif(BLAS_FOUND AND LAPACK_FOUND AND MPI_FOUND) @@ -416,23 +428,23 @@ if(BLA_F95) message(STATUS "SCALAPACK_LIBRARIES ${SCALAPACK_LIBRARIES}") else(SCALAPACK95_FOUND) message(WARNING "BLA_VENDOR has been set to ${BLA_VENDOR} but SCALAPACK 95 libraries could not be found or check of symbols failed." - "\nPlease indicate where to find SCALAPACK libraries. You have three options:\n" - "- Option 1: Provide the installation directory of SCALAPACK library with cmake option: -DSCALAPACK_DIR=your/path/to/scalapack\n" - "- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\n" - "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n" - "\nTo follow libraries detection more precisely you can activate a verbose mode with -DSCALAPACK_VERBOSE=ON at cmake configure." - "\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name." - "\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit)," - "Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model), Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model)," - "Intel( older versions of mkl 32 and 64 bit), ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic") + "\nPlease indicate where to find SCALAPACK libraries. You have three options:\n" + "- Option 1: Provide the installation directory of SCALAPACK library with cmake option: -DSCALAPACK_DIR=your/path/to/scalapack\n" + "- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\n" + "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n" + "\nTo follow libraries detection more precisely you can activate a verbose mode with -DSCALAPACK_VERBOSE=ON at cmake configure." + "\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name." + "\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit)," + "Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model), Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model)," + "Intel( older versions of mkl 32 and 64 bit), ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic") if(SCALAPACK_FIND_REQUIRED) - message(FATAL_ERROR - "A required library with SCALAPACK95 API not found. Please specify library location." - ) + message(FATAL_ERROR + "A required library with SCALAPACK95 API not found. Please specify library location." + ) else(SCALAPACK_FIND_REQUIRED) - message(STATUS - "A library with SCALAPACK95 API not found. Please specify library location." - ) + message(STATUS + "A library with SCALAPACK95 API not found. Please specify library location." + ) endif(SCALAPACK_FIND_REQUIRED) endif(SCALAPACK95_FOUND) endif(NOT SCALAPACK_FIND_QUIETLY) @@ -451,23 +463,23 @@ else(BLA_F95) message(STATUS "SCALAPACK_LIBRARIES ${SCALAPACK_LIBRARIES}") else(SCALAPACK_FOUND) message(WARNING "BLA_VENDOR has been set to ${BLA_VENDOR} but SCALAPACK libraries could not be found or check of symbols failed." - "\nPlease indicate where to find SCALAPACK libraries. You have three options:\n" - "- Option 1: Provide the installation directory of SCALAPACK library with cmake option: -DSCALAPACK_DIR=your/path/to/scalapack\n" - "- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\n" - "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n" - "\nTo follow libraries detection more precisely you can activate a verbose mode with -DSCALAPACK_VERBOSE=ON at cmake configure." - "\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name." - "\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit)," - "Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model), Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model)," - "Intel( older versions of mkl 32 and 64 bit), ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic") + "\nPlease indicate where to find SCALAPACK libraries. You have three options:\n" + "- Option 1: Provide the installation directory of SCALAPACK library with cmake option: -DSCALAPACK_DIR=your/path/to/scalapack\n" + "- Option 2: Provide the directory where to find BLAS libraries with cmake option: -DBLAS_LIBDIR=your/path/to/blas/libs\n" + "- Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH, Windows: LIB, Mac: DYLD_LIBRARY_PATH)\n" + "\nTo follow libraries detection more precisely you can activate a verbose mode with -DSCALAPACK_VERBOSE=ON at cmake configure." + "\nYou could also specify a BLAS vendor to look for by setting -DBLA_VENDOR=blas_vendor_name." + "\nList of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf, SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit)," + "Intel10_64lp (intel mkl v10 64 bit, lp thread model, lp64 model), Intel10_64lp_seq (intel mkl v10 64 bit, sequential code, lp64 model)," + "Intel( older versions of mkl 32 and 64 bit), ACML, ACML_MP, ACML_GPU, Apple, NAS, Generic") if(SCALAPACK_FIND_REQUIRED) - message(FATAL_ERROR - "A required library with SCALAPACK API not found. Please specify library location." - ) + message(FATAL_ERROR + "A required library with SCALAPACK API not found. Please specify library location." + ) else(SCALAPACK_FIND_REQUIRED) - message(STATUS - "A library with SCALAPACK API not found. Please specify library location." - ) + message(STATUS + "A library with SCALAPACK API not found. Please specify library location." + ) endif(SCALAPACK_FIND_REQUIRED) endif(SCALAPACK_FOUND) endif(NOT SCALAPACK_FIND_QUIETLY) @@ -478,6 +490,9 @@ set(CMAKE_FIND_LIBRARY_SUFFIXES ${_scalapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) if (SCALAPACK_LIBRARIES) list(GET SCALAPACK_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + if (NOT SCALAPACK_LIBRARY_DIRS) + set(SCALAPACK_LIBRARY_DIRS "${first_lib_path}") + endif() if (${first_lib_path} MATCHES "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)") string(REGEX REPLACE "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)" "" not_cached_dir "${first_lib_path}") set(SCALAPACK_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of SCALAPACK library" FORCE) diff --git a/CMakeModules/morse/find/FindSCOTCH.cmake b/CMakeModules/morse/find/FindSCOTCH.cmake index 48f6542b0c9d26602b16f239eafcbea7e722328b..20f617055c8327edb209f7f6bd5fc61c078c150b 100644 --- a/CMakeModules/morse/find/FindSCOTCH.cmake +++ b/CMakeModules/morse/find/FindSCOTCH.cmake @@ -197,16 +197,16 @@ else() foreach(scotch_lib ${SCOTCH_libs_to_find}) set(SCOTCH_${scotch_lib}_LIBRARY "SCOTCH_${scotch_lib}_LIBRARY-NOTFOUND") find_library(SCOTCH_${scotch_lib}_LIBRARY - NAMES ${scotch_lib} - HINTS ${SCOTCH_DIR} - PATH_SUFFIXES lib lib32 lib64) + NAMES ${scotch_lib} + HINTS ${SCOTCH_DIR} + PATH_SUFFIXES lib lib32 lib64) endforeach() else() foreach(scotch_lib ${SCOTCH_libs_to_find}) set(SCOTCH_${scotch_lib}_LIBRARY "SCOTCH_${scotch_lib}_LIBRARY-NOTFOUND") find_library(SCOTCH_${scotch_lib}_LIBRARY - NAMES ${scotch_lib} - HINTS ${_lib_env}) + NAMES ${scotch_lib} + HINTS ${_lib_env}) endforeach() endif() endif() @@ -306,6 +306,9 @@ endif(SCOTCH_LIBRARIES) if (SCOTCH_LIBRARIES) list(GET SCOTCH_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + if (NOT SCOTCH_LIBRARY_DIRS) + set(SCOTCH_LIBRARY_DIRS "${first_lib_path}") + endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") set(SCOTCH_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of SCOTCH library" FORCE) diff --git a/CMakeModules/morse/find/FindSIMGRID.cmake b/CMakeModules/morse/find/FindSIMGRID.cmake index db03529999cddfa678cc3f65b78325b87b4ddd79..82f848131d81d493783f08e6d59f7d5fff34ba58 100644 --- a/CMakeModules/morse/find/FindSIMGRID.cmake +++ b/CMakeModules/morse/find/FindSIMGRID.cmake @@ -78,8 +78,8 @@ if(PKG_CONFIG_EXECUTABLE AND NOT SIMGRID_GIVEN_BY_USER) #endif() else() message(STATUS "${Magenta}Looking for SIMGRID - not found using PkgConfig." - "\n Perhaps you should add the directory containing simgrid.pc to the" - "\n PKG_CONFIG_PATH environment variable.${ColourReset}") + "\n Perhaps you should add the directory containing simgrid.pc to the" + "\n PKG_CONFIG_PATH environment variable.${ColourReset}") endif() endif() @@ -193,9 +193,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT SIMGRID_FOUND) string(REPLACE ":" ";" _lib_env "$ENV{LIB}") else() if(APPLE) - string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") else() - string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") + string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") endif() list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") @@ -216,14 +216,14 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT SIMGRID_FOUND) if(SIMGRID_DIR) set(SIMGRID_simgrid_LIBRARY "SIMGRID_simgrid_LIBRARY-NOTFOUND") find_library(SIMGRID_simgrid_LIBRARY - NAMES simgrid - HINTS ${SIMGRID_DIR} - PATH_SUFFIXES lib lib32 lib64) + NAMES simgrid + HINTS ${SIMGRID_DIR} + PATH_SUFFIXES lib lib32 lib64) else() set(SIMGRID_simgrid_LIBRARY "SIMGRID_simgrid_LIBRARY-NOTFOUND") find_library(SIMGRID_simgrid_LIBRARY - NAMES simgrid - HINTS ${_lib_env}) + NAMES simgrid + HINTS ${_lib_env}) endif() endif() mark_as_advanced(SIMGRID_simgrid_LIBRARY) @@ -280,10 +280,10 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT SIMGRID_FOUND) if(NOT SIMGRID_WORKS) if(NOT SIMGRID_FIND_QUIETLY) - message(STATUS "Looking for simgrid : test of fut_keychange with simgrid library fails") - message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") - message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") - message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") + message(STATUS "Looking for simgrid : test of fut_keychange with simgrid library fails") + message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") + message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") + message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") endif() endif() set(CMAKE_REQUIRED_INCLUDES) @@ -299,6 +299,7 @@ if (SIMGRID_LIBRARIES) else() list(GET SIMGRID_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + set(SIMGRID_LIBRARY_DIRS "${first_lib_path}") endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") diff --git a/CMakeModules/morse/find/FindSTARPU.cmake b/CMakeModules/morse/find/FindSTARPU.cmake index adf884a3823286148c4dd76a46e85619a03bbb3d..9a2b710e6080c7fc1a97442f6ca7ee1b2d42547a 100644 --- a/CMakeModules/morse/find/FindSTARPU.cmake +++ b/CMakeModules/morse/find/FindSTARPU.cmake @@ -3,7 +3,7 @@ # @copyright (c) 2009-2014 The University of Tennessee and The University # of Tennessee Research Foundation. # All rights reserved. -# @copyright (c) 2012-2015 Inria. All rights reserved. +# @copyright (c) 2012-2017 Inria. All rights reserved. # @copyright (c) 2012-2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved. # ### @@ -39,7 +39,7 @@ # STARPU_INCLUDE_DIRS_DEP - starpu + dependencies include directories # STARPU_LIBRARY_DIRS_DEP - starpu + dependencies link directories # STARPU_LIBRARIES_DEP - starpu libraries + dependencies -# STARPU_VERSION_STRING - A human-readable string containing the version of the package found +# STARPU_VERSION - A human-readable string containing the version of the package found # STARPU_VERSION_MAJOR - The major version of the package found # STARPU_VERSION_MINOR - The minor version of the package found # The user can give specific paths where to find the libraries adding cmake @@ -55,7 +55,7 @@ # Copyright 2012-2013 Emmanuel Agullo # Copyright 2012-2013 Mathieu Faverge # Copyright 2012 Cedric Castagnede -# Copyright 2013 Florent Pruvost +# Copyright 2013-2017 Florent Pruvost # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file MORSE-Copyright.txt for details. @@ -211,11 +211,18 @@ find_package(PkgConfig QUIET) if(PKG_CONFIG_EXECUTABLE AND NOT STARPU_GIVEN_BY_USER) - pkg_search_module(STARPU_SHM libstarpu) + set (STARPU_VERSION_LIST "1.3;1.2;1.1;1.0") + foreach(_version ${STARPU_VERSION_LIST}) + pkg_search_module(STARPU_SHM starpu-${_version}) + if (STARPU_SHM_FOUND) + set(STARPU_VERSION "${_version}" CACHE INTERNAL "StarPU version found") + break() + endif() + endforeach() set(STARPU_INCLUDE_DIRS "${STARPU_SHM_STATIC_INCLUDE_DIRS}") set(STARPU_LIBRARY_DIRS "${STARPU_SHM_STATIC_LIBRARY_DIRS}") if(STARPU_LOOK_FOR_MPI AND MPI_FOUND) - pkg_search_module(STARPU_MPI libstarpumpi) + pkg_search_module(STARPU_MPI starpumpi-${STARPU_VERSION}) endif() if (NOT STARPU_FIND_QUIETLY) if (STARPU_SHM_FOUND AND STARPU_SHM_LIBRARIES) @@ -231,39 +238,41 @@ if(PKG_CONFIG_EXECUTABLE AND NOT STARPU_GIVEN_BY_USER) list(GET STARPU_VERSION_STRING_LIST 1 STARPU_VERSION_MINOR) else() message(STATUS "${Magenta}Looking for STARPU - not found using PkgConfig." - "\n Perhaps you should add the directory containing libstarpu.pc" - "\n to the PKG_CONFIG_PATH environment variable.${ColourReset}") + "\n Perhaps you should add the directory containing libstarpu.pc" + "\n to the PKG_CONFIG_PATH environment variable.${ColourReset}") endif() if (STARPU_LOOK_FOR_MPI) if (STARPU_MPI_FOUND AND STARPU_MPI_LIBRARIES) - message(STATUS "Looking for STARPU MPI - found using PkgConfig") + message(STATUS "Looking for STARPU MPI - found using PkgConfig") else() - message(STATUS "${Magenta}Looking for STARPU MPI - not found using PkgConfig." - " Perhaps you should add the directory containing libstarpumpi.pc to" - " the PKG_CONFIG_PATH environment variable.${ColourReset}") + message(STATUS "${Magenta}Looking for STARPU MPI - not found using PkgConfig." + " Perhaps you should add the directory containing libstarpumpi.pc to" + " the PKG_CONFIG_PATH environment variable.${ColourReset}") endif() endif() - endif() - if (STARPU_FIND_VERSION_EXACT) - if( NOT (STARPU_FIND_VERSION_MAJOR STREQUAL STARPU_VERSION_MAJOR) OR - NOT (STARPU_FIND_VERSION_MINOR STREQUAL STARPU_VERSION_MINOR) ) - if(STARPU_FIND_REQUIRED AND NOT STARPU_FIND_QUIETLY) - message(FATAL_ERROR - "STARPU version found is ${STARPU_VERSION_STRING}" - " when required is ${STARPU_FIND_VERSION}") + # check if the version found respects the minimum required + if (STARPU_FIND_VERSION_EXACT) + if( NOT (STARPU_FIND_VERSION_MAJOR STREQUAL STARPU_VERSION_MAJOR) OR + NOT (STARPU_FIND_VERSION_MINOR STREQUAL STARPU_VERSION_MINOR) ) + if(NOT STARPU_FIND_QUIETLY) + message(WARNING + "STARPU version found is ${STARPU_VERSION}" + " when required is ${STARPU_FIND_VERSION}") + endif() endif() - endif() - else() - # if the version found is older than the required then error - if( (STARPU_FIND_VERSION_MAJOR STRGREATER STARPU_VERSION_MAJOR) OR - (STARPU_FIND_VERSION_MINOR STRGREATER STARPU_VERSION_MINOR) ) - if(STARPU_FIND_REQUIRED AND NOT STARPU_FIND_QUIETLY) - message(FATAL_ERROR - "STARPU version found is ${STARPU_VERSION_STRING}" - " when required is ${STARPU_FIND_VERSION} or newer") + else() + # if the version found is older than the required then error + if( (STARPU_FIND_VERSION_MAJOR STRGREATER STARPU_VERSION_MAJOR) OR + (STARPU_FIND_VERSION_MINOR STRGREATER STARPU_VERSION_MINOR) ) + if(NOT STARPU_FIND_QUIETLY) + message(WARNING + "STARPU version found is ${STARPU_VERSION}" + " when required is ${STARPU_FIND_VERSION} or newer") + endif() endif() endif() + endif() if(STARPU_MPI_LIBRARIES) @@ -343,33 +352,33 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND) foreach(starpu_hdr ${STARPU_hdrs_to_find}) set(STARPU_${starpu_hdr}_INCLUDE_DIRS "STARPU_${starpu_hdr}_INCLUDE_DIRS-NOTFOUND") find_path(STARPU_${starpu_hdr}_INCLUDE_DIRS - NAMES ${starpu_hdr} - HINTS ${STARPU_INCDIR}) + NAMES ${starpu_hdr} + HINTS ${STARPU_INCDIR}) endforeach() else() if(STARPU_DIR) foreach(starpu_hdr ${STARPU_hdrs_to_find}) - set(STARPU_${starpu_hdr}_INCLUDE_DIRS "STARPU_${starpu_hdr}_INCLUDE_DIRS-NOTFOUND") - find_path(STARPU_${starpu_hdr}_INCLUDE_DIRS - NAMES ${starpu_hdr} - HINTS ${STARPU_DIR} - PATH_SUFFIXES "include" - "include/starpu/1.0" - "include/starpu/1.1" - "include/starpu/1.2" - "include/starpu/1.3") + set(STARPU_${starpu_hdr}_INCLUDE_DIRS "STARPU_${starpu_hdr}_INCLUDE_DIRS-NOTFOUND") + find_path(STARPU_${starpu_hdr}_INCLUDE_DIRS + NAMES ${starpu_hdr} + HINTS ${STARPU_DIR} + PATH_SUFFIXES "include" + "include/starpu/1.0" + "include/starpu/1.1" + "include/starpu/1.2" + "include/starpu/1.3") endforeach() else() foreach(starpu_hdr ${STARPU_hdrs_to_find}) - set(STARPU_${starpu_hdr}_INCLUDE_DIRS "STARPU_${starpu_hdr}_INCLUDE_DIRS-NOTFOUND") - find_path(STARPU_${starpu_hdr}_INCLUDE_DIRS - NAMES ${starpu_hdr} - HINTS ${_inc_env} - PATH_SUFFIXES - "starpu/1.0" - "starpu/1.1" - "starpu/1.2" - "starpu/1.3") + set(STARPU_${starpu_hdr}_INCLUDE_DIRS "STARPU_${starpu_hdr}_INCLUDE_DIRS-NOTFOUND") + find_path(STARPU_${starpu_hdr}_INCLUDE_DIRS + NAMES ${starpu_hdr} + HINTS ${_inc_env} + PATH_SUFFIXES + "starpu/1.0" + "starpu/1.1" + "starpu/1.2" + "starpu/1.3") endforeach() endif() endif() @@ -390,8 +399,8 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND) string(REGEX REPLACE "(.*)define([ \t]*)${_PACKAGE}_MINOR_VERSION([ \t]*)([0-9]+)(.*)" "\\4" ${_PACKAGE}_VERSION_MINOR "${_file}") - set(${_PACKAGE}_VERSION_STRING - "${${_PACKAGE}_VERSION_MAJOR}.${${_PACKAGE}_VERSION_MINOR}" CACHE PATH "StarPU version found in starpu_config.h") + set(${_PACKAGE}_VERSION + "${${_PACKAGE}_VERSION_MAJOR}.${${_PACKAGE}_VERSION_MINOR}" CACHE INTERNAL "StarPU version found") #message(STATUS "${_PACKAGE}_VERSION_MAJOR = -${${_PACKAGE}_VERSION_MAJOR}-") #message(STATUS "${_PACKAGE}_VERSION_MINOR = -${${_PACKAGE}_VERSION_MINOR}-") @@ -403,40 +412,40 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND) GET_VERSION("STARPU" "${STARPU_starpu_config.h_INCLUDE_DIRS}/starpu_config.h") if (STARPU_VERSION_MAJOR AND STARPU_VERSION_MINOR) if (STARPU_FIND_VERSION_EXACT) - if (STARPU_FIND_VERSION_MAJOR AND STARPU_FIND_VERSION_MINOR) - if( NOT (STARPU_FIND_VERSION_MAJOR STREQUAL STARPU_VERSION_MAJOR) OR - NOT (STARPU_FIND_VERSION_MINOR STREQUAL STARPU_VERSION_MINOR) ) - if(STARPU_FIND_REQUIRED AND NOT STARPU_FIND_QUIETLY) - message(FATAL_ERROR - "STARPU version found is ${STARPU_VERSION_STRING} " - "when required is ${STARPU_FIND_VERSION}") - endif() - endif() - endif() + if (STARPU_FIND_VERSION_MAJOR AND STARPU_FIND_VERSION_MINOR) + if( NOT (STARPU_FIND_VERSION_MAJOR STREQUAL STARPU_VERSION_MAJOR) OR + NOT (STARPU_FIND_VERSION_MINOR STREQUAL STARPU_VERSION_MINOR) ) + if(NOT STARPU_FIND_QUIETLY) + message(WARNING + "STARPU version found is ${STARPU_VERSION} " + "when required is ${STARPU_FIND_VERSION}") + endif() + endif() + endif() else() - if (STARPU_FIND_VERSION_MAJOR AND STARPU_FIND_VERSION_MINOR) - # if the version found is older than the required then error - if( (STARPU_FIND_VERSION_MAJOR STRGREATER STARPU_VERSION_MAJOR) OR - (STARPU_FIND_VERSION_MINOR STRGREATER STARPU_VERSION_MINOR) ) - if(STARPU_FIND_REQUIRED AND NOT STARPU_FIND_QUIETLY) - message(FATAL_ERROR - "STARPU version found is ${STARPU_VERSION_STRING} " - "when required is ${STARPU_FIND_VERSION} or newer") - endif() - endif() - endif() + if (STARPU_FIND_VERSION_MAJOR AND STARPU_FIND_VERSION_MINOR) + # if the version found is older than the required then error + if( (STARPU_FIND_VERSION_MAJOR STRGREATER STARPU_VERSION_MAJOR) OR + (STARPU_FIND_VERSION_MINOR STRGREATER STARPU_VERSION_MINOR) ) + if(NOT STARPU_FIND_QUIETLY) + message(WARNING + "STARPU version found is ${STARPU_VERSION} " + "when required is ${STARPU_FIND_VERSION} or newer") + endif() + endif() + endif() endif() else() - if(STARPU_FIND_REQUIRED AND NOT STARPU_FIND_QUIETLY) - message(FATAL_ERROR - "STARPU version has not been found using starpu_config.h" - " located in ${STARPU_starpu_config.h_INCLUDE_DIRS}") + if(STARPU_FIND_REQUIRED) + message(FATAL_ERROR + "STARPU version has not been found using starpu_config.h" + " located in ${STARPU_starpu_config.h_INCLUDE_DIRS}") endif() endif() else() - if(STARPU_FIND_REQUIRED AND NOT STARPU_FIND_QUIETLY) + if(STARPU_FIND_REQUIRED) message(FATAL_ERROR - "starpu_config.h has not been found while required to get StarPU version") + "starpu_config.h has not been found while required to get StarPU version") endif() endif() @@ -458,33 +467,33 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND) foreach(starpu_hdr ${STARPU_hdrs_to_find}) set(STARPU_${starpu_hdr}_INCLUDE_DIRS "STARPU_${starpu_hdr}_INCLUDE_DIRS-NOTFOUND") find_path(STARPU_${starpu_hdr}_INCLUDE_DIRS - NAMES ${starpu_hdr} - HINTS ${STARPU_INCDIR}) + NAMES ${starpu_hdr} + HINTS ${STARPU_INCDIR}) endforeach() else() if(STARPU_DIR) set(STARPU_${starpu_hdr}_INCLUDE_DIRS "STARPU_${starpu_hdr}_INCLUDE_DIRS-NOTFOUND") foreach(starpu_hdr ${STARPU_hdrs_to_find}) - find_path(STARPU_${starpu_hdr}_INCLUDE_DIRS - NAMES ${starpu_hdr} - HINTS ${STARPU_DIR} - PATH_SUFFIXES "include" - "include/starpu/1.0" - "include/starpu/1.1" - "include/starpu/1.2" - "include/starpu/1.3") + find_path(STARPU_${starpu_hdr}_INCLUDE_DIRS + NAMES ${starpu_hdr} + HINTS ${STARPU_DIR} + PATH_SUFFIXES "include" + "include/starpu/1.0" + "include/starpu/1.1" + "include/starpu/1.2" + "include/starpu/1.3") endforeach() else() foreach(starpu_hdr ${STARPU_hdrs_to_find}) - set(STARPU_${starpu_hdr}_INCLUDE_DIRS "STARPU_${starpu_hdr}_INCLUDE_DIRS-NOTFOUND") - find_path(STARPU_${starpu_hdr}_INCLUDE_DIRS - NAMES ${starpu_hdr} - HINTS ${_inc_env} - PATH_SUFFIXES - "starpu/1.0" - "starpu/1.1" - "starpu/1.2" - "starpu/1.3") + set(STARPU_${starpu_hdr}_INCLUDE_DIRS "STARPU_${starpu_hdr}_INCLUDE_DIRS-NOTFOUND") + find_path(STARPU_${starpu_hdr}_INCLUDE_DIRS + NAMES ${starpu_hdr} + HINTS ${_inc_env} + PATH_SUFFIXES + "starpu/1.0" + "starpu/1.1" + "starpu/1.2" + "starpu/1.3") endforeach() endif() endif() @@ -499,24 +508,24 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND) list(APPEND STARPU_INCLUDE_DIRS "${STARPU_${starpu_hdr}_INCLUDE_DIRS}" ) else () if(NOT STARPU_FIND_QUIETLY) - message(STATUS "Looking for starpu -- ${starpu_hdr} not found") + message(STATUS "Looking for starpu -- ${starpu_hdr} not found") endif() if(starpu_hdr STREQUAL "starpu_mpi.h") - if(NOT STARPU_FIND_REQUIRED_MPI) - if (NOT STARPU_FIND_QUIETLY) - message(STATUS "Looking for starpu -- ${starpu_hdr} not required") - endif() - else() - list(APPEND STARPU_INCLUDE_DIRS "${STARPU_${starpu_hdr}_INCLUDE_DIRS}" ) - endif() + if(NOT STARPU_FIND_REQUIRED_MPI) + if (NOT STARPU_FIND_QUIETLY) + message(STATUS "Looking for starpu -- ${starpu_hdr} not required") + endif() + else() + list(APPEND STARPU_INCLUDE_DIRS "${STARPU_${starpu_hdr}_INCLUDE_DIRS}" ) + endif() elseif( (starpu_hdr STREQUAL "starpu_cuda.h") OR (starpu_hdr STREQUAL "starpu_scheduler.h") ) - if(NOT STARPU_FIND_REQUIRED_CUDA) - if (NOT STARPU_FIND_QUIETLY) - message(STATUS "Looking for starpu -- ${starpu_hdr} not required") - endif() - else() - list(APPEND STARPU_INCLUDE_DIRS "${STARPU_${starpu_hdr}_INCLUDE_DIRS}" ) - endif() + if(NOT STARPU_FIND_REQUIRED_CUDA) + if (NOT STARPU_FIND_QUIETLY) + message(STATUS "Looking for starpu -- ${starpu_hdr} not required") + endif() + else() + list(APPEND STARPU_INCLUDE_DIRS "${STARPU_${starpu_hdr}_INCLUDE_DIRS}" ) + endif() endif() endif () mark_as_advanced(STARPU_${starpu_hdr}_INCLUDE_DIRS) @@ -546,15 +555,15 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND) list(APPEND _lib_env "${ENV_STARPU_DIR}/lib") else() if(WIN32) - string(REPLACE ":" ";" _lib_env "$ENV{LIB}") + string(REPLACE ":" ";" _lib_env "$ENV{LIB}") else() - if(APPLE) - string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") - else() - string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") - endif() - list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") - list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") + if(APPLE) + string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") + else() + string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") + endif() + list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") + list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") endif() endif() list(REMOVE_DUPLICATES _lib_env) @@ -563,37 +572,37 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND) # ---------------------------------------------- # create list of libs to find - set(STARPU_libs_to_find "starpu-${STARPU_VERSION_STRING}") - set(STARPU_SHM_libs_to_find "starpu-${STARPU_VERSION_STRING}") + set(STARPU_libs_to_find "starpu-${STARPU_VERSION}") + set(STARPU_SHM_libs_to_find "starpu-${STARPU_VERSION}") if (STARPU_LOOK_FOR_MPI OR MPI_FOUND) - list(INSERT STARPU_libs_to_find 0 "starpumpi-${STARPU_VERSION_STRING}") + list(INSERT STARPU_libs_to_find 0 "starpumpi-${STARPU_VERSION}") set(STARPU_MPI_libs_to_find "${STARPU_libs_to_find}") endif() # call cmake macro to find the lib path if(STARPU_LIBDIR) foreach(starpu_lib ${STARPU_libs_to_find}) - set(STARPU_${starpu_lib}_LIBRARY "STARPU_${starpu_lib}_LIBRARY-NOTFOUND") - find_library(STARPU_${starpu_lib}_LIBRARY - NAMES ${starpu_lib} - HINTS ${STARPU_LIBDIR}) + set(STARPU_${starpu_lib}_LIBRARY "STARPU_${starpu_lib}_LIBRARY-NOTFOUND") + find_library(STARPU_${starpu_lib}_LIBRARY + NAMES ${starpu_lib} + HINTS ${STARPU_LIBDIR}) endforeach() else() if(STARPU_DIR) - foreach(starpu_lib ${STARPU_libs_to_find}) - set(STARPU_${starpu_lib}_LIBRARY "STARPU_${starpu_lib}_LIBRARY-NOTFOUND") - find_library(STARPU_${starpu_lib}_LIBRARY - NAMES ${starpu_lib} - HINTS ${STARPU_DIR} - PATH_SUFFIXES lib lib32 lib64) - endforeach() + foreach(starpu_lib ${STARPU_libs_to_find}) + set(STARPU_${starpu_lib}_LIBRARY "STARPU_${starpu_lib}_LIBRARY-NOTFOUND") + find_library(STARPU_${starpu_lib}_LIBRARY + NAMES ${starpu_lib} + HINTS ${STARPU_DIR} + PATH_SUFFIXES lib lib32 lib64) + endforeach() else() - foreach(starpu_lib ${STARPU_libs_to_find}) - set(STARPU_${starpu_lib}_LIBRARY "STARPU_${starpu_lib}_LIBRARY-NOTFOUND") - find_library(STARPU_${starpu_lib}_LIBRARY - NAMES ${starpu_lib} - HINTS ${_lib_env}) - endforeach() + foreach(starpu_lib ${STARPU_libs_to_find}) + set(STARPU_${starpu_lib}_LIBRARY "STARPU_${starpu_lib}_LIBRARY-NOTFOUND") + find_library(STARPU_${starpu_lib}_LIBRARY + NAMES ${starpu_lib} + HINTS ${_lib_env}) + endforeach() endif() endif() @@ -603,49 +612,49 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND) if (STARPU_${starpu_lib}_LIBRARY) - get_filename_component(${starpu_lib}_lib_path ${STARPU_${starpu_lib}_LIBRARY} PATH) - # set cmake variables (respects naming convention) - - foreach(starpu_shm_lib ${STARPU_SHM_libs_to_find}) - if(starpu_shm_lib STREQUAL starpu_lib) - list(APPEND STARPU_SHM_LIBRARIES "${STARPU_${starpu_lib}_LIBRARY}") - endif() - endforeach() - if (STARPU_LOOK_FOR_MPI AND MPI_FOUND) - foreach(starpu_mpi_lib ${STARPU_MPI_libs_to_find}) - if(starpu_mpi_lib STREQUAL starpu_lib) - list(APPEND STARPU_MPI_LIBRARIES "${STARPU_${starpu_lib}_LIBRARY}") - endif() - endforeach() - endif () - list(APPEND STARPU_LIBRARY_DIRS "${${starpu_lib}_lib_path}") + get_filename_component(${starpu_lib}_lib_path ${STARPU_${starpu_lib}_LIBRARY} PATH) + # set cmake variables (respects naming convention) + + foreach(starpu_shm_lib ${STARPU_SHM_libs_to_find}) + if(starpu_shm_lib STREQUAL starpu_lib) + list(APPEND STARPU_SHM_LIBRARIES "${STARPU_${starpu_lib}_LIBRARY}") + endif() + endforeach() + if (STARPU_LOOK_FOR_MPI AND MPI_FOUND) + foreach(starpu_mpi_lib ${STARPU_MPI_libs_to_find}) + if(starpu_mpi_lib STREQUAL starpu_lib) + list(APPEND STARPU_MPI_LIBRARIES "${STARPU_${starpu_lib}_LIBRARY}") + endif() + endforeach() + endif () + list(APPEND STARPU_LIBRARY_DIRS "${${starpu_lib}_lib_path}") else (STARPU_${starpu_lib}_LIBRARY) - if(NOT STARPU_FIND_QUIETLY) - message(STATUS "Looking for starpu -- lib ${starpu_lib} not found") - endif() - if(starpu_lib STREQUAL "starpumpi-${STARPU_VERSION_STRING}" AND - NOT STARPU_FIND_REQUIRED_MPI) - # if MPI optional, not a problem: no NOTFOUND in list of MPI LIBRARIES - if(NOT STARPU_FIND_QUIETLY) - message(STATUS "Looking for starpu -- lib ${starpu_lib} not required") - endif() - else() - # for any other lib, add NOTFOUND in the proper list of LIBRARIES - foreach(starpu_shm_lib ${STARPU_SHM_libs_to_find}) - if(starpu_shm_lib STREQUAL starpu_lib) - set(STARPU_SHM_LIBRARIES "${STARPU_${starpu_lib}_LIBRARY}") - endif() - endforeach() - if (STARPU_LOOK_FOR_MPI AND MPI_FOUND) - foreach(starpu_mpi_lib ${STARPU_MPI_libs_to_find}) - if(starpu_mpi_lib STREQUAL starpu_lib) - list(APPEND STARPU_MPI_LIBRARIES "${STARPU_${starpu_mpi_lib}_LIBRARY}") - endif() - endforeach() - endif () - endif() + if(NOT STARPU_FIND_QUIETLY) + message(STATUS "Looking for starpu -- lib ${starpu_lib} not found") + endif() + if(starpu_lib STREQUAL "starpumpi-${STARPU_VERSION}" AND + NOT STARPU_FIND_REQUIRED_MPI) + # if MPI optional, not a problem: no NOTFOUND in list of MPI LIBRARIES + if(NOT STARPU_FIND_QUIETLY) + message(STATUS "Looking for starpu -- lib ${starpu_lib} not required") + endif() + else() + # for any other lib, add NOTFOUND in the proper list of LIBRARIES + foreach(starpu_shm_lib ${STARPU_SHM_libs_to_find}) + if(starpu_shm_lib STREQUAL starpu_lib) + set(STARPU_SHM_LIBRARIES "${STARPU_${starpu_lib}_LIBRARY}") + endif() + endforeach() + if (STARPU_LOOK_FOR_MPI AND MPI_FOUND) + foreach(starpu_mpi_lib ${STARPU_MPI_libs_to_find}) + if(starpu_mpi_lib STREQUAL starpu_lib) + list(APPEND STARPU_MPI_LIBRARIES "${STARPU_${starpu_mpi_lib}_LIBRARY}") + endif() + endforeach() + endif () + endif() endif (STARPU_${starpu_lib}_LIBRARY) @@ -662,7 +671,7 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND) if (STARPU_SHM_LIBRARIES AND STARPU_LIBRARY_DIRS AND STARPU_INCLUDE_DIRS) set(STARPU_SHM_FOUND TRUE) if(STARPU_MPI_LIBRARIES) - set(STARPU_MPI_FOUND TRUE) + set(STARPU_MPI_FOUND TRUE) endif() endif() @@ -704,142 +713,142 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND) set(CMAKE_REQUIRED_FLAGS) foreach(libdir ${STARPU_LIBRARY_DIRS}) if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") + list(APPEND REQUIRED_LIBDIRS "${libdir}") endif() endforeach() set(REQUIRED_LIBS "${STARPU_LIBRARIES}") # HWLOC if (HWLOC_FOUND AND STARPU_LOOK_FOR_HWLOC) if (HWLOC_INCLUDE_DIRS) - list(APPEND REQUIRED_INCDIRS "${HWLOC_INCLUDE_DIRS}") + list(APPEND REQUIRED_INCDIRS "${HWLOC_INCLUDE_DIRS}") endif() if (HWLOC_LIBRARY_DIRS) - list(APPEND REQUIRED_LIBDIRS "${HWLOC_LIBRARY_DIRS}") + list(APPEND REQUIRED_LIBDIRS "${HWLOC_LIBRARY_DIRS}") endif() foreach(lib ${HWLOC_LIBRARIES}) - if (EXISTS ${lib} OR ${lib} MATCHES "^-") - list(APPEND REQUIRED_LIBS "${lib}") - else() - list(APPEND REQUIRED_LIBS "-l${lib}") - endif() + if (EXISTS ${lib} OR ${lib} MATCHES "^-") + list(APPEND REQUIRED_LIBS "${lib}") + else() + list(APPEND REQUIRED_LIBS "-l${lib}") + endif() endforeach() endif() # MPI if (MPI_FOUND AND STARPU_LOOK_FOR_MPI) if (MPI_C_INCLUDE_PATH) - list(APPEND REQUIRED_INCDIRS "${MPI_C_INCLUDE_PATH}") + list(APPEND REQUIRED_INCDIRS "${MPI_C_INCLUDE_PATH}") endif() if (MPI_C_LINK_FLAGS) - if (${MPI_C_LINK_FLAGS} MATCHES " -") - string(REGEX REPLACE " -" "-" MPI_C_LINK_FLAGS ${MPI_C_LINK_FLAGS}) - endif() - list(APPEND REQUIRED_LDFLAGS "${MPI_C_LINK_FLAGS}") + if (${MPI_C_LINK_FLAGS} MATCHES " -") + string(REGEX REPLACE " -" "-" MPI_C_LINK_FLAGS ${MPI_C_LINK_FLAGS}) + endif() + list(APPEND REQUIRED_LDFLAGS "${MPI_C_LINK_FLAGS}") endif() list(APPEND REQUIRED_LIBS "${MPI_C_LIBRARIES}") endif() # MAGMA if (MAGMA_FOUND AND STARPU_LOOK_FOR_MAGMA) if (MAGMA_INCLUDE_DIRS_DEP) - list(APPEND REQUIRED_INCDIRS "${MAGMA_INCLUDE_DIRS_DEP}") + list(APPEND REQUIRED_INCDIRS "${MAGMA_INCLUDE_DIRS_DEP}") elseif(MAGMA_INCLUDE_DIRS) - list(APPEND REQUIRED_INCDIRS "${MAGMA_INCLUDE_DIRS}") + list(APPEND REQUIRED_INCDIRS "${MAGMA_INCLUDE_DIRS}") endif() if (MAGMA_LIBRARY_DIRS_DEP) - list(APPEND REQUIRED_LIBDIRS "${MAGMA_LIBRARY_DIRS_DEP}") + list(APPEND REQUIRED_LIBDIRS "${MAGMA_LIBRARY_DIRS_DEP}") elseif(MAGMA_LIBRARY_DIRS) - list(APPEND REQUIRED_LIBDIRS "${MAGMA_LIBRARY_DIRS}") + list(APPEND REQUIRED_LIBDIRS "${MAGMA_LIBRARY_DIRS}") endif() if (MAGMA_LIBRARIES_DEP) - list(APPEND REQUIRED_LIBS "${MAGMA_LIBRARIES_DEP}") + list(APPEND REQUIRED_LIBS "${MAGMA_LIBRARIES_DEP}") elseif(MAGMA_LIBRARIES) - foreach(lib ${MAGMA_LIBRARIES}) - if (EXISTS ${lib} OR ${lib} MATCHES "^-") - list(APPEND REQUIRED_LIBS "${lib}") - else() - list(APPEND REQUIRED_LIBS "-l${lib}") - endif() - endforeach() + foreach(lib ${MAGMA_LIBRARIES}) + if (EXISTS ${lib} OR ${lib} MATCHES "^-") + list(APPEND REQUIRED_LIBS "${lib}") + else() + list(APPEND REQUIRED_LIBS "-l${lib}") + endif() + endforeach() endif() if (MAGMA_LINKER_FLAGS) - list(APPEND REQUIRED_LDFLAGS "${MAGMA_LINKER_FLAGS}") + list(APPEND REQUIRED_LDFLAGS "${MAGMA_LINKER_FLAGS}") endif() endif() # CUDA if (CUDA_FOUND AND STARPU_LOOK_FOR_CUDA) if (CUDA_INCLUDE_DIRS) - list(APPEND REQUIRED_INCDIRS "${CUDA_INCLUDE_DIRS}") + list(APPEND REQUIRED_INCDIRS "${CUDA_INCLUDE_DIRS}") endif() if (CUDA_LIBRARY_DIRS) - list(APPEND REQUIRED_LIBDIRS "${CUDA_LIBRARY_DIRS}") + list(APPEND REQUIRED_LIBDIRS "${CUDA_LIBRARY_DIRS}") endif() list(APPEND REQUIRED_LIBS "${CUDA_CUBLAS_LIBRARIES};${CUDA_LIBRARIES}") endif() # FXT if (FXT_FOUND AND STARPU_LOOK_FOR_FXT) if (FXT_INCLUDE_DIRS) - list(APPEND REQUIRED_INCDIRS "${FXT_INCLUDE_DIRS}") + list(APPEND REQUIRED_INCDIRS "${FXT_INCLUDE_DIRS}") endif() if (FXT_LIBRARY_DIRS) - list(APPEND REQUIRED_LIBDIRS "${FXT_LIBRARY_DIRS}") + list(APPEND REQUIRED_LIBDIRS "${FXT_LIBRARY_DIRS}") endif() foreach(lib ${FXT_LIBRARIES}) - if (EXISTS ${lib} OR ${lib} MATCHES "^-") - list(APPEND REQUIRED_LIBS "${lib}") - else() - list(APPEND REQUIRED_LIBS "-l${lib}") - endif() + if (EXISTS ${lib} OR ${lib} MATCHES "^-") + list(APPEND REQUIRED_LIBS "${lib}") + else() + list(APPEND REQUIRED_LIBS "-l${lib}") + endif() endforeach() endif() # SIMGRID if (SIMGRID_FOUND AND STARPU_LOOK_FOR_SIMGRID) if (SIMGRID_INCLUDE_DIRS) - list(APPEND REQUIRED_INCDIRS "${SIMGRID_INCLUDE_DIRS}") + list(APPEND REQUIRED_INCDIRS "${SIMGRID_INCLUDE_DIRS}") endif() if (SIMGRID_LIBRARY_DIRS) - list(APPEND REQUIRED_LIBDIRS "${SIMGRID_LIBRARY_DIRS}") + list(APPEND REQUIRED_LIBDIRS "${SIMGRID_LIBRARY_DIRS}") endif() foreach(lib ${SIMGRID_LIBRARIES}) - if (EXISTS ${lib} OR ${lib} MATCHES "^-") - list(APPEND REQUIRED_LIBS "${lib}") - else() - list(APPEND REQUIRED_LIBS "-l${lib}") - endif() + if (EXISTS ${lib} OR ${lib} MATCHES "^-") + list(APPEND REQUIRED_LIBS "${lib}") + else() + list(APPEND REQUIRED_LIBS "-l${lib}") + endif() endforeach() list(APPEND REQUIRED_FLAGS "-include starpu_simgrid_wrap.h") endif() # BLAS if (BLAS_FOUND AND STARPU_LOOK_FOR_BLAS) if (BLAS_INCLUDE_DIRS) - list(APPEND REQUIRED_INCDIRS "${BLAS_INCLUDE_DIRS}") + list(APPEND REQUIRED_INCDIRS "${BLAS_INCLUDE_DIRS}") endif() if (BLAS_LIBRARY_DIRS) - list(APPEND REQUIRED_LIBDIRS "${BLAS_LIBRARY_DIRS}") + list(APPEND REQUIRED_LIBDIRS "${BLAS_LIBRARY_DIRS}") endif() list(APPEND REQUIRED_LIBS "${BLAS_LIBRARIES}") if (BLAS_LINKER_FLAGS) - list(APPEND REQUIRED_LDFLAGS "${BLAS_LINKER_FLAGS}") + list(APPEND REQUIRED_LDFLAGS "${BLAS_LINKER_FLAGS}") endif() endif() # Fortran if (CMAKE_C_COMPILER_ID MATCHES "GNU") find_library( - FORTRAN_gfortran_LIBRARY - NAMES gfortran - HINTS ${_lib_env} - ) + FORTRAN_gfortran_LIBRARY + NAMES gfortran + HINTS ${_lib_env} + ) mark_as_advanced(FORTRAN_gfortran_LIBRARY) if (FORTRAN_gfortran_LIBRARY AND CMAKE_C_COMPILER_ID STREQUAL "GNU") - list(APPEND REQUIRED_LIBS "${FORTRAN_gfortran_LIBRARY}") + list(APPEND REQUIRED_LIBS "${FORTRAN_gfortran_LIBRARY}") endif() elseif (CMAKE_C_COMPILER_ID MATCHES "Intel") find_library( - FORTRAN_ifcore_LIBRARY - NAMES ifcore - HINTS ${_lib_env} - ) + FORTRAN_ifcore_LIBRARY + NAMES ifcore + HINTS ${_lib_env} + ) mark_as_advanced(FORTRAN_ifcore_LIBRARY) if (FORTRAN_ifcore_LIBRARY) - list(APPEND REQUIRED_LIBS "${FORTRAN_ifcore_LIBRARY}") + list(APPEND REQUIRED_LIBS "${FORTRAN_ifcore_LIBRARY}") endif() endif() # EXTRA LIBS such that pthread, m, rt @@ -865,9 +874,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND) if(STARPU_WORKS) # save link with dependencies if (REQUIRED_FLAGS) - set(STARPU_LIBRARIES_DEP "${REQUIRED_FLAGS};${REQUIRED_LIBS}") + set(STARPU_LIBRARIES_DEP "${REQUIRED_FLAGS};${REQUIRED_LIBS}") else() - set(STARPU_LIBRARIES_DEP "${REQUIRED_LIBS}") + set(STARPU_LIBRARIES_DEP "${REQUIRED_LIBS}") endif() set(STARPU_LIBRARY_DIRS_DEP "${REQUIRED_LIBDIRS}") set(STARPU_INCLUDE_DIRS_DEP "${REQUIRED_INCDIRS}") @@ -877,13 +886,13 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT STARPU_FOUND) list(REMOVE_DUPLICATES STARPU_LINKER_FLAGS) else() if(NOT STARPU_FIND_QUIETLY) - message(STATUS "Looking for starpu : test of starpu_init fails") - message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") - message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") - message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") - message(STATUS "Maybe STARPU is linked with specific libraries. " - "Have you tried with COMPONENTS (HWLOC, CUDA, MPI, BLAS, MAGMA, FXT, SIMGRID)? " - "See the explanation in FindSTARPU.cmake.") + message(STATUS "Looking for starpu : test of starpu_init fails") + message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") + message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") + message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") + message(STATUS "Maybe STARPU is linked with specific libraries. " + "Have you tried with COMPONENTS (HWLOC, CUDA, MPI, BLAS, MAGMA, FXT, SIMGRID)? " + "See the explanation in FindSTARPU.cmake.") endif() endif() set(CMAKE_REQUIRED_INCLUDES) @@ -897,12 +906,13 @@ if (STARPU_LIBRARIES) if (STARPU_LIBRARY_DIRS) foreach(dir ${STARPU_LIBRARY_DIRS}) if ("${dir}" MATCHES "starpu") - set(first_lib_path "${dir}") + set(first_lib_path "${dir}") endif() endforeach() else() list(GET STARPU_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + set(STARPU_LIBRARY_DIRS "${first_lib_path}") endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") @@ -922,8 +932,8 @@ if(NOT STARPU_FIND_QUIETLY) message(STATUS "StarPU library has been found.") if(STARPU_MPI_LIBRARIES) message(STATUS "The mpi version of StarPU has been found so that we manage" - " two lists of libs, one sequential and one parallel (see" - " STARPU_SHM_LIBRARIES and STARPU_MPI_LIBRARIES).") + " two lists of libs, one sequential and one parallel (see" + " STARPU_SHM_LIBRARIES and STARPU_MPI_LIBRARIES).") endif() message(STATUS "StarPU shared memory libraries stored in STARPU_SHM_LIBRARIES") endif() diff --git a/CMakeModules/morse/find/FindSUITESPARSE.cmake b/CMakeModules/morse/find/FindSUITESPARSE.cmake index 8aeb52d3bf6480d3e6556e6baf86e3563be46cb7..f0f93f63930f015b03fce88c227c5298f73de0e4 100644 --- a/CMakeModules/morse/find/FindSUITESPARSE.cmake +++ b/CMakeModules/morse/find/FindSUITESPARSE.cmake @@ -199,17 +199,17 @@ else() set(SUITESPARSE_${suitesparse_hdr}_DIRS "SUITESPARSE_${suitesparse_hdr}_INCLUDE_DIRS-NOTFOUND") foreach(suitesparse_hdr ${SUITESPARSE_hdrs_to_find}) find_path(SUITESPARSE_${suitesparse_hdr}_DIRS - NAMES ${suitesparse_hdr} - HINTS ${SUITESPARSE_DIR} - PATH_SUFFIXES "include") + NAMES ${suitesparse_hdr} + HINTS ${SUITESPARSE_DIR} + PATH_SUFFIXES "include") mark_as_advanced(SUITESPARSE_${suitesparse_hdr}_DIRS) endforeach() else() foreach(suitesparse_hdr ${SUITESPARSE_hdrs_to_find}) set(SUITESPARSE_${suitesparse_hdr}_DIRS "SUITESPARSE_${suitesparse_hdr}_INCLUDE_DIRS-NOTFOUND") find_path(SUITESPARSE_${suitesparse_hdr}_DIRS - NAMES ${suitesparse_hdr} - HINTS ${_inc_env} ${_inc_env}/suitesparse) + NAMES ${suitesparse_hdr} + HINTS ${_inc_env} ${_inc_env}/suitesparse) mark_as_advanced(SUITESPARSE_${suitesparse_hdr}_DIRS) endforeach() endif() @@ -267,17 +267,17 @@ else() foreach(suitesparse_lib ${SUITESPARSE_libs_to_find}) set(SUITESPARSE_${suitesparse_lib}_LIBRARY "SUITESPARSE_${suitesparse_lib}_LIBRARY-NOTFOUND") find_library(SUITESPARSE_${suitesparse_lib}_LIBRARY - NAMES ${suitesparse_lib} - HINTS ${SUITESPARSE_DIR} - PATH_SUFFIXES lib lib32 lib64) + NAMES ${suitesparse_lib} + HINTS ${SUITESPARSE_DIR} + PATH_SUFFIXES lib lib32 lib64) mark_as_advanced(SUITESPARSE_${suitesparse_lib}_LIBRARY) endforeach() else() foreach(suitesparse_lib ${SUITESPARSE_libs_to_find}) set(SUITESPARSE_${suitesparse_lib}_LIBRARY "SUITESPARSE_${suitesparse_lib}_LIBRARY-NOTFOUND") find_library(SUITESPARSE_${suitesparse_lib}_LIBRARY - NAMES ${suitesparse_lib} - HINTS ${_lib_env}) + NAMES ${suitesparse_lib} + HINTS ${_lib_env}) mark_as_advanced(SUITESPARSE_${suitesparse_lib}_LIBRARY) endforeach() endif() @@ -330,7 +330,7 @@ if(SUITESPARSE_LIBRARIES) endif() foreach(libdir ${METIS_LIBRARY_DIRS}) if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") + list(APPEND REQUIRED_LIBDIRS "${libdir}") endif() endforeach() list(APPEND REQUIRED_LIBS "${METIS_LIBRARIES}") @@ -342,7 +342,7 @@ if(SUITESPARSE_LIBRARIES) endif() foreach(libdir ${LAPACK_LIBRARY_DIRS}) if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") + list(APPEND REQUIRED_LIBDIRS "${libdir}") endif() endforeach() list(APPEND REQUIRED_LIBS "${LAPACK_LIBRARIES}") @@ -357,7 +357,7 @@ if(SUITESPARSE_LIBRARIES) endif() foreach(libdir ${BLAS_LIBRARY_DIRS}) if (libdir) - list(APPEND REQUIRED_LIBDIRS "${libdir}") + list(APPEND REQUIRED_LIBDIRS "${libdir}") endif() endforeach() list(APPEND REQUIRED_LIBS "${BLAS_LIBRARIES}") @@ -415,6 +415,9 @@ endif(SUITESPARSE_LIBRARIES) if (SUITESPARSE_LIBRARIES) list(GET SUITESPARSE_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + if (NOT SUITESPARSE_LIBRARY_DIRS) + set(SUITESPARSE_LIBRARY_DIRS "${first_lib_path}") + endif() if (${first_lib_path} MATCHES "/lib(32|64)?$") string(REGEX REPLACE "/lib(32|64)?$" "" not_cached_dir "${first_lib_path}") set(SUITESPARSE_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of SUITESPARSE library" FORCE) diff --git a/CMakeModules/morse/find/FindTMG.cmake b/CMakeModules/morse/find/FindTMG.cmake index 745cb4516eb5c8db5835ca8872e213255848754f..5a4137ef8a362b24d8d0c47d7d374aad5cc57dcf 100644 --- a/CMakeModules/morse/find/FindTMG.cmake +++ b/CMakeModules/morse/find/FindTMG.cmake @@ -138,15 +138,15 @@ if (LAPACK_FOUND) list(APPEND _lib_env "${ENV_TMG_DIR}/lib") else() if(WIN32) - string(REPLACE ":" ";" _lib_env "$ENV{LIB}") + string(REPLACE ":" ";" _lib_env "$ENV{LIB}") else() - if(APPLE) - string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") - else() - string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") - endif() - list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") - list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") + if(APPLE) + string(REPLACE ":" ";" _lib_env "$ENV{DYLD_LIBRARY_PATH}") + else() + string(REPLACE ":" ";" _lib_env "$ENV{LD_LIBRARY_PATH}") + endif() + list(APPEND _lib_env "${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}") + list(APPEND _lib_env "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") endif() endif() list(REMOVE_DUPLICATES _lib_env) @@ -158,20 +158,20 @@ if (LAPACK_FOUND) if(TMG_LIBDIR) set(TMG_tmg_LIBRARY "TMG_tmg_LIBRARY-NOTFOUND") find_library(TMG_tmg_LIBRARY - NAMES tmglib tmg - HINTS ${TMG_LIBDIR} ) + NAMES tmglib tmg + HINTS ${TMG_LIBDIR} ) else() if(TMG_DIR) - set(TMG_tmg_LIBRARY "TMG_tmg_LIBRARY-NOTFOUND") - find_library(TMG_tmg_LIBRARY - NAMES tmglib tmg - HINTS ${TMG_DIR} - PATH_SUFFIXES lib lib32 lib64 ) + set(TMG_tmg_LIBRARY "TMG_tmg_LIBRARY-NOTFOUND") + find_library(TMG_tmg_LIBRARY + NAMES tmglib tmg + HINTS ${TMG_DIR} + PATH_SUFFIXES lib lib32 lib64 ) else() - set(TMG_tmg_LIBRARY "TMG_tmg_LIBRARY-NOTFOUND") - find_library(TMG_tmg_LIBRARY - NAMES tmglib tmg - HINTS ${_lib_env} ) + set(TMG_tmg_LIBRARY "TMG_tmg_LIBRARY-NOTFOUND") + find_library(TMG_tmg_LIBRARY + NAMES tmglib tmg + HINTS ${_lib_env} ) endif() endif() mark_as_advanced(TMG_tmg_LIBRARY) @@ -187,7 +187,7 @@ if (LAPACK_FOUND) set(TMG_LIBRARIES "TMG_LIBRARIES-NOTFOUND") set(TMG_LIBRARY_DIRS "TMG_LIBRARY_DIRS-NOTFOUND") if(NOT TMG_FIND_QUIETLY) - message(STATUS "Looking for tmg -- lib tmg not found") + message(STATUS "Looking for tmg -- lib tmg not found") endif() endif () @@ -205,22 +205,22 @@ if (LAPACK_FOUND) # TMG if (TMG_INCLUDE_DIRS) - set(REQUIRED_INCDIRS "${TMG_INCLUDE_DIRS}") + set(REQUIRED_INCDIRS "${TMG_INCLUDE_DIRS}") endif() if (TMG_LIBRARY_DIRS) - set(REQUIRED_LIBDIRS "${TMG_LIBRARY_DIRS}") + set(REQUIRED_LIBDIRS "${TMG_LIBRARY_DIRS}") endif() set(REQUIRED_LIBS "${TMG_LIBRARIES}") # LAPACK if (LAPACK_INCLUDE_DIRS) - list(APPEND REQUIRED_INCDIRS "${LAPACK_INCLUDE_DIRS}") + list(APPEND REQUIRED_INCDIRS "${LAPACK_INCLUDE_DIRS}") endif() if (LAPACK_LIBRARY_DIRS) - list(APPEND REQUIRED_LIBDIRS "${LAPACK_LIBRARY_DIRS}") + list(APPEND REQUIRED_LIBDIRS "${LAPACK_LIBRARY_DIRS}") endif() list(APPEND REQUIRED_LIBS "${LAPACK_LIBRARIES}") if (LAPACK_LINKER_FLAGS) - list(APPEND REQUIRED_LDFLAGS "${LAPACK_LINKER_FLAGS}") + list(APPEND REQUIRED_LDFLAGS "${LAPACK_LINKER_FLAGS}") endif() # set required libraries for link @@ -228,7 +228,7 @@ if (LAPACK_FOUND) set(CMAKE_REQUIRED_LIBRARIES) list(APPEND CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LDFLAGS}") foreach(lib_dir ${REQUIRED_LIBDIRS}) - list(APPEND CMAKE_REQUIRED_LIBRARIES "-L${lib_dir}") + list(APPEND CMAKE_REQUIRED_LIBRARIES "-L${lib_dir}") endforeach() list(APPEND CMAKE_REQUIRED_LIBRARIES "${REQUIRED_LIBS}") string(REGEX REPLACE "^ -" "-" CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}") @@ -238,36 +238,36 @@ if (LAPACK_FOUND) include(CheckFunctionExists) include(CheckFortranFunctionExists) if (NOT _LANGUAGES_ MATCHES Fortran) - check_function_exists(dlarnv TMG_WORKS) + check_function_exists(dlarnv TMG_WORKS) else (NOT _LANGUAGES_ MATCHES Fortran) - check_fortran_function_exists(dlarnv TMG_WORKS) + check_fortran_function_exists(dlarnv TMG_WORKS) endif (NOT _LANGUAGES_ MATCHES Fortran) if (TMG_WORKS) - unset(TMG_WORKS CACHE) - if (NOT _LANGUAGES_ MATCHES Fortran) - check_function_exists(dlagsy TMG_WORKS) - else (NOT _LANGUAGES_ MATCHES Fortran) - check_fortran_function_exists(dlagsy TMG_WORKS) - endif (NOT _LANGUAGES_ MATCHES Fortran) - mark_as_advanced(TMG_WORKS) + unset(TMG_WORKS CACHE) + if (NOT _LANGUAGES_ MATCHES Fortran) + check_function_exists(dlagsy TMG_WORKS) + else (NOT _LANGUAGES_ MATCHES Fortran) + check_fortran_function_exists(dlagsy TMG_WORKS) + endif (NOT _LANGUAGES_ MATCHES Fortran) + mark_as_advanced(TMG_WORKS) endif() if(TMG_WORKS) - # save link with dependencies - set(TMG_LIBRARIES_DEP "${REQUIRED_LIBS}") - set(TMG_LIBRARY_DIRS_DEP "${REQUIRED_LIBDIRS}") - set(TMG_INCLUDE_DIRS_DEP "${REQUIRED_INCDIRS}") - set(TMG_LINKER_FLAGS "${REQUIRED_LDFLAGS}") - list(REMOVE_DUPLICATES TMG_LIBRARY_DIRS_DEP) - list(REMOVE_DUPLICATES TMG_INCLUDE_DIRS_DEP) - list(REMOVE_DUPLICATES TMG_LINKER_FLAGS) + # save link with dependencies + set(TMG_LIBRARIES_DEP "${REQUIRED_LIBS}") + set(TMG_LIBRARY_DIRS_DEP "${REQUIRED_LIBDIRS}") + set(TMG_INCLUDE_DIRS_DEP "${REQUIRED_INCDIRS}") + set(TMG_LINKER_FLAGS "${REQUIRED_LDFLAGS}") + list(REMOVE_DUPLICATES TMG_LIBRARY_DIRS_DEP) + list(REMOVE_DUPLICATES TMG_INCLUDE_DIRS_DEP) + list(REMOVE_DUPLICATES TMG_LINKER_FLAGS) else() - if(NOT TMG_FIND_QUIETLY) - message(STATUS "Looking for tmg: test of dlarnv and dlagsy with tmg and lapack libraries fails") - message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") - message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") - message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") - endif() + if(NOT TMG_FIND_QUIETLY) + message(STATUS "Looking for tmg: test of dlarnv and dlagsy with tmg and lapack libraries fails") + message(STATUS "CMAKE_REQUIRED_LIBRARIES: ${CMAKE_REQUIRED_LIBRARIES}") + message(STATUS "CMAKE_REQUIRED_INCLUDES: ${CMAKE_REQUIRED_INCLUDES}") + message(STATUS "Check in CMakeFiles/CMakeError.log to figure out why it fails") + endif() endif() set(CMAKE_REQUIRED_INCLUDES) set(CMAKE_REQUIRED_FLAGS) @@ -288,6 +288,9 @@ endif() if (TMG_LIBRARIES) list(GET TMG_LIBRARIES 0 first_lib) get_filename_component(first_lib_path "${first_lib}" PATH) + if (NOT TMG_LIBRARY_DIRS) + set(TMG_LIBRARY_DIRS "${first_lib_path}") + endif() if (${first_lib_path} MATCHES "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)") string(REGEX REPLACE "(/lib(32|64)?$)|(/lib/intel64$|/lib/ia32$)" "" not_cached_dir "${first_lib_path}") set(TMG_DIR_FOUND "${not_cached_dir}" CACHE PATH "Installation directory of TMG library" FORCE) diff --git a/CMakeModules/morse/find/RulesJDF.cmake b/CMakeModules/morse/find/RulesJDF.cmake index d3a7e5314041116159a196bad5f166fa9ec6e3c3..52d1679d5c2eaf1f4753f471719db299609203a1 100644 --- a/CMakeModules/morse/find/RulesJDF.cmake +++ b/CMakeModules/morse/find/RulesJDF.cmake @@ -3,6 +3,9 @@ # Setup the minimal environment to compile and generate .JDF files. # +set(PARSEC_PTGPP_CFLAGS "--noline" CACHE STRING "Additional parsec_ptgpp precompiling flags (separate flags with ';')" ) +mark_as_advanced(PARSEC_PTGPP_CFLAGS) + # # This macro creates a rule for every jdf basename passed in SOURCES. # The OUTPUTLIST contains the list of files generated by the maxro. diff --git a/CMakeModules/morse/precision_generator/Conversion.py b/CMakeModules/morse/precision_generator/Conversion.py index 00202d701620444b756ce211390fe22298e505f4..5921fe147f3806ec9bd34ab34cbe986b97c6cd26 100644 --- a/CMakeModules/morse/precision_generator/Conversion.py +++ b/CMakeModules/morse/precision_generator/Conversion.py @@ -129,13 +129,15 @@ class Conversion: self.copy = []; self.converted = []; load = False; - if self.debug: print '|'.join(self.types), self.precision, relpath(path.join(self.file[0],self.file[1])); + if self.debug: + print( '|'.join(self.types), self.precision, relpath(path.join(self.file[0],self.file[1])) ); for precision in self.precisions: """For each destination precision, make the appropriate changes to the file name/data.""" new_file = self.convert(self.file[1], precision); - if self.debug: print precision,':', + if self.debug: + print(precision,':') copy = False; - if new_file <> self.file[1] or self.prefix is not None: + if new_file != self.file[1] or self.prefix is not None: if self.prefix is None: """If no prefix is specified, use the file's current folder.""" prefix = '' @@ -152,31 +154,38 @@ class Conversion: if self.make: """If in GNU Make mode, write the rule to create the file.""" file_in = relpath(path.join(self.file[0],self.file[1])); - print file_out+':',file_in; - print "\t$(PYTHON)",path.realpath(sys.argv[0]),makeprefix,'-p',precision,"--file",file_in; + print(file_out+':',file_in); + print("\t$(PYTHON)",path.realpath(sys.argv[0]),makeprefix,'-p',precision,"--file",file_in); self.names.append(new_file); self.files_out.append(file_out); self.dependencies.append( (path.join(self.file[0],self.file[1]), precision, file_out) ); - if self.debug: print relpath(conversion), ':', + if self.debug: + print(relpath(conversion), ':') try: """Try to emulate Make like time based dependencies.""" date = path.getmtime(conversion); diff = self.date - date; self.dates.append(diff); if self.debug: - if diff > 0: print 'Old', - else: print 'Current', - print diff; - if diff > 0: load = True; + if diff > 0: + print('Old') + else: + print('Current') + print(diff); + if diff > 0: + load = True; except: - if self.debug: print 'Missing'; + if self.debug: + print('Missing'); self.dates.append(None); load = True; - elif precision <> self.precision : + elif precision != self.precision : """There was no change in the file's name, thus, no work can be done without overwriting the original.""" - if self.debug: print '<No Change>',':'; - else: print >> sys.stderr, new_file, 'had no change for', precision; + if self.debug: + print('<No Change>',':') + else: + print >> sys.stderr, new_file, 'had no change for', precision; self.names.append(None); self.dates.append(None); self.copy.append(copy); @@ -238,7 +247,7 @@ class Conversion: replace = replace.replace('\)',')'); data = re.sub(search, replace, data); except: - print 'Bad replacement pair ',i,'in',sub_type; + print('Bad replacement pair ',i,'in',sub_type); continue; return data; @@ -258,7 +267,7 @@ class Conversion: if sub_type == 'all': continue; try: data = self.substitute(sub_type, data, precision); - except Exception, e: + except Exception(e): raise ValueError('I encountered an unrecoverable error while working in subtype:',sub_type+'.'); """Replace the replacement keywork with one that signifies this is an output file, to prevent multiple replacement issues if run again.""" diff --git a/CMakeModules/morse/precision_generator/codegen.py b/CMakeModules/morse/precision_generator/codegen.py index 8b0322361cee09e5fec0a4f26e6948e73b403763..5066880748668262e851d7ccc6f6e7f76e5739e6 100755 --- a/CMakeModules/morse/precision_generator/codegen.py +++ b/CMakeModules/morse/precision_generator/codegen.py @@ -82,8 +82,8 @@ def main(): if options.make: """If the program should be GNU Make friendly.""" - print '## Automatically generated Makefile'; - print 'PYTHON ?= python'; + print('## Automatically generated Makefile'); + print('PYTHON ?= python'); c = Conversion(); """This initializes the variable for static member access.""" @@ -93,23 +93,23 @@ def main(): """Try creating and executing a converter.""" c = Conversion(tuple[0], tuple[1], tuple[2]); c.run(); - except Exception, e: + except Exception(e): print >> sys.stderr, str(e); continue; if options.make: """If the program should be GNU Make friendly.""" - print 'gen = ',' '+' '.join(c.files_out); - print 'cleangen:'; - print '\trm -f $(gen)'; - print 'generate: $(gen)'; - print '.PHONY: cleangen generate'; + print('gen = ',' '+' '.join(c.files_out)); + print('cleangen:'); + print('\trm -f $(gen)'); + print('generate: $(gen)'); + print('.PHONY: cleangen generate'); if options.in_print: """Should we print the input files?""" - print ' '.join(c.files_in); + print(' '.join(c.files_in)); if options.out_print: """Should we print the output files?""" - print ' '.join(c.files_out); + print(' '.join(c.files_out)); if options.out_clean: """Clean generated files""" for file in c.files_out: diff --git a/CMakeModules/morse/precision_generator/genDependencies.py b/CMakeModules/morse/precision_generator/genDependencies.py index 973e5aa29138d4e6ead48454951d9793717bcdd4..4e6cccf85f181c5169d5bb13886c8512cad1e439 100755 --- a/CMakeModules/morse/precision_generator/genDependencies.py +++ b/CMakeModules/morse/precision_generator/genDependencies.py @@ -77,7 +77,7 @@ class GenConversion: for precision in self.precisions: """For each destination precision, make the appropriate changes to the file name/data.""" new_file = self.convert(filename, precision); - if new_file <> filename or self.prefix is not None: + if new_file != filename or self.prefix is not None: if self.prefix is None: """If no prefix is specified, use the file's current folder.""" prefix = '' @@ -118,7 +118,7 @@ class GenConversion: replace = replace.replace('\)',')'); data = re.sub(search, replace, data); except: - print 'Bad replacement pair ',i,'in',sub_type; + print('Bad replacement pair ', i, 'in', sub_type); continue; return data; @@ -138,7 +138,7 @@ class GenConversion: if sub_type == 'all': continue; try: data = self.substitute(sub_type, data, precision); - except Exception, e: + except Exception(e): raise ValueError('I encountered an unrecoverable error while working in subtype:',sub_type+'.'); return data; @@ -201,11 +201,11 @@ def main(): try: """Try creating and executing a converter.""" result += c.run(file); - except Exception, e: + except Exception(e): print >> sys.stderr, str(e); continue; - print result; + print(result); if __name__ == "__main__": main(); diff --git a/CMakeModules/morse/precision_generator/subs.py b/CMakeModules/morse/precision_generator/subs.py index e195f43b26d81ec789bc1fc5806dee7c7391c873..8df6a7d500b1264f4ed8fcae98b61b2fa6a5d0e9 100644 --- a/CMakeModules/morse/precision_generator/subs.py +++ b/CMakeModules/morse/precision_generator/subs.py @@ -82,6 +82,8 @@ subs = { ('morse_get_s', 'morse_get_c' ), ('TASK_S', 'TASK_C' ), ('TASK_D', 'TASK_Z' ), + ('TASKS_S', 'TASKS_C' ), + ('TASKS_D', 'TASKS_Z' ), ('RUNTIME_S', 'RUNTIME_C' ), ('RUNTIME_D', 'RUNTIME_Z' ), @@ -225,764 +227,790 @@ subs = { 'normal' : [ # ----- Special line indicating column types # old python (2.4) requires this line to be list [] rather than tuple () to use index() function. - ['s', 'd', 'c', 'z' ], + ['p', 's', 'd', 'c', 'z' ], - - # TODO clean; shouldn't be added this way - ('cblas_sscal', ' cblas_dscal', 'cblas_csscal', 'cblas_zdscal'), - ('stsmqr_hetra1', 'dtsmqr_hetra1', 'ctsmqr_hetra1', 'ztsmqr_hetra1'), - ('stsmlq_hetra1', 'dtsmlq_hetra1', 'ctsmlq_hetra1', 'ztsmlq_hetra1'), - ('codelet_ssyrfb', 'codelet_dsyrfb', 'codelet_cherfb', 'codelet_zherfb'), - ('cl_ssyrfb', 'cl_dsyrfb', 'cl_cherfb', 'cl_zherfb'), - ('she2ge', 'dhe2ge', 'che2ge', 'zhe2ge'), - ('sgbcpy', 'dgbcpy', 'cgbcpy', 'zgbcpy'), + # TODO clean; shouldn't be added this way + ('', 'cblas_sscal', ' cblas_dscal', 'cblas_csscal', 'cblas_zdscal'), + ('', 'stsmqr_hetra1', 'dtsmqr_hetra1', 'ctsmqr_hetra1', 'ztsmqr_hetra1'), + ('', 'stsmlq_hetra1', 'dtsmlq_hetra1', 'ctsmlq_hetra1', 'ztsmlq_hetra1'), + ('', 'codelet_ssyrfb', 'codelet_dsyrfb', 'codelet_cherfb', 'codelet_zherfb'), + ('', 'cl_ssyrfb', 'cl_dsyrfb', 'cl_cherfb', 'cl_zherfb'), + ('', 'she2ge', 'dhe2ge', 'che2ge', 'zhe2ge'), + ('', 'sgbcpy', 'dgbcpy', 'cgbcpy', 'zgbcpy'), # ----- Preprocessor - ('#define PRECISION_s', '#define PRECISION_d', '#define PRECISION_c', '#\s*define PRECISION_z' ), - ('#undef PRECISION_s', '#undef PRECISION_d', '#undef PRECISION_c', '#undef PRECISION_z' ), - ('#define REAL', '#define REAL', '#define COMPLEX', '#define COMPLEX' ), - ('#undef COMPLEX', '#undef COMPLEX', '#undef REAL', '#undef REAL' ), - ('#define SINGLE', '#define DOUBLE', '#define SINGLE', '#define DOUBLE' ), - ('#undef DOUBLE', '#undef SINGLE', '#undef DOUBLE', '#undef SINGLE' ), + ('', '#define PRECISION_s', '#define PRECISION_d', '#define PRECISION_c', '#\s*define PRECISION_z' ), + ('', '#undef PRECISION_s', '#undef PRECISION_d', '#undef PRECISION_c', '#undef PRECISION_z' ), + ('', '#define REAL', '#define REAL', '#define COMPLEX', '#define COMPLEX' ), + ('', '#undef COMPLEX', '#undef COMPLEX', '#undef REAL', '#undef REAL' ), + ('', '#define SINGLE', '#define DOUBLE', '#define SINGLE', '#define DOUBLE' ), + ('', '#undef DOUBLE', '#undef SINGLE', '#undef DOUBLE', '#undef SINGLE' ), # ----- Fortran Types - ('real\(kind=c_float\)', 'real\(kind=c_double\)', 'complex\(kind=c_float_complex\)', 'complex\(kind=c_double_complex\)' ), - ('real(kind=c_float\)', 'real\(kind=c_double\)', 'real\(kind=c_float\)', 'real\(kind=c_double\)' ), - ('real', 'double precision', 'complex', 'complex\(kind=wp\)' ), + ('', 'real\(kind=c_float\)', 'real\(kind=c_double\)', 'complex\(kind=c_float_complex\)', 'complex\(kind=c_double_complex\)' ), + ('', 'real(kind=c_float\)', 'real\(kind=c_double\)', 'real\(kind=c_float\)', 'real\(kind=c_double\)' ), + ('', 'real', 'double precision', 'complex', 'complex\(kind=wp\)' ), + ('', 'real', 'double precision', 'real', r'\bdouble precision' ), # before double + ('', 'real', 'double precision', 'complex', r'\bcomplex\*16' ), + ('', 'REAL', 'DOUBLE_PRECISION', 'COMPLEX', r'\bCOMPLEX_16' ), + ('', 'REAL', 'DOUBLE PRECISION', 'COMPLEX', r'\bDOUBLE COMPLEX' ), + ('', 'REAL', 'DOUBLE PRECISION', 'REAL', r'\bDOUBLE PRECISION' ), # ----- Data types - ('real', 'double precision', 'real', r'\bdouble precision' ), # before double - ('float', 'double', 'float _Complex', r'\bdouble _Complex' ), - ('float', 'double', 'cuFloatComplex', r'\bcuDoubleComplex' ), - ('float', 'double', 'make_cuFloatComplex', 'make_cuDoubleComplex' ), - ('float', 'double', 'magmaFloatComplex', r'\bmagmaDoubleComplex' ), - ('float', 'double', 'PLASMA_Complex32_t', r'\bPLASMA_Complex64_t' ), - ('float', 'double', 'PLASMA_voidComplex32_t', r'\bPLASMA_voidComplex64_t' ), - ('PlasmaRealFloat', 'PlasmaRealDouble', 'PlasmaComplexFloat', r'\bPlasmaComplexDouble' ), - ('float', 'double', 'MORSE_Complex32_t', r'\bMORSE_Complex64_t' ), - ('float', 'double', 'MORSE_voidComplex32_t', r'\bMORSE_voidComplex64_t' ), - ('MorseRealFloat', 'MorseRealDouble', 'MorseComplexFloat', r'\bMorseComplexDouble' ), - ('real', 'double precision', 'complex', r'\bcomplex\*16' ), - ('REAL', 'DOUBLE_PRECISION', 'COMPLEX', r'\bCOMPLEX_16' ), - ('REAL', 'DOUBLE PRECISION', 'COMPLEX', r'\bDOUBLE COMPLEX' ), - ('REAL', 'DOUBLE PRECISION', 'REAL', r'\bDOUBLE PRECISION' ), - ('sizeof_real', 'sizeof_double', 'sizeof_complex', r'\bsizeof_complex_16' ), # before complex - ('float', 'double', 'pastix_complex32_t', r'\bpastix_complex64_t' ), - ('real', 'real', 'complex', r'\bcomplex' ), - ('float', 'double', 'float2', r'\bdouble2' ), - ('float', 'double', 'float', r'\bdouble' ), - ('ipt_s', 'ipt_d', 'ipt_c', 'ipt_z' ), + # C++ + ('', 'float', 'double', 'float _Complex', r'\bdouble _Complex' ), + # CUDA + ('', 'float', 'double', 'cuFloatComplex', r'\bcuDoubleComplex' ), + ('', 'float', 'double', 'make_cuFloatComplex', 'make_cuDoubleComplex' ), + # Magma + ('', 'float', 'double', 'magmaFloatComplex', r'\bmagmaDoubleComplex' ), + # Plasma + ('', 'float', 'double', 'PLASMA_Complex32_t', r'\bPLASMA_Complex64_t' ), + ('', 'float', 'double', 'PLASMA_voidComplex32_t', r'\bPLASMA_voidComplex64_t' ), + ('', 'PlasmaRealFloat', 'PlasmaRealDouble', 'PlasmaComplexFloat', r'\bPlasmaComplexDouble' ), + # MORSE + ('', 'float', 'double', 'MORSE_Complex32_t', r'\bMORSE_Complex64_t' ), + ('', 'float', 'double', 'MORSE_voidComplex32_t', r'\bMORSE_voidComplex64_t' ), + ('', 'MorseRealFloat', 'MorseRealDouble', 'MorseComplexFloat', r'\bMorseComplexDouble' ), + # Pastix + ('int', 'float', 'double', 'pastix_complex32_t', r'\bpastix_complex64_t'), + ('int', 'float', 'double', 'float', r'\bdouble' ), + ('PastixPattern', 'PastixFloat', 'PastixDouble', 'PastixComplex32', r'\bPastixComplex64' ), + ('PastixPattern', 'PastixFloat', 'PastixDouble', 'PastixFloat', r'\bPastixDouble' ), + ('', 'sizeof_real', 'sizeof_double', 'sizeof_complex', r'\bsizeof_complex_16' ), # before complex + ('', 'real', 'real', 'complex', r'\bcomplex' ), + ('', 'float', 'double', 'float2', r'\bdouble2' ), + ('', 'float', 'double', 'float', r'\bdouble' ), + ('', 'float', 'double', 'complex', 'double_complex' ), # ----- Text - ('symmetric', 'symmetric', 'Hermitian', 'Hermitian' ), - ('\*\*T', '\*\*T', '\*\*H', '\*\*H' ), - ('%f', '%lf', '%f', '%lf' ), # for scanf - ('%g', '%lg', '%g', '%lg' ), # for scanf + ('Symmetric', 'Symmetric', 'Symmetric', 'Hermitian', 'Hermitian' ), + ('', '\*\*T', '\*\*T', '\*\*H', '\*\*H' ), + ('', '%f', '%lf', '%f', '%lf' ), # for scanf + ('', '%g', '%lg', '%g', '%lg' ), # for scanf # ----- CBLAS - ('cblas_sasum', 'cblas_dasum', 'cblas_scasum', 'cblas_dzasum' ), - ('cblas_snrm2', 'cblas_dnrm2', 'cblas_scnrm2', 'cblas_dznrm2' ), - ('', '', 'CBLAS_SADDR', 'CBLAS_SADDR' ), - ('cblas_ssyr', 'cblas_dsyr', 'cblas_cher', 'cblas_zher' ), + ('', 'cblas_sasum', 'cblas_dasum', 'cblas_scasum', 'cblas_dzasum' ), + ('', 'cblas_snrm2', 'cblas_dnrm2', 'cblas_scnrm2', 'cblas_dznrm2' ), + ('', '', '', 'CBLAS_SADDR', 'CBLAS_SADDR' ), + ('', 'cblas_ssyr', 'cblas_dsyr', 'cblas_cher', 'cblas_zher' ), + ('', 'cblas_sscal', 'cblas_dscal', 'cblas_csscal', 'cblas_zdscal' ), # ----- Core BLAS - ('CORE_sasum', 'CORE_dasum', 'CORE_scasum', 'CORE_dzasum' ), - ('core_sasum', 'core_dasum', 'core_scasum', 'core_dzasum' ), - ('CORE_ssyrfb', 'CORE_dsyrfb', 'CORE_cherfb', 'CORE_zherfb' ), - ('core_ssyrfb', 'core_dsyrfb', 'core_cherfb', 'core_zherfb' ), - ('CORE_stsmlq_sy', 'CORE_dtsmlq_sy', 'CORE_ctsmlq_he', 'CORE_ztsmlq_he' ), - ('core_stsmlq_sy', 'core_dtsmlq_sy', 'core_ctsmlq_he', 'core_ztsmlq_he' ), - ('CORE_stsmqr_sy', 'CORE_dtsmqr_sy', 'CORE_ctsmqr_he', 'CORE_ztsmqr_he' ), - ('core_stsmqr_sy', 'core_dtsmqr_sy', 'core_ctsmqr_he', 'core_ztsmqr_he' ), + ('', 'CORE_sasum', 'CORE_dasum', 'CORE_scasum', 'CORE_dzasum' ), + ('', 'core_sasum', 'core_dasum', 'core_scasum', 'core_dzasum' ), + ('', 'CORE_ssyrfb', 'CORE_dsyrfb', 'CORE_cherfb', 'CORE_zherfb' ), + ('', 'core_ssyrfb', 'core_dsyrfb', 'core_cherfb', 'core_zherfb' ), + ('', 'CORE_stsmlq_sy', 'CORE_dtsmlq_sy', 'CORE_ctsmlq_he', 'CORE_ztsmlq_he' ), + ('', 'core_stsmlq_sy', 'core_dtsmlq_sy', 'core_ctsmlq_he', 'core_ztsmlq_he' ), + ('', 'CORE_stsmqr_sy', 'CORE_dtsmqr_sy', 'CORE_ctsmqr_he', 'CORE_ztsmqr_he' ), + ('', 'core_stsmqr_sy', 'core_dtsmqr_sy', 'core_ctsmqr_he', 'core_ztsmqr_he' ), # ----- Prefixes # Changing prefixes first requires some calls to be fixed without precision, # e.g., her2k -> syr2k instead of zher2k -> ssyr2k. # See BLAS and LAPACK without precision, below. - ('blasf77_s', 'blasf77_d', 'blasf77_c', 'blasf77_z' ), - ('blasf77_s', 'blasf77_d', 'blasf77_s', 'blasf77_d' ), - ('BLAS_S', 'BLAS_D', 'BLAS_C', 'BLAS_Z' ), - ('BLAS_s', 'BLAS_d', 'BLAS_c', 'BLAS_z' ), - ('BLAS_s', 'BLAS_d', 'BLAS_s', 'BLAS_d' ), - ('blas_is', 'blas_id', 'blas_ic', 'blas_iz' ), - ('blas_s', 'blas_d', 'blas_c', 'blas_z' ), - ('cl_ps', 'cl_pd', 'cl_pc', 'cl_pz' ), - ('cl_s', 'cl_d', 'cl_c', 'cl_z' ), - ('cl_s', 'cl_d', 'cl_sc', 'cl_dz' ), - ('CODELETS_S', 'CODELETS_D', 'CODELETS_C', 'CODELETS_Z' ), - ('codelet_s', 'codelet_d', 'codelet_c', 'codelet_z' ), - ('compute_s', 'compute_d', 'compute_c', 'compute_z' ), - ('control_s', 'control_d', 'control_c', 'control_z' ), - ('coreblas_s', 'coreblas_d', 'coreblas_c', 'coreblas_z' ), - ('CORE_S', 'CORE_D', 'CORE_C', 'CORE_Z' ), - ('CORE_s', 'CORE_d', 'CORE_c', 'CORE_z' ), - ('core_s', 'core_d', 'core_c', 'core_z' ), - ('CORE_s', 'CORE_d', 'CORE_s', 'CORE_d' ), - ('cpu_gpu_s', 'cpu_gpu_d', 'cpu_gpu_c', 'cpu_gpu_z' ), - ('cublasS', 'cublasD', 'cublasC', 'cublasZ' ), - ('CUDA_S', 'CUDA_D', 'CUDA_C', 'CUDA_Z' ), - ('CUDA_s', 'CUDA_d', 'CUDA_c', 'CUDA_z' ), - ('example_s', 'example_d', 'example_c', 'example_z' ), - ('ipt_s', 'ipt_d', 'ipt_c', 'ipt_z' ), - ('LAPACKE_s', 'LAPACKE_d', 'LAPACKE_c', 'LAPACKE_z' ), - ('lapackf77_s', 'lapackf77_d', 'lapackf77_c', 'lapackf77_z' ), - ('lapackf77_s', 'lapackf77_d', 'lapackf77_s', 'lapackf77_d' ), - ('lapack_s', 'lapack_d', 'lapack_c', 'lapack_z' ), - ('lapack_s', 'lapack_d', 'lapack_s', 'lapack_d' ), - ('MAGMABLAS_S', 'MAGMABLAS_D', 'MAGMABLAS_C', 'MAGMABLAS_Z' ), - ('magmablas_s', 'magmablas_d', 'magmablas_c', 'magmablas_z' ), - ('magmaf_s', 'magmaf_d', 'magmaf_c', 'magmaf_z' ), - ('magma_get_s', 'magma_get_d', 'magma_get_c', 'magma_get_z' ), - ('magma_ps', 'magma_pd', 'magma_pc', 'magma_pz' ), - ('MAGMA_S', 'MAGMA_D', 'MAGMA_C', 'MAGMA_Z' ), - ('MAGMA_s', 'MAGMA_d', 'MAGMA_c', 'MAGMA_z' ), - ('magma_s', 'magma_d', 'magma_c', 'magma_z' ), - ('QUARK_S', 'QUARK_D', 'QUARK_C', 'QUARK_Z' ), - ('QUARK_s', 'QUARK_d', 'QUARK_c', 'QUARK_z' ), - ('quark_s', 'quark_d', 'quark_c', 'quark_z' ), - ('QUARK_s', 'QUARK_d', 'QUARK_s', 'QUARK_d' ), - ('plasma_ps', 'plasma_pd', 'plasma_pc', 'plasma_pz' ), - ('PLASMA_S', 'PLASMA_D', 'PLASMA_C', 'PLASMA_Z' ), - ('PLASMA_sor', 'PLASMA_dor', 'PLASMA_cun', 'PLASMA_zun' ), - ('PLASMA_s', 'PLASMA_d', 'PLASMA_c', 'PLASMA_z' ), - ('plasma_s', 'plasma_d', 'plasma_c', 'plasma_z' ), - ('PROFILE_S', 'PROFILE_D', 'PROFILE_C', 'PROFILE_Z' ), - ('profile_s', 'profile_d', 'profile_c', 'profile_z' ), - ('SCHED_s', 'SCHED_d', 'SCHED_c', 'SCHED_z' ), - ('starpu_s', 'starpu_d', 'starpu_c', 'starpu_z' ), - ('testing_ds', 'testing_ds', 'testing_zc', 'testing_zc' ), - ('TESTING_S', 'TESTING_D', 'TESTING_C', 'TESTING_Z' ), - ('testing_s', 'testing_d', 'testing_c', 'testing_z' ), - ('time_s', 'time_d', 'time_c', 'time_z' ), - ('WRAPPER_S', 'WRAPPER_D', 'WRAPPER_C', 'WRAPPER_Z' ), - ('wrapper_s', 'wrapper_d', 'wrapper_c', 'wrapper_z' ), - ('Workspace_s', 'Workspace_d', 'Workspace_c', 'Workspace_z' ), - ('workspace_s', 'workspace_d', 'workspace_c', 'workspace_z' ), - - ('csc_s', 'csc_d', 'csc_c', 'csc_z' ), - ('sequential_s', 'sequential_d', 'sequential_c', 'sequential_z' ), - ('coeftab_s', 'coeftab_d', 'coeftab_c', 'coeftab_z' ), + ('', 'blasf77_s', 'blasf77_d', 'blasf77_c', 'blasf77_z' ), + ('', 'blasf77_s', 'blasf77_d', 'blasf77_s', 'blasf77_d' ), + ('', 'BLAS_S', 'BLAS_D', 'BLAS_C', 'BLAS_Z' ), + ('', 'BLAS_s', 'BLAS_d', 'BLAS_c', 'BLAS_z' ), + ('', 'BLAS_s', 'BLAS_d', 'BLAS_s', 'BLAS_d' ), + ('', 'blas_is', 'blas_id', 'blas_ic', 'blas_iz' ), + ('', 'blas_s', 'blas_d', 'blas_c', 'blas_z' ), + ('', 'cl_ps', 'cl_pd', 'cl_pc', 'cl_pz' ), + ('', 'cl_s', 'cl_d', 'cl_c', 'cl_z' ), + ('', 'cl_s', 'cl_d', 'cl_sc', 'cl_dz' ), + ('', 'CODELETS_S', 'CODELETS_D', 'CODELETS_C', 'CODELETS_Z' ), + ('', 'codelet_s', 'codelet_d', 'codelet_c', 'codelet_z' ), + ('', 'compute_s', 'compute_d', 'compute_c', 'compute_z' ), + ('', 'control_s', 'control_d', 'control_c', 'control_z' ), + ('', 'coreblas_s', 'coreblas_d', 'coreblas_c', 'coreblas_z' ), + ('', 'CORE_S', 'CORE_D', 'CORE_C', 'CORE_Z' ), + ('', 'CORE_s', 'CORE_d', 'CORE_c', 'CORE_z' ), + ('', 'core_s', 'core_d', 'core_c', 'core_z' ), + ('', 'CORE_s', 'CORE_d', 'CORE_s', 'CORE_d' ), + ('', 'cpu_gpu_s', 'cpu_gpu_d', 'cpu_gpu_c', 'cpu_gpu_z' ), + ('', 'cublasS', 'cublasD', 'cublasC', 'cublasZ' ), + ('', 'CUDA_S', 'CUDA_D', 'CUDA_C', 'CUDA_Z' ), + ('', 'CUDA_s', 'CUDA_d', 'CUDA_c', 'CUDA_z' ), + ('', 'example_s', 'example_d', 'example_c', 'example_z' ), + ('', 'ipt_s', 'ipt_d', 'ipt_c', 'ipt_z' ), + ('', 'LAPACKE_s', 'LAPACKE_d', 'LAPACKE_c', 'LAPACKE_z' ), + ('', 'lapackf77_s', 'lapackf77_d', 'lapackf77_c', 'lapackf77_z' ), + ('', 'lapackf77_s', 'lapackf77_d', 'lapackf77_s', 'lapackf77_d' ), + ('', 'lapack_s', 'lapack_d', 'lapack_c', 'lapack_z' ), + ('', 'lapack_s', 'lapack_d', 'lapack_s', 'lapack_d' ), + ('', 'MAGMABLAS_S', 'MAGMABLAS_D', 'MAGMABLAS_C', 'MAGMABLAS_Z' ), + ('', 'magmablas_s', 'magmablas_d', 'magmablas_c', 'magmablas_z' ), + ('', 'magmaf_s', 'magmaf_d', 'magmaf_c', 'magmaf_z' ), + ('', 'magma_get_s', 'magma_get_d', 'magma_get_c', 'magma_get_z' ), + ('', 'magma_ps', 'magma_pd', 'magma_pc', 'magma_pz' ), + ('', 'MAGMA_S', 'MAGMA_D', 'MAGMA_C', 'MAGMA_Z' ), + ('', 'MAGMA_s', 'MAGMA_d', 'MAGMA_c', 'MAGMA_z' ), + ('', 'magma_s', 'magma_d', 'magma_c', 'magma_z' ), + ('', 'QUARK_S', 'QUARK_D', 'QUARK_C', 'QUARK_Z' ), + ('', 'QUARK_s', 'QUARK_d', 'QUARK_c', 'QUARK_z' ), + ('', 'quark_s', 'quark_d', 'quark_c', 'quark_z' ), + ('', 'QUARK_s', 'QUARK_d', 'QUARK_s', 'QUARK_d' ), + ('', 'plasma_ps', 'plasma_pd', 'plasma_pc', 'plasma_pz' ), + ('', 'PLASMA_S', 'PLASMA_D', 'PLASMA_C', 'PLASMA_Z' ), + ('', 'PLASMA_sor', 'PLASMA_dor', 'PLASMA_cun', 'PLASMA_zun' ), + ('', 'PLASMA_s', 'PLASMA_d', 'PLASMA_c', 'PLASMA_z' ), + ('', 'plasma_s', 'plasma_d', 'plasma_c', 'plasma_z' ), + ('', 'PROFILE_S', 'PROFILE_D', 'PROFILE_C', 'PROFILE_Z' ), + ('', 'profile_s', 'profile_d', 'profile_c', 'profile_z' ), + ('', 'SCHED_s', 'SCHED_d', 'SCHED_c', 'SCHED_z' ), + ('', 'starpu_s', 'starpu_d', 'starpu_c', 'starpu_z' ), + ('', 'testing_ds', 'testing_ds', 'testing_zc', 'testing_zc' ), + ('', 'TESTING_S', 'TESTING_D', 'TESTING_C', 'TESTING_Z' ), + ('', 'testing_s', 'testing_d', 'testing_c', 'testing_z' ), + ('', 'time_s', 'time_d', 'time_c', 'time_z' ), + ('', 'WRAPPER_S', 'WRAPPER_D', 'WRAPPER_C', 'WRAPPER_Z' ), + ('', 'wrapper_s', 'wrapper_d', 'wrapper_c', 'wrapper_z' ), + ('', 'Workspace_s', 'Workspace_d', 'Workspace_c', 'Workspace_z' ), + ('', 'workspace_s', 'workspace_d', 'workspace_c', 'workspace_z' ), # ----- Prefixes MORSE - ('MORSE_S', 'MORSE_D', 'MORSE_C', 'MORSE_Z' ), - ('MORSE_sor', 'MORSE_dor', 'MORSE_cun', 'MORSE_zun' ), - ('MORSE_s', 'MORSE_d', 'MORSE_c', 'MORSE_z' ), - ('morse_get_s', 'morse_get_d', 'morse_get_c', 'morse_get_z' ), - ('morse_ps', 'morse_pd', 'morse_pc', 'morse_pz' ), - ('morse_s', 'morse_d', 'morse_c', 'morse_z' ), - ('morse_sdesc', 'morse_ddesc', 'morse_sdesc', 'morse_ddesc' ), - ('TASK_sasum', 'TASK_dasum', 'TASK_scasum', 'TASK_dzasum' ), - ('TASK_ssyrfb', 'TASK_dsyrfb', 'TASK_cherfb', 'TASK_zherfb' ), - ('TASK_stsmlq_sy', 'TASK_dtsmlq_sy', 'TASK_ctsmlq_he', 'TASK_ztsmlq_he' ), - ('TASK_stsmqr_sy', 'TASK_dtsmqr_sy', 'TASK_ctsmqr_he', 'TASK_ztsmqr_he' ), - ('TASK_sor', 'TASK_dor', 'TASK_cun', 'TASK_zun' ), - ('TASK_s', 'TASK_d', 'TASK_c', 'TASK_z' ), - ('TASK_slan', 'TASK_dlan', 'TASK_slan', 'TASK_dlan' ), - ('RUNTIME_S', 'RUNTIME_D', 'RUNTIME_C', 'RUNTIME_Z' ), - ('RUNTIME_s', 'RUNTIME_d', 'RUNTIME_c', 'RUNTIME_z' ), - - ('TASK_s', 'TASK_d', 'TASK_s', 'TASK_d' ), - ('dataflush', 'dataflush', 'dataflush', 'sataflush' ), # Correct previous line + ('', 'MORSE_S', 'MORSE_D', 'MORSE_C', 'MORSE_Z' ), + ('', 'MORSE_sor', 'MORSE_dor', 'MORSE_cun', 'MORSE_zun' ), + ('', 'MORSE_s', 'MORSE_d', 'MORSE_c', 'MORSE_z' ), + ('', 'morse_get_s', 'morse_get_d', 'morse_get_c', 'morse_get_z' ), + ('', 'morse_ps', 'morse_pd', 'morse_pc', 'morse_pz' ), + ('', 'morse_s', 'morse_d', 'morse_c', 'morse_z' ), + ('', 'morse_sdesc', 'morse_ddesc', 'morse_sdesc', 'morse_ddesc' ), + ('', 'TASK_sasum', 'TASK_dasum', 'TASK_scasum', 'TASK_dzasum' ), + ('', 'TASK_ssyrfb', 'TASK_dsyrfb', 'TASK_cherfb', 'TASK_zherfb' ), + ('', 'TASK_stsmlq_sy', 'TASK_dtsmlq_sy', 'TASK_ctsmlq_he', 'TASK_ztsmlq_he' ), + ('', 'TASK_stsmqr_sy', 'TASK_dtsmqr_sy', 'TASK_ctsmqr_he', 'TASK_ztsmqr_he' ), + ('', 'TASK_sor', 'TASK_dor', 'TASK_cun', 'TASK_zun' ), + ('', 'TASK_s', 'TASK_d', 'TASK_c', 'TASK_z' ), + ('', 'TASKS_s', 'TASKS_d', 'TASKS_c', 'TASKS_z' ), + ('', 'tasks_s', 'tasks_d', 'tasks_c', 'tasks_z' ), + ('', 'TASK_slan', 'TASK_dlan', 'TASK_slan', 'TASK_dlan' ), + ('', 'RUNTIME_S', 'RUNTIME_D', 'RUNTIME_C', 'RUNTIME_Z' ), + ('', 'RUNTIME_s', 'RUNTIME_d', 'RUNTIME_c', 'RUNTIME_z' ), + + ('', 'TASK_s', 'TASK_d', 'TASK_s', 'TASK_d' ), + ('', 'dataflush', 'dataflush', 'dataflush', 'sataflush' ), # Correct previous line + + # ----- Prefixes PaStiX + ('p_spm', 's_spm', 'd_spm', 'c_spm', 'z_spm' ), + ('p_bcsc', 's_bcsc', 'd_bcsc', 'c_bcsc', 'z_bcsc' ), + ('', 'csc_s', 'csc_d', 'csc_c', 'csc_z' ), + ('', 'sequential_s', 'sequential_d', 'sequential_c', 'sequential_z' ), + ('', 'coeftab_s', 'coeftab_d', 'coeftab_c', 'coeftab_z' ), + ('', 'cblk_s', 'cblk_d', 'cblk_c', 'cblk_z' ), + ('', 'thread_s', 'thread_d', 'thread_c', 'thread_z' ), + ('', 'thread_ps', 'thread_pd', 'thread_pc', 'thread_pz' ), # ----- Complex numbers # \b regexp here avoids conjugate -> conjfugate, # assuming we always translate from z, not to z. - ('', '', 'conjf', 'conj\b' ), - ('fabsf', 'fabs', 'cabsf', 'cabs' ), - ('', '', 'cuCrealf', 'cuCreal' ), - ('', '', 'cuCimagf', 'cuCimag' ), - ('', '', 'cuConjf', 'cuConj' ), - ('fabsf', 'fabs', 'cuCabsf', 'cuCabs' ), - ('', '', 'crealf', 'creal' ), - ('sqrtf', 'sqrt', 'csqrtf', 'csqrt' ), + ('', '', '', 'conjf', r'conj\b' ), + ('', 'fabsf', 'fabs', 'cabsf', 'cabs' ), + ('', '', '', 'cuCrealf', 'cuCreal' ), + ('', '', '', 'cuCimagf', 'cuCimag' ), + ('', '', '', 'cuConjf', 'cuConj' ), + ('', 'fabsf', 'fabs', 'cuCabsf', 'cuCabs' ), + ('', '', '', 'crealf', 'creal' ), + ('', 'sqrtf', 'sqrt', 'csqrtf', 'csqrt' ), # ----- CUDA - ('cublasIsamax', 'cublasIdamax', 'cublasIcamax', 'cublasIzamax' ), - ('cublasIsamax', 'cublasIdamax', 'cublasIsamax', 'cublasIdamax' ), - ('cublasSnrm2', 'cublasDnrm2', 'cublasScnrm2', 'cublasDznrm2' ), + ('', 'cublasIsamax', 'cublasIdamax', 'cublasIcamax', 'cublasIzamax' ), + ('', 'cublasIsamax', 'cublasIdamax', 'cublasIsamax', 'cublasIdamax' ), + ('', 'cublasSnrm2', 'cublasDnrm2', 'cublasScnrm2', 'cublasDznrm2' ), # ----- PLASMA / MAGMA / MORSE - ('bsy2trc', 'bsy2trc', 'bhe2trc', 'bhe2trc' ), - ('magma_ssqrt', 'magma_dsqrt', 'magma_ssqrt', 'magma_dsqrt' ), - ('morse_ssqrt', 'morse_dsqrt', 'morse_ssqrt', 'morse_dsqrt' ), - ('SAUXILIARY', 'DAUXILIARY', 'CAUXILIARY', 'ZAUXILIARY' ), - ('sauxiliary', 'dauxiliary', 'cauxiliary', 'zauxiliary' ), - ('sbcyclic', 'dbcyclic', 'cbcyclic', 'zbcyclic' ), - ('sbulge', 'dbulge', 'cbulge', 'zbulge' ), - ('SCODELETS', 'DCODELETS', 'CCODELETS', 'ZCODELETS' ), - ('sgetmatrix', 'dgetmatrix', 'cgetmatrix', 'zgetmatrix' ), - ('sinplace', 'dinplace', 'cinplace', 'zinplace' ), - ('slocality', 'dlocality', 'clocality', 'zlocality' ), - ('slapack', 'dlapack', 'clapack', 'zlapack' ), - ('SLAPACK', 'DLAPACK', 'CLAPACK', 'ZLAPACK' ), - ('smalloc', 'dmalloc', 'cmalloc', 'zmalloc' ), - ('smalloc', 'dmalloc', 'smalloc', 'dmalloc' ), - ('spanel_to_q', 'dpanel_to_q', 'cpanel_to_q', 'zpanel_to_q' ), - ('spermute', 'dpermute', 'cpermute', 'zpermute' ), - ('sprint', 'dprint', 'cprint', 'zprint' ), - ('sprint', 'dprint', 'sprint', 'dprint' ), - ('sprofiling', 'dprofiling', 'cprofiling', 'zprofiling' ), - ('sq_to_panel', 'dq_to_panel', 'cq_to_panel', 'zq_to_panel' ), - ('sset', 'dset', 'cset', 'zset' ), - ('ssetmatrix', 'dsetmatrix', 'csetmatrix', 'zsetmatrix' ), - ('SSIZE', 'DSIZE', 'CSIZE', 'ZSIZE' ), - ('ssplit', 'dsplit', 'csplit', 'zsplit' ), - ('stile', 'dtile', 'ctile', 'ztile' ), - ('STILE', 'DTILE', 'CTILE', 'ZTILE' ), - ('stranspose', 'dtranspose', 'ctranspose', 'ztranspose' ), - ('szero', 'dzero', 'czero', 'zzero' ), - ('sy2sb', 'sy2sb', 'he2hb', 'he2hb' ), + ('', 'bsy2trc', 'bsy2trc', 'bhe2trc', 'bhe2trc' ), + ('', 'magma_ssqrt', 'magma_dsqrt', 'magma_ssqrt', 'magma_dsqrt' ), + ('', 'morse_ssqrt', 'morse_dsqrt', 'morse_ssqrt', 'morse_dsqrt' ), + ('', 'SAUXILIARY', 'DAUXILIARY', 'CAUXILIARY', 'ZAUXILIARY' ), + ('', 'sauxiliary', 'dauxiliary', 'cauxiliary', 'zauxiliary' ), + ('', 'sbcyclic', 'dbcyclic', 'cbcyclic', 'zbcyclic' ), + ('', 'sbulge', 'dbulge', 'cbulge', 'zbulge' ), + ('', 'SCODELETS', 'DCODELETS', 'CCODELETS', 'ZCODELETS' ), + ('', 'sgetmatrix', 'dgetmatrix', 'cgetmatrix', 'zgetmatrix' ), + ('', 'sinplace', 'dinplace', 'cinplace', 'zinplace' ), + ('', 'slocality', 'dlocality', 'clocality', 'zlocality' ), + ('', 'slapack', 'dlapack', 'clapack', 'zlapack' ), + ('', 'SLAPACK', 'DLAPACK', 'CLAPACK', 'ZLAPACK' ), + ('', 'smalloc', 'dmalloc', 'cmalloc', 'zmalloc' ), + ('', 'smalloc', 'dmalloc', 'smalloc', 'dmalloc' ), + ('', 'spanel_to_q', 'dpanel_to_q', 'cpanel_to_q', 'zpanel_to_q' ), + ('', 'spermute', 'dpermute', 'cpermute', 'zpermute' ), + ('', 'sprint', 'dprint', 'cprint', 'zprint' ), + ('', 'sprint', 'dprint', 'sprint', 'dprint' ), + ('', 'sprofiling', 'dprofiling', 'cprofiling', 'zprofiling' ), + ('', 'sq_to_panel', 'dq_to_panel', 'cq_to_panel', 'zq_to_panel' ), + ('', 'sset', 'dset', 'cset', 'zset' ), + ('', 'ssetmatrix', 'dsetmatrix', 'csetmatrix', 'zsetmatrix' ), + ('', 'SSIZE', 'DSIZE', 'CSIZE', 'ZSIZE' ), + ('', 'ssplit', 'dsplit', 'csplit', 'zsplit' ), + ('', 'stile', 'dtile', 'ctile', 'ztile' ), + ('', 'STILE', 'DTILE', 'CTILE', 'ZTILE' ), + ('', 'stranspose', 'dtranspose', 'ctranspose', 'ztranspose' ), + ('', 'szero', 'dzero', 'czero', 'zzero' ), + ('', 'sy2sb', 'sy2sb', 'he2hb', 'he2hb' ), # ----- Constants - ('CblasTrans', 'CblasTrans', 'CblasConjTrans', 'CblasConjTrans' ), - ('MagmaTrans', 'MagmaTrans', 'MagmaConjTrans', 'MagmaConjTrans' ), - ('MorseTrans', 'MorseTrans', 'MorseConjTrans', 'MorseConjTrans' ), - ('PlasmaTrans', 'PlasmaTrans', 'PlasmaConjTrans','PlasmaConjTrans' ), - ('symmetric', 'symmetric', 'Hermitian', 'Hermitian' ), + ('CblasTrans', 'CblasTrans', 'CblasTrans', 'CblasConjTrans', r'\bCblasConjTrans' ), + ('MagmaTrans', 'MagmaTrans', 'MagmaTrans', 'MagmaConjTrans', r'\bMagmaConjTrans' ), + ('MorseTrans', 'MorseTrans', 'MorseTrans', 'MorseConjTrans', r'\bMorseConjTrans' ), + ('PlasmaTrans', 'PlasmaTrans', 'PlasmaTrans', 'PlasmaConjTrans', r'\bPlasmaConjTrans' ), + ('PastixTrans', 'PastixTrans', 'PastixTrans', 'PastixConjTrans', r'\bPastixConjTrans' ), # ----- BLAS and LAPACK, lowercase, alphabetic order # copy & paste these to uppercase below and fix case. # used for filenames lacking magma_z, etc. prefix - ('isamax', 'idamax', 'icamax', 'izamax' ), - ('isamax', 'idamax', 'isamax', 'idamax' ), - ('saxpy', 'daxpy', 'caxpy', 'zaxpy' ), - ('scopy', 'dcopy', 'ccopy', 'zcopy' ), - ('sgeadd', 'dgeadd', 'cgeadd', 'zgeadd' ), - ('sgecfi', 'dgecfi', 'cgecfi', 'zgecfi' ), - ('sgemdm', 'dgemdm', 'cgemdm', 'zgemdm' ), - ('sgemm', 'dgemm', 'cgemm', 'zgemm' ), - ('sgemv', 'dgemv', 'cgemv', 'zgemv' ), - ('sscal', 'dscal', 'cscal', 'zscal' ), - ('sscal', 'dscal', 'csscal', 'zdscal' ), - ('sscal', 'dscal', 'sscal', 'dscal' ), # zdscal -> csscal - ('sswap', 'dswap', 'cswap', 'zswap' ), - ('ssymm', 'dsymm', 'csymm', 'zsymm' ), - ('ssymv', 'dsymv', 'csymv', 'zsymv' ), - ('ssyr2k', 'dsyr2k', 'csyr2k', 'zsyr2k' ), - ('ssyrk', 'dsyrk', 'csyrk', 'zsyrk' ), - ('stradd', 'dtradd', 'ctradd', 'ztradd' ), - ('strmm', 'dtrmm', 'ctrmm', 'ztrmm' ), - ('strmv', 'dtrmv', 'ctrmv', 'ztrmv' ), - ('strsm', 'dtrsm', 'ctrsm', 'ztrsm' ), - ('strsv', 'dtrsv', 'ctrsv', 'ztrsv' ), + ('', 'isamax', 'idamax', 'icamax', 'izamax' ), + ('', 'isamax', 'idamax', 'isamax', 'idamax' ), + ('', 'saxpy', 'daxpy', 'caxpy', 'zaxpy' ), + ('', 'scopy', 'dcopy', 'ccopy', 'zcopy' ), + ('', 'sdiag', 'ddiag', 'cdiag', 'zdiag' ), + ('', 'sgeadd', 'dgeadd', 'cgeadd', 'zgeadd' ), + ('', 'sgecfi', 'dgecfi', 'cgecfi', 'zgecfi' ), + ('', 'sgemdm', 'dgemdm', 'cgemdm', 'zgemdm' ), + ('', 'sgemm', 'dgemm', 'cgemm', 'zgemm' ), + ('', 'sgemv', 'dgemv', 'cgemv', 'zgemv' ), + ('', 'sscal', 'dscal', 'cscal', 'zscal' ), + ('', 'sscal', 'dscal', 'csscal', 'zdscal' ), + ('', 'sscal', 'dscal', 'sscal', 'dscal' ), # zdscal -> csscal + ('', 'slascal', 'dlascal', 'clascal', 'zlascal' ), + ('', 'slascal', 'dlascal', 'slascal', 'dlascal' ), + ('', 'sswap', 'dswap', 'cswap', 'zswap' ), + ('', 'ssymm', 'dsymm', 'csymm', 'zsymm' ), + ('', 'ssymv', 'dsymv', 'csymv', 'zsymv' ), + ('', 'ssyr2k', 'dsyr2k', 'csyr2k', 'zsyr2k' ), + ('', 'ssyrk', 'dsyrk', 'csyrk', 'zsyrk' ), + ('', 'stradd', 'dtradd', 'ctradd', 'ztradd' ), + ('', 'strmm', 'dtrmm', 'ctrmm', 'ztrmm' ), + ('', 'strmv', 'dtrmv', 'ctrmv', 'ztrmv' ), + ('', 'strsm', 'dtrsm', 'ctrsm', 'ztrsm' ), + ('', 'strsv', 'dtrsv', 'ctrsv', 'ztrsv' ), # ADD FOR NEW VERSION OF CHAMELEON - ('shbcpy', 'dhbcpy', 'chbcpy', 'zhbcpy' ), - ('ssyrbt', 'dsyrbt', 'cherbt', 'zherbt' ), - ('ssygv', 'dsygv', 'chegv', 'zhegv' ), + ('', 'shbcpy', 'dhbcpy', 'chbcpy', 'zhbcpy' ), + ('', 'ssyrbt', 'dsyrbt', 'cherbt', 'zherbt' ), + ('', 'ssygv', 'dsygv', 'chegv', 'zhegv' ), # END ADD # LAPACK - ('sbarrier', 'dbarrier', 'cbarrier', 'zbarrier' ), - ('sbdsqr', 'dbdsqr', 'cbdsqr', 'zbdsqr' ), - ('sbdt01', 'dbdt01', 'cbdt01', 'zbdt01' ), - ('scheck', 'dcheck', 'ccheck', 'zcheck' ), - ('sgebak', 'dgebak', 'cgebak', 'zgebak' ), - ('sgebal', 'dgebal', 'cgebal', 'zgebal' ), - ('sgebd2', 'dgebd2', 'cgebd2', 'zgebd2' ), - ('sgebrd', 'dgebrd', 'cgebrd', 'zgebrd' ), - ('sgeev', 'dgeev', 'cgeev', 'zgeev' ), - ('sgehd2', 'dgehd2', 'cgehd2', 'zgehd2' ), - ('sgehrd', 'dgehrd', 'cgehrd', 'zgehrd' ), - ('sgelq2', 'dgelq2', 'cgelq2', 'zgelq2' ), - ('sgelqf', 'dgelqf', 'cgelqf', 'zgelqf' ), - ('sgelqs', 'dgelqs', 'cgelqs', 'zgelqs' ), - ('sgelqt', 'dgelqt', 'cgelqt', 'zgelqt' ), - ('sgels', 'dgels', 'cgels', 'zgels' ), - ('sgeqlf', 'dgeqlf', 'cgeqlf', 'zgeqlf' ), - ('sgeqp3', 'dgeqp3', 'cgeqp3', 'zgeqp3' ), - ('sgeqr2', 'dgeqr2', 'cgeqr2', 'zgeqr2' ), - ('sgeqrf', 'dgeqrf', 'cgeqrf', 'zgeqrf' ), - ('sgeqrs', 'dgeqrs', 'cgeqrs', 'zgeqrs' ), - ('sgeqrt', 'dgeqrt', 'cgeqrt', 'zgeqrt' ), - ('sgessm', 'dgessm', 'cgessm', 'zgessm' ), - ('sgessq', 'dgessq', 'cgessq', 'zgessq' ), - ('sgesv', 'dgesv', 'cgesv', 'zgesv' ), - ('sgesvd', 'dgesvd', 'cgesvd', 'zgesvd' ), - ('sgesv', 'sgesv', 'cgesv', 'cgesv' ), - ('sget22', 'dget22', 'cget22', 'zget22' ), - ('sgetf2', 'dgetf2', 'cgetf2', 'zgetf2' ), - ('sgetmi', 'dgetmi', 'cgetmi', 'zgetmi' ), - ('sgetmo', 'dgetmo', 'cgetmo', 'zgetmo' ), - ('sgetrf', 'dgetrf', 'cgetrf', 'zgetrf' ), - ('sgetri', 'dgetri', 'cgetri', 'zgetri' ), - ('sgetrl', 'dgetrl', 'cgetrl', 'zgetrl' ), - ('sgetrs', 'dgetrs', 'cgetrs', 'zgetrs' ), - ('shseqr', 'dhseqr', 'chseqr', 'zhseqr' ), - ('shst01', 'dhst01', 'chst01', 'zhst01' ), - ('slabad', 'dlabad', 'slabad', 'dlabad' ), - ('slabrd', 'dlabrd', 'clabrd', 'zlabrd' ), - ('slacgv', 'dlacgv', 'clacgv', 'zlacgv' ), - ('slacpy', 'dlacpy', 'clacpy', 'zlacpy' ), - ('slaed', 'dlaed', 'slaed', 'dlaed' ), - ('slaex', 'dlaex', 'slaex', 'dlaex' ), - ('slagsy', 'dlagsy', 'clagsy', 'zlagsy' ), - ('slahr', 'dlahr', 'clahr', 'zlahr' ), - ('slamc3', 'dlamc3', 'slamc3', 'dlamc3' ), - ('slamch', 'dlamch', 'slamch', 'dlamch' ), - ('slamrg', 'dlamrg', 'slamrg', 'dlamrg' ), - ('slange', 'dlange', 'clange', 'zlange' ), - ('slanst', 'dlanst', 'clanht', 'zlanht' ), - ('slansy', 'dlansy', 'clansy', 'zlansy' ), - ('slantr', 'dlantr', 'clantr', 'zlantr' ), - ('slaqps', 'dlaqps', 'claqps', 'zlaqps' ), - ('slaqp2', 'dlaqp2', 'claqp2', 'zlaqp2' ), - ('slarfb', 'dlarfb', 'clarfb', 'zlarfb' ), - ('slarfg', 'dlarfg', 'clarfg', 'zlarfg' ), - ('slarft', 'dlarft', 'clarft', 'zlarft' ), - ('slarfx', 'dlarfx', 'clarfx', 'zlarfx' ), - ('slarfy', 'dlarfy', 'clarfy', 'zlarfy' ), - ('slarnv', 'dlarnv', 'clarnv', 'zlarnv' ), - ('slarnv', 'dlarnv', 'slarnv', 'dlarnv' ), - ('slartg', 'dlartg', 'clartg', 'zlartg' ), - ('slascl', 'dlascl', 'clascl', 'zlascl' ), - ('slaset', 'dlaset', 'claset', 'zlaset' ), - ('slaswp', 'dlaswp', 'claswp', 'zlaswp' ), - ('slatro', 'dlatro', 'clatro', 'zlatro' ), - ('slatrd', 'dlatrd', 'clatrd', 'zlatrd' ), - ('slauum', 'dlauum', 'clauum', 'zlauum' ), - ('spack', 'dpack', 'cpack', 'zpack' ), - ('splgsy', 'dplgsy', 'cplgsy', 'zplgsy' ), - ('splrnt', 'dplrnt', 'cplrnt', 'zplrnt' ), - ('splssq', 'dplssq', 'cplssq', 'zplssq' ), - ('sposv', 'dposv', 'cposv', 'zposv' ), - ('ssysv', 'dsysv', 'csysv', 'zsysv' ), - ('sposv', 'sposv', 'cposv', 'cposv' ), - ('spotrf', 'dpotrf', 'cpotrf', 'zpotrf' ), - ('ssytrf', 'dsytrf', 'csytrf', 'zsytrf' ), - ('spotri', 'dpotri', 'cpotri', 'zpotri' ), - ('spotrs', 'dpotrs', 'cpotrs', 'zpotrs' ), - ('ssytrs', 'dsytrs', 'csytrs', 'zsytrs' ), - ('sqpt01', 'dqpt01', 'cqpt01', 'zqpt01' ), - ('sqrt02', 'dqrt02', 'cqrt02', 'zqrt02' ), - ('sshift', 'dshift', 'cshift', 'zshift' ), - ('sssssm', 'dssssm', 'cssssm', 'zssssm' ), - ('sstebz', 'dstebz', 'sstebz', 'dstebz' ), - ('sstedc', 'dstedc', 'cstedc', 'zstedc' ), - ('sstedx', 'dstedx', 'cstedx', 'zstedx' ), - ('sstedx', 'dstedx', 'sstedx', 'dstedx' ), - ('sstein', 'dstein', 'cstein', 'zstein' ), - ('sstemr', 'dstemr', 'cstemr', 'zstemr' ), - ('ssteqr', 'dsteqr', 'csteqr', 'zsteqr' ), - ('ssterf', 'dsterf', 'ssterf', 'dsterf' ), - ('ssterm', 'dsterm', 'csterm', 'zsterm' ), - ('sstt21', 'dstt21', 'cstt21', 'zstt21' ), - ('strasm', 'dtrasm', 'ctrasm', 'ztrasm' ), - ('strevc', 'dtrevc', 'ctrevc', 'ztrevc' ), - ('strsmpl', 'dtrsmpl', 'ctrsmpl', 'ztrsmpl' ), - ('strssq', 'dtrssq', 'ctrssq', 'ztrssq' ), - ('strtri', 'dtrtri', 'ctrtri', 'ztrtri' ), - ('stslqt', 'dtslqt', 'ctslqt', 'ztslqt' ), - ('stsmlq_sy', 'dtsmlq_sy', 'ctsmlq_he', 'ztsmlq_he' ), - ('stsmqr_sy', 'dtsmqr_sy', 'ctsmqr_he', 'ztsmqr_he' ), - ('stsmqr', 'dtsmqr', 'ctsmqr', 'ztsmqr' ), - ('stsmlq', 'dtsmlq', 'ctsmlq', 'ztsmlq' ), - ('stsqrt', 'dtsqrt', 'ctsqrt', 'ztsqrt' ), - ('stslqt', 'dtslqt', 'ctslqt', 'ztslqt' ), - ('ststrf', 'dtstrf', 'ctstrf', 'ztstrf' ), - ('sttlqt', 'dttlqt', 'cttlqt', 'zttlqt' ), - ('sttmlq', 'dttmlq', 'cttmlq', 'zttmlq' ), - ('sttmqr', 'dttmqr', 'cttmqr', 'zttmqr' ), - ('sttqrt', 'dttqrt', 'cttqrt', 'zttqrt' ), - ('sungesv', 'sungesv', 'cungesv', 'cungesv' ), - ('sstegr', 'dstegr', 'cstegr', 'zstegr' ), - ('ssyssq', 'dsyssq', 'csyssq', 'zsyssq' ), + ('', 'sbarrier', 'dbarrier', 'cbarrier', 'zbarrier' ), + ('', 'sbdsqr', 'dbdsqr', 'cbdsqr', 'zbdsqr' ), + ('', 'sbdt01', 'dbdt01', 'cbdt01', 'zbdt01' ), + ('', 'scheck', 'dcheck', 'ccheck', 'zcheck' ), + ('', 'sgebak', 'dgebak', 'cgebak', 'zgebak' ), + ('', 'sgebal', 'dgebal', 'cgebal', 'zgebal' ), + ('', 'sgebd2', 'dgebd2', 'cgebd2', 'zgebd2' ), + ('', 'sgebrd', 'dgebrd', 'cgebrd', 'zgebrd' ), + ('', 'sgeev', 'dgeev', 'cgeev', 'zgeev' ), + ('', 'sgehd2', 'dgehd2', 'cgehd2', 'zgehd2' ), + ('', 'sgehrd', 'dgehrd', 'cgehrd', 'zgehrd' ), + ('', 'sgelq2', 'dgelq2', 'cgelq2', 'zgelq2' ), + ('', 'sgelqf', 'dgelqf', 'cgelqf', 'zgelqf' ), + ('', 'sgelqs', 'dgelqs', 'cgelqs', 'zgelqs' ), + ('', 'sgelqt', 'dgelqt', 'cgelqt', 'zgelqt' ), + ('', 'sgels', 'dgels', 'cgels', 'zgels' ), + ('', 'sgeqlf', 'dgeqlf', 'cgeqlf', 'zgeqlf' ), + ('', 'sgeqp3', 'dgeqp3', 'cgeqp3', 'zgeqp3' ), + ('', 'sgeqr2', 'dgeqr2', 'cgeqr2', 'zgeqr2' ), + ('', 'sgeqrf', 'dgeqrf', 'cgeqrf', 'zgeqrf' ), + ('', 'sgeqrs', 'dgeqrs', 'cgeqrs', 'zgeqrs' ), + ('', 'sgeqrt', 'dgeqrt', 'cgeqrt', 'zgeqrt' ), + ('', 'sgessm', 'dgessm', 'cgessm', 'zgessm' ), + ('', 'sgessq', 'dgessq', 'cgessq', 'zgessq' ), + ('', 'sgesv', 'dgesv', 'cgesv', 'zgesv' ), + ('', 'sgesv', 'sgesv', 'cgesv', 'cgesv' ), + ('', 'sget22', 'dget22', 'cget22', 'zget22' ), + ('', 'sgetf2', 'dgetf2', 'cgetf2', 'zgetf2' ), + ('', 'sgetmi', 'dgetmi', 'cgetmi', 'zgetmi' ), + ('', 'sgetmo', 'dgetmo', 'cgetmo', 'zgetmo' ), + ('', 'sgetrf', 'dgetrf', 'cgetrf', 'zgetrf' ), + ('', 'sgetri', 'dgetri', 'cgetri', 'zgetri' ), + ('', 'sgetrl', 'dgetrl', 'cgetrl', 'zgetrl' ), + ('', 'sgetrs', 'dgetrs', 'cgetrs', 'zgetrs' ), + ('', 'shseqr', 'dhseqr', 'chseqr', 'zhseqr' ), + ('', 'shst01', 'dhst01', 'chst01', 'zhst01' ), + ('', 'slabad', 'dlabad', 'slabad', 'dlabad' ), + ('', 'slabrd', 'dlabrd', 'clabrd', 'zlabrd' ), + ('', 'slacgv', 'dlacgv', 'clacgv', 'zlacgv' ), + ('', 'slacpy', 'dlacpy', 'clacpy', 'zlacpy' ), + ('', 'slaed', 'dlaed', 'slaed', 'dlaed' ), + ('', 'slaex', 'dlaex', 'slaex', 'dlaex' ), + ('', 'slagsy', 'dlagsy', 'clagsy', 'zlagsy' ), + ('', 'slahr', 'dlahr', 'clahr', 'zlahr' ), + ('', 'slamc3', 'dlamc3', 'slamc3', 'dlamc3' ), + ('', 'slamch', 'dlamch', 'slamch', 'dlamch' ), + ('', 'slamrg', 'dlamrg', 'slamrg', 'dlamrg' ), + ('', 'slange', 'dlange', 'clange', 'zlange' ), + ('', 'slanst', 'dlanst', 'clanht', 'zlanht' ), + ('', 'slansy', 'dlansy', 'clansy', 'zlansy' ), + ('', 'slantr', 'dlantr', 'clantr', 'zlantr' ), + ('', 'slaqps', 'dlaqps', 'claqps', 'zlaqps' ), + ('', 'slaqp2', 'dlaqp2', 'claqp2', 'zlaqp2' ), + ('', 'slarfb', 'dlarfb', 'clarfb', 'zlarfb' ), + ('', 'slarfg', 'dlarfg', 'clarfg', 'zlarfg' ), + ('', 'slarft', 'dlarft', 'clarft', 'zlarft' ), + ('', 'slarfx', 'dlarfx', 'clarfx', 'zlarfx' ), + ('', 'slarfy', 'dlarfy', 'clarfy', 'zlarfy' ), + ('', 'slarnv', 'dlarnv', 'clarnv', 'zlarnv' ), + ('', 'slarnv', 'dlarnv', 'slarnv', 'dlarnv' ), + ('', 'slartg', 'dlartg', 'clartg', 'zlartg' ), + ('', 'slascl', 'dlascl', 'clascl', 'zlascl' ), + ('', 'slaset', 'dlaset', 'claset', 'zlaset' ), + ('', 'slaswp', 'dlaswp', 'claswp', 'zlaswp' ), + ('', 'slatro', 'dlatro', 'clatro', 'zlatro' ), + ('', 'slatrd', 'dlatrd', 'clatrd', 'zlatrd' ), + ('', 'slauum', 'dlauum', 'clauum', 'zlauum' ), + ('', 'spack', 'dpack', 'cpack', 'zpack' ), + ('', 'splgsy', 'dplgsy', 'cplgsy', 'zplgsy' ), + ('', 'splrnt', 'dplrnt', 'cplrnt', 'zplrnt' ), + ('', 'splssq', 'dplssq', 'cplssq', 'zplssq' ), + ('', 'sposv', 'dposv', 'cposv', 'zposv' ), + ('', 'ssysv', 'dsysv', 'csysv', 'zsysv' ), + ('', 'sposv', 'sposv', 'cposv', 'cposv' ), + ('', 'spotrf', 'dpotrf', 'cpotrf', 'zpotrf' ), + ('', 'spotrf', 'dpotrf', 'cpxtrf', 'zpxtrf' ), + ('', 'ssytrf', 'dsytrf', 'csytrf', 'zsytrf' ), + ('', 'spotri', 'dpotri', 'cpotri', 'zpotri' ), + ('', 'spotrs', 'dpotrs', 'cpotrs', 'zpotrs' ), + ('', 'ssytrs', 'dsytrs', 'csytrs', 'zsytrs' ), + ('', 'sqpt01', 'dqpt01', 'cqpt01', 'zqpt01' ), + ('', 'sqrt02', 'dqrt02', 'cqrt02', 'zqrt02' ), + ('', 'sshift', 'dshift', 'cshift', 'zshift' ), + ('', 'sssssm', 'dssssm', 'cssssm', 'zssssm' ), + ('', 'sstebz', 'dstebz', 'sstebz', 'dstebz' ), + ('', 'sstedc', 'dstedc', 'cstedc', 'zstedc' ), + ('', 'sstedx', 'dstedx', 'cstedx', 'zstedx' ), + ('', 'sstedx', 'dstedx', 'sstedx', 'dstedx' ), + ('', 'sstein', 'dstein', 'cstein', 'zstein' ), + ('', 'sstemr', 'dstemr', 'cstemr', 'zstemr' ), + ('', 'ssteqr', 'dsteqr', 'csteqr', 'zsteqr' ), + ('', 'ssterf', 'dsterf', 'ssterf', 'dsterf' ), + ('', 'ssterm', 'dsterm', 'csterm', 'zsterm' ), + ('', 'sstt21', 'dstt21', 'cstt21', 'zstt21' ), + ('', 'strasm', 'dtrasm', 'ctrasm', 'ztrasm' ), + ('', 'strevc', 'dtrevc', 'ctrevc', 'ztrevc' ), + ('', 'strsmpl', 'dtrsmpl', 'ctrsmpl', 'ztrsmpl' ), + ('', 'strssq', 'dtrssq', 'ctrssq', 'ztrssq' ), + ('', 'strtri', 'dtrtri', 'ctrtri', 'ztrtri' ), + ('', 'stslqt', 'dtslqt', 'ctslqt', 'ztslqt' ), + ('', 'stsmlq_sy', 'dtsmlq_sy', 'ctsmlq_he', 'ztsmlq_he' ), + ('', 'stsmqr_sy', 'dtsmqr_sy', 'ctsmqr_he', 'ztsmqr_he' ), + ('', 'stsmqr', 'dtsmqr', 'ctsmqr', 'ztsmqr' ), + ('', 'stsmlq', 'dtsmlq', 'ctsmlq', 'ztsmlq' ), + ('', 'stsqrt', 'dtsqrt', 'ctsqrt', 'ztsqrt' ), + ('', 'stpgqrt', 'dtpgqrt', 'ctpgqrt', 'ztpgqrt' ), + ('', 'stplqt', 'dtplqt', 'ctplqt', 'ztplqt' ), + ('', 'stpqrt', 'dtpqrt', 'ctpqrt', 'ztpqrt' ), + ('', 'stpmqrt', 'dtpmqrt', 'ctpmqrt', 'ztpmqrt' ), + ('', 'stpmlqt', 'dtpmlqt', 'ctpmlqt', 'ztpmlqt' ), + ('', 'stslqt', 'dtslqt', 'ctslqt', 'ztslqt' ), + ('', 'ststrf', 'dtstrf', 'ctstrf', 'ztstrf' ), + ('', 'sttlqt', 'dttlqt', 'cttlqt', 'zttlqt' ), + ('', 'sttmlq', 'dttmlq', 'cttmlq', 'zttmlq' ), + ('', 'sttmqr', 'dttmqr', 'cttmqr', 'zttmqr' ), + ('', 'sttqrt', 'dttqrt', 'cttqrt', 'zttqrt' ), + ('', 'sungesv', 'sungesv', 'cungesv', 'cungesv' ), + ('', 'sstegr', 'dstegr', 'cstegr', 'zstegr' ), + ('', 'ssyssq', 'dsyssq', 'csyssq', 'zsyssq' ), # ----- LAPACK Eigenvalues - ('slatms', 'dlatms', 'slatms', 'dlatms' ), - ('slasrt', 'dlasrt', 'slasrt', 'dlasrt' ), + ('', 'slatms', 'dlatms', 'slatms', 'dlatms' ), + ('', 'slasrt', 'dlasrt', 'slasrt', 'dlasrt' ), # ----- BLAS and LAPACK, where complex base name != real base name # BLAS, with precision - ('sasum', 'dasum', 'scasum', 'dzasum' ), - ('sasum', 'dasum', 'casum', 'zasum' ), - ('sdot', 'ddot', 'cdotc', 'zdotc' ), - ('sdot_sub', 'ddot_sub', 'cdotc_sub', 'zdotc_sub' ), - ('sdot_sub', 'ddot_sub', 'cdotu_sub', 'zdotu_sub' ), - ('sger', 'dger', 'cgerc', 'zgerc' ), - ('sger', 'dger', 'cgeru', 'zgeru' ), - ('snrm2', 'dnrm2', 'scnrm2', 'dznrm2' ), - ('ssymm', 'dsymm', 'chemm', 'zhemm' ), - ('ssymv', 'dsymv', 'chemv', 'zhemv' ), - ('ssyr2', 'dsyr2', 'cher2', 'zher2' ), - ('ssyr2k', 'dsyr2k', 'cher2k', 'zher2k' ), - ('ssyrk', 'dsyrk', 'cherk', 'zherk' ), - ('ssyr', 'dsyr', 'cher', 'zher' ), + ('', 'sasum', 'dasum', 'scasum', 'dzasum' ), + ('', 'sasum', 'dasum', 'casum', 'zasum' ), + ('', 'sdot', 'ddot', 'cdotc', 'zdotc' ), + ('', 'sdot_sub', 'ddot_sub', 'cdotc_sub', 'zdotc_sub' ), + ('', 'sdot_sub', 'ddot_sub', 'cdotu_sub', 'zdotu_sub' ), + ('', 'sger', 'dger', 'cgerc', 'zgerc' ), + ('', 'sger', 'dger', 'cgeru', 'zgeru' ), + ('', 'snrm2', 'dnrm2', 'scnrm2', 'dznrm2' ), + ('', 'snrm2', 'dnrm2', 'snrm2', 'dnrm2' ), + ('', 'ssymm', 'dsymm', 'chemm', 'zhemm' ), + ('', 'ssymv', 'dsymv', 'chemv', 'zhemv' ), + ('', 'ssyr2', 'dsyr2', 'cher2', 'zher2' ), + ('', 'ssyr2k', 'dsyr2k', 'cher2k', 'zher2k' ), + ('', 'ssyrk', 'dsyrk', 'cherk', 'zherk' ), + ('', 'ssyr', 'dsyr', 'cher', 'zher' ), # LAPACK, with precision - ('slag2d', 'dlag2s', 'clag2z', 'zlag2c' ), - ('slagsy', 'dlagsy', 'claghe', 'zlaghe' ), - ('slasyf', 'dlasyf', 'clahef', 'zlahef' ), - ('slansy', 'dlansy', 'clanhe', 'zlanhe' ), - ('slavsy', 'dlavsy', 'clavhe', 'zlavhe' ), - ('sorg2r', 'dorg2r', 'cung2r', 'zung2r' ), - ('sorgbr', 'dorgbr', 'cungbr', 'zungbr' ), - ('sorghr', 'dorghr', 'cunghr', 'zunghr' ), - ('sorglq', 'dorglq', 'cunglq', 'zunglq' ), - ('sorgql', 'dorgql', 'cungql', 'zungql' ), - ('sorgqr', 'dorgqr', 'cungqr', 'zungqr' ), - ('sorgtr', 'dorgtr', 'cungtr', 'zungtr' ), - ('sorm2r', 'dorm2r', 'cunm2r', 'zunm2r' ), - ('sormbr', 'dormbr', 'cunmbr', 'zunmbr' ), - ('sormlq', 'dormlq', 'cunmlq', 'zunmlq' ), - ('sormql', 'dormql', 'cunmql', 'zunmql' ), - ('sormqr', 'dormqr', 'cunmqr', 'zunmqr' ), - ('sormr2', 'dormr2', 'cunmr2', 'zunmr2' ), - ('sormtr', 'dormtr', 'cunmtr', 'zunmtr' ), - ('sort01', 'dort01', 'cunt01', 'zunt01' ), - ('splgsy', 'dplgsy', 'cplghe', 'zplghe' ), - ('ssbtrd', 'dsbtrd', 'chbtrd', 'zhbtrd' ), - ('ssybbd', 'dsybbd', 'chebbd', 'zhebbd' ), - ('ssyev', 'dsyev', 'cheev', 'zheev' ), - ('ssyevd', 'dsyevd', 'cheevd', 'zheevd' ), - ('ssygs2', 'dsygs2', 'chegs2', 'zhegs2' ), - ('ssygst', 'dsygst', 'chegst', 'zhegst' ), - ('ssygvd', 'dsygvd', 'chegvd', 'zhegvd' ), - ('ssygvr', 'dsygvr', 'chegvr', 'zhegvr' ), - ('ssygvx', 'dsygvx', 'chegvx', 'zhegvx' ), - ('ssyssq', 'dsyssq', 'chessq', 'zhessq' ), - ('ssyt21', 'dsyt21', 'chet21', 'zhet21' ), - ('ssytd2', 'dsytd2', 'chetd2', 'zhetd2' ), - ('ssytrd', 'dsytrd', 'chetrd', 'zhetrd' ), - ('ssytrf', 'dsytrf', 'chetrf', 'zhetrf' ), + ('', 'slag2d', 'dlag2s', 'clag2z', 'zlag2c' ), + ('', 'slagsy', 'dlagsy', 'claghe', 'zlaghe' ), + ('', 'slasyf', 'dlasyf', 'clahef', 'zlahef' ), + ('', 'slansy', 'dlansy', 'clanhe', 'zlanhe' ), + ('', 'slavsy', 'dlavsy', 'clavhe', 'zlavhe' ), + ('', 'sorg2r', 'dorg2r', 'cung2r', 'zung2r' ), + ('', 'sorgbr', 'dorgbr', 'cungbr', 'zungbr' ), + ('', 'sorghr', 'dorghr', 'cunghr', 'zunghr' ), + ('', 'sorglq', 'dorglq', 'cunglq', 'zunglq' ), + ('', 'sorgql', 'dorgql', 'cungql', 'zungql' ), + ('', 'sorgqr', 'dorgqr', 'cungqr', 'zungqr' ), + ('', 'sorgtr', 'dorgtr', 'cungtr', 'zungtr' ), + ('', 'sorm2r', 'dorm2r', 'cunm2r', 'zunm2r' ), + ('', 'sormbr', 'dormbr', 'cunmbr', 'zunmbr' ), + ('', 'sormlq', 'dormlq', 'cunmlq', 'zunmlq' ), + ('', 'sormql', 'dormql', 'cunmql', 'zunmql' ), + ('', 'sormqr', 'dormqr', 'cunmqr', 'zunmqr' ), + ('', 'sormr2', 'dormr2', 'cunmr2', 'zunmr2' ), + ('', 'sormtr', 'dormtr', 'cunmtr', 'zunmtr' ), + ('', 'sort01', 'dort01', 'cunt01', 'zunt01' ), + ('', 'splgsy', 'dplgsy', 'cplghe', 'zplghe' ), + ('', 'ssbtrd', 'dsbtrd', 'chbtrd', 'zhbtrd' ), + ('', 'ssybbd', 'dsybbd', 'chebbd', 'zhebbd' ), + ('', 'ssyev', 'dsyev', 'cheev', 'zheev' ), + ('', 'ssyevd', 'dsyevd', 'cheevd', 'zheevd' ), + ('', 'ssygs2', 'dsygs2', 'chegs2', 'zhegs2' ), + ('', 'ssygst', 'dsygst', 'chegst', 'zhegst' ), + ('', 'ssygvd', 'dsygvd', 'chegvd', 'zhegvd' ), + ('', 'ssygvr', 'dsygvr', 'chegvr', 'zhegvr' ), + ('', 'ssygvx', 'dsygvx', 'chegvx', 'zhegvx' ), + ('', 'ssyssq', 'dsyssq', 'chessq', 'zhessq' ), + ('', 'ssyt21', 'dsyt21', 'chet21', 'zhet21' ), + ('', 'ssytd2', 'dsytd2', 'chetd2', 'zhetd2' ), + ('', 'ssytrd', 'dsytrd', 'chetrd', 'zhetrd' ), + ('', 'ssytrf', 'dsytrf', 'chetrf', 'zhetrf' ), # ----- Auxiliary routines with precision - ('sgemerge', 'dgemerge', 'cgemerge', 'zgemerge' ), - ('sparfb', 'dparfb', 'cparfb', 'zparfb' ), + ('', 'sgemerge', 'dgemerge', 'cgemerge', 'zgemerge' ), + ('', 'sparfb', 'dparfb', 'cparfb', 'zparfb' ), # BLAS, without precision # must be after BLAS with precision # Ex: cublasZhemm -> cublasShemm -> cublasSsymm - ('dot', 'dot', 'dotc', 'dotc' ), - ('dot_sub', 'dot_sub', 'dotc_sub', 'dotc_sub' ), - ('dot_sub', 'dot_sub', 'dotu_sub', 'dotu_sub' ), - ('ger', 'ger', 'gerc', 'gerc' ), - ('ger', 'ger', 'geru', 'geru' ), - ('nrm2', 'nrm2', 'cnrm2', 'znrm2' ), # dznrm2 -> dnrm2 - ('symm', 'symm', 'hemm', 'hemm' ), - ('symv', 'symv', 'hemv', 'hemv' ), - ('syr2', 'syr2', 'her2', 'her2' ), - ('syr2k', 'syr2k', 'her2k', 'her2k' ), - ('syrk', 'syrk', 'herk', 'herk' ), + ('', 'Dot', 'Dot', 'Dotc', 'Dotc' ), + ('', 'Dot', 'Dot', 'Dotu', 'Dotu' ), + ('', 'dot', 'dot', 'dotc', 'dotc' ), + ('', 'dot', 'dot', 'dotu', 'dotu' ), + ('', 'ger', 'ger', 'gerc', 'gerc' ), + ('', 'ger', 'ger', 'geru', 'geru' ), + ('', 'nrm2', 'nrm2', 'cnrm2', 'znrm2' ), # dznrm2 -> dnrm2 + ('', 'symm', 'symm', 'hemm', 'hemm' ), + ('', 'symv', 'symv', 'hemv', 'hemv' ), + ('', 'syr2', 'syr2', 'her2', 'her2' ), + ('', 'syr2k', 'syr2k', 'her2k', 'her2k' ), + ('', 'syrk', 'syrk', 'herk', 'herk' ), # LAPACK, without precision - ('lag2d', 'lag2s', 'lag2z', 'lag2c' ), - ('lagsy', 'lagsy', 'laghe', 'laghe' ), - ('lasyf', 'lasyf', 'lahef', 'lahef' ), - ('lansy', 'lansy', 'lanhe', 'lanhe' ), - ('lanst', 'lanst', 'lanht', 'lanht' ), - ('lavsy', 'lavsy', 'lavhe', 'lavhe' ), - ('org2r', 'org2r', 'ung2r', 'ung2r' ), - ('orgbr', 'orgbr', 'ungbr', 'ungbr' ), - ('orghr', 'orghr', 'unghr', 'unghr' ), - ('orglq', 'orglq', 'unglq', 'unglq' ), - ('orgql', 'orgql', 'ungql', 'ungql' ), - ('orgqr', 'orgqr', 'ungqr', 'ungqr' ), - ('orgtr', 'orgtr', 'ungtr', 'ungtr' ), - ('orm2r', 'orm2r', 'unm2r', 'unm2r' ), - ('ormbr', 'ormbr', 'unmbr', 'unmbr' ), - ('ormlq', 'ormlq', 'unmlq', 'unmlq' ), - ('ormql', 'ormql', 'unmql', 'unmql' ), - ('ormqr', 'ormqr', 'unmqr', 'unmqr' ), - ('ormr2', 'ormr2', 'unmr2', 'unmr2' ), - ('ormtr', 'ormtr', 'unmtr', 'unmtr' ), - ('ort01', 'ort01', 'unt01', 'unt01' ), - ('plgsy', 'plgsy', 'plghe', 'plghe' ), - ('sbtrd', 'sbtrd', 'hbtrd', 'hbtrd' ), - ('sybbd', 'sybbd', 'hebbd', 'hebbd' ), - ('syev', 'syev', 'heev', 'heev' ), - ('syevd', 'syevd', 'heevd', 'heevd' ), - ('sygs2', 'sygs2', 'hegs2', 'hegs2' ), - ('sygst', 'sygst', 'hegst', 'hegst' ), - ('sygvd', 'sygvd', 'hegvd', 'hegvd' ), - ('sygvr', 'sygvr', 'hegvr', 'hegvr' ), - ('sygvx', 'sygvx', 'hegvx', 'hegvx' ), - ('syssq', 'syssq', 'hessq', 'hessq' ), - ('syt21', 'syt21', 'het21', 'het21' ), - ('sytd2', 'sytd2', 'hetd2', 'hetd2' ), - ('sytrd', 'sytrd', 'hetrd', 'hetrd' ), - ('sytrf', 'sytrf', 'hetrf', 'hetrf' ), + ('', 'lag2d', 'lag2s', 'lag2z', 'lag2c' ), + ('', 'lagsy', 'lagsy', 'laghe', 'laghe' ), + ('', 'lasyf', 'lasyf', 'lahef', 'lahef' ), + ('', 'lansy', 'lansy', 'lanhe', 'lanhe' ), + ('', 'lanst', 'lanst', 'lanht', 'lanht' ), + ('', 'lavsy', 'lavsy', 'lavhe', 'lavhe' ), + ('', 'org2r', 'org2r', 'ung2r', 'ung2r' ), + ('', 'orgbr', 'orgbr', 'ungbr', 'ungbr' ), + ('', 'orghr', 'orghr', 'unghr', 'unghr' ), + ('', 'orglq', 'orglq', 'unglq', 'unglq' ), + ('', 'orgql', 'orgql', 'ungql', 'ungql' ), + ('', 'orgqr', 'orgqr', 'ungqr', 'ungqr' ), + ('', 'orgtr', 'orgtr', 'ungtr', 'ungtr' ), + ('', 'orm2r', 'orm2r', 'unm2r', 'unm2r' ), + ('', 'ormbr', 'ormbr', 'unmbr', 'unmbr' ), + ('', 'ormlq', 'ormlq', 'unmlq', 'unmlq' ), + ('', 'ormql', 'ormql', 'unmql', 'unmql' ), + ('', 'ormqr', 'ormqr', 'unmqr', 'unmqr' ), + ('', 'ormr2', 'ormr2', 'unmr2', 'unmr2' ), + ('', 'ormtr', 'ormtr', 'unmtr', 'unmtr' ), + ('', 'ort01', 'ort01', 'unt01', 'unt01' ), + ('', 'plgsy', 'plgsy', 'plghe', 'plghe' ), + ('', 'sbtrd', 'sbtrd', 'hbtrd', 'hbtrd' ), + ('', 'sybbd', 'sybbd', 'hebbd', 'hebbd' ), + ('', 'syev', 'syev', 'heev', 'heev' ), + ('', 'syevd', 'syevd', 'heevd', 'heevd' ), + ('', 'sygs2', 'sygs2', 'hegs2', 'hegs2' ), + ('', 'sygst', 'sygst', 'hegst', 'hegst' ), + ('', 'sygvd', 'sygvd', 'hegvd', 'hegvd' ), + ('', 'sygvr', 'sygvr', 'hegvr', 'hegvr' ), + ('', 'sygvx', 'sygvx', 'hegvx', 'hegvx' ), + ('', 'syssq', 'syssq', 'hessq', 'hessq' ), + ('', 'syt21', 'syt21', 'het21', 'het21' ), + ('', 'sytd2', 'sytd2', 'hetd2', 'hetd2' ), + ('', 'sytrd', 'sytrd', 'hetrd', 'hetrd' ), + ('', 'sytrf', 'sytrf', 'hetrf', 'hetrf' ), + ('', 'syrfb', 'syrfb', 'herfb', 'herfb' ), # ----- For norms: compute result in Real or Double - ('slange', 'dlange', 'slange', 'dlange' ), - ('slaset', 'dlaset', 'slaset', 'dlaset' ), - ('splssq', 'dplssq', 'splssq', 'dplssq' ), - ('slacpy', 'dlacpy', 'slacpy', 'dlacpy' ), - ('saxpy', 'daxpy', 'saxpy', 'daxpy' ), - ('MorseRealFloat', 'MorseRealDouble', 'MorseRealFloat', 'MorseRealDouble'), + ('', 'slange', 'dlange', 'slange', 'dlange' ), + ('', 'slaset', 'dlaset', 'slaset', 'dlaset' ), + ('', 'splssq', 'dplssq', 'splssq', 'dplssq' ), + ('', 'slacpy', 'dlacpy', 'slacpy', 'dlacpy' ), + ('', 'saxpy', 'daxpy', 'saxpy', 'daxpy' ), # QUARK codelets protection (to prevent conversion with LAPACK WITH PRECISION) - ('DAG_CORE_U-NG2R', 'DAG_CORE_U-NG2R', 'DAG_CORE_UNG2R', 'DAG_CORE_UNG2R' ), - ('DAG_CORE_U-NGBR', 'DAG_CORE_U-NGBR', 'DAG_CORE_UNGBR', 'DAG_CORE_UNGBR' ), - ('DAG_CORE_U-NGHR', 'DAG_CORE_U-NGHR', 'DAG_CORE_UNGHR', 'DAG_CORE_UNGHR' ), - ('DAG_CORE_U-NGLQ', 'DAG_CORE_U-NGLQ', 'DAG_CORE_UNGLQ', 'DAG_CORE_UNGLQ' ), - ('DAG_CORE_U-NGQL', 'DAG_CORE_U-NGQL', 'DAG_CORE_UNGQL', 'DAG_CORE_UNGQL' ), - ('DAG_CORE_U-NGQR', 'DAG_CORE_U-NGQR', 'DAG_CORE_UNGQR', 'DAG_CORE_UNGQR' ), - ('DAG_CORE_U-NGTR', 'DAG_CORE_U-NGTR', 'DAG_CORE_UNGTR', 'DAG_CORE_UNGTR' ), - ('DAG_CORE_U-NM2R', 'DAG_CORE_U-NM2R', 'DAG_CORE_UNM2R', 'DAG_CORE_UNM2R' ), - ('DAG_CORE_U-NMBR', 'DAG_CORE_U-NMBR', 'DAG_CORE_UNMBR', 'DAG_CORE_UNMBR' ), - ('DAG_CORE_U-NMLQ', 'DAG_CORE_U-NMLQ', 'DAG_CORE_UNMLQ', 'DAG_CORE_UNMLQ' ), - ('DAG_CORE_U-NMQL', 'DAG_CORE_U-NMQL', 'DAG_CORE_UNMQL', 'DAG_CORE_UNMQL' ), - ('DAG_CORE_U-NMQR', 'DAG_CORE_U-NMQR', 'DAG_CORE_UNMQR', 'DAG_CORE_UNMQR' ), + ('', 'DAG_CORE_U-NG2R', 'DAG_CORE_U-NG2R', 'DAG_CORE_UNG2R', 'DAG_CORE_UNG2R' ), + ('', 'DAG_CORE_U-NGBR', 'DAG_CORE_U-NGBR', 'DAG_CORE_UNGBR', 'DAG_CORE_UNGBR' ), + ('', 'DAG_CORE_U-NGHR', 'DAG_CORE_U-NGHR', 'DAG_CORE_UNGHR', 'DAG_CORE_UNGHR' ), + ('', 'DAG_CORE_U-NGLQ', 'DAG_CORE_U-NGLQ', 'DAG_CORE_UNGLQ', 'DAG_CORE_UNGLQ' ), + ('', 'DAG_CORE_U-NGQL', 'DAG_CORE_U-NGQL', 'DAG_CORE_UNGQL', 'DAG_CORE_UNGQL' ), + ('', 'DAG_CORE_U-NGQR', 'DAG_CORE_U-NGQR', 'DAG_CORE_UNGQR', 'DAG_CORE_UNGQR' ), + ('', 'DAG_CORE_U-NGTR', 'DAG_CORE_U-NGTR', 'DAG_CORE_UNGTR', 'DAG_CORE_UNGTR' ), + ('', 'DAG_CORE_U-NM2R', 'DAG_CORE_U-NM2R', 'DAG_CORE_UNM2R', 'DAG_CORE_UNM2R' ), + ('', 'DAG_CORE_U-NMBR', 'DAG_CORE_U-NMBR', 'DAG_CORE_UNMBR', 'DAG_CORE_UNMBR' ), + ('', 'DAG_CORE_U-NMLQ', 'DAG_CORE_U-NMLQ', 'DAG_CORE_UNMLQ', 'DAG_CORE_UNMLQ' ), + ('', 'DAG_CORE_U-NMQL', 'DAG_CORE_U-NMQL', 'DAG_CORE_UNMQL', 'DAG_CORE_UNMQL' ), + ('', 'DAG_CORE_U-NMQR', 'DAG_CORE_U-NMQR', 'DAG_CORE_UNMQR', 'DAG_CORE_UNMQR' ), # ----- BLAS AND LAPACK, UPPERCASE, ALPHABETIC ORDER # COPY & PASTE THESE TO UPPERCASE BELOW AND FIX CASE. # USED FOR FILENAMES LACKING MAGMA_Z, ETC. PREFIX - ('ISAMAX', 'IDAMAX', 'ICAMAX', 'IZAMAX' ), - ('ISAMAX', 'IDAMAX', 'ISAMAX', 'IDAMAX' ), - ('SAXPY', 'DAXPY', 'CAXPY', 'ZAXPY' ), - ('SCOPY', 'DCOPY', 'CCOPY', 'ZCOPY' ), - ('SGEADD', 'DGEADD', 'CGEADD', 'ZGEADD' ), - ('SGECFI', 'DGECFI', 'CGECFI', 'ZGECFI' ), - ('SGEMDM', 'DGEMDM', 'CGEMDM', 'ZGEMDM' ), - ('SGEMM', 'DGEMM', 'CGEMM', 'ZGEMM' ), - ('SGEMV', 'DGEMV', 'CGEMV', 'ZGEMV' ), - ('SSCAL', 'DSCAL', 'CSCAL', 'ZSCAL' ), - ('SSCAL', 'DSCAL', 'CSSCAL', 'ZDSCAL' ), - ('SSCAL', 'DSCAL', 'SSCAL', 'DSCAL' ), # ZDSCAL -> CSSCAL - ('SSWAP', 'DSWAP', 'CSWAP', 'ZSWAP' ), - ('SSYMM', 'DSYMM', 'CSYMM', 'ZSYMM' ), - ('SSYMV', 'DSYMV', 'CSYMV', 'ZSYMV' ), - ('SSYR2K', 'DSYR2K', 'CSYR2K', 'ZSYR2K' ), - ('SSYRK', 'DSYRK', 'CSYRK', 'ZSYRK' ), - ('STRADD', 'DTRADD', 'CTRADD', 'ZTRADD' ), - ('STRMM', 'DTRMM', 'CTRMM', 'ZTRMM' ), - ('STRMV', 'DTRMV', 'CTRMV', 'ZTRMV' ), - ('STRSM', 'DTRSM', 'CTRSM', 'ZTRSM' ), - ('STRSMPL', 'DTRSMPL', 'CTRSMPL', 'ZTRSMPL' ), - ('STRSV', 'DTRSV', 'CTRSV', 'ZTRSV' ), + ('', 'ISAMAX', 'IDAMAX', 'ICAMAX', 'IZAMAX' ), + ('', 'ISAMAX', 'IDAMAX', 'ISAMAX', 'IDAMAX' ), + ('', 'SAXPY', 'DAXPY', 'CAXPY', 'ZAXPY' ), + ('', 'SCOPY', 'DCOPY', 'CCOPY', 'ZCOPY' ), + ('', 'SGEADD', 'DGEADD', 'CGEADD', 'ZGEADD' ), + ('', 'SGECFI', 'DGECFI', 'CGECFI', 'ZGECFI' ), + ('', 'SGEMDM', 'DGEMDM', 'CGEMDM', 'ZGEMDM' ), + ('', 'SGEMM', 'DGEMM', 'CGEMM', 'ZGEMM' ), + ('', 'SGEMV', 'DGEMV', 'CGEMV', 'ZGEMV' ), + ('', 'SSCAL', 'DSCAL', 'CSCAL', 'ZSCAL' ), + ('', 'SSCAL', 'DSCAL', 'CSSCAL', 'ZDSCAL' ), + ('', 'SSCAL', 'DSCAL', 'SSCAL', 'DSCAL' ), # ZDSCAL -> CSSCAL + ('', 'SSWAP', 'DSWAP', 'CSWAP', 'ZSWAP' ), + ('', 'SSYMM', 'DSYMM', 'CSYMM', 'ZSYMM' ), + ('', 'SSYMV', 'DSYMV', 'CSYMV', 'ZSYMV' ), + ('', 'SSYR2K', 'DSYR2K', 'CSYR2K', 'ZSYR2K' ), + ('', 'SSYRK', 'DSYRK', 'CSYRK', 'ZSYRK' ), + ('', 'STRADD', 'DTRADD', 'CTRADD', 'ZTRADD' ), + ('', 'STRMM', 'DTRMM', 'CTRMM', 'ZTRMM' ), + ('', 'STRMV', 'DTRMV', 'CTRMV', 'ZTRMV' ), + ('', 'STRSM', 'DTRSM', 'CTRSM', 'ZTRSM' ), + ('', 'STRSV', 'DTRSV', 'CTRSV', 'ZTRSV' ), # LAPACK - ('SBDSQR', 'DBDSQR', 'CBDSQR', 'ZBDSQR' ), - ('SBDT01', 'DBDT01', 'CBDT01', 'ZBDT01' ), - ('SCHECK', 'DCHECK', 'CCHECK', 'ZCHECK' ), - ('SGEBAK', 'DGEBAK', 'CGEBAK', 'ZGEBAK' ), - ('SGEBAL', 'DGEBAL', 'CGEBAL', 'ZGEBAL' ), - ('SGEBD2', 'DGEBD2', 'CGEBD2', 'ZGEBD2' ), - ('SGEBRD', 'DGEBRD', 'CGEBRD', 'ZGEBRD' ), - ('SGEEV', 'DGEEV', 'CGEEV', 'ZGEEV' ), - ('SGEHD2', 'DGEHD2', 'CGEHD2', 'ZGEHD2' ), - ('SGEHRD', 'DGEHRD', 'CGEHRD', 'ZGEHRD' ), - ('SGELQ2', 'DGELQ2', 'CGELQ2', 'ZGELQ2' ), - ('SGELQF', 'DGELQF', 'CGELQF', 'ZGELQF' ), - ('SGELQS', 'DGELQS', 'CGELQS', 'ZGELQS' ), - ('SGELS', 'DGELS', 'CGELS', 'ZGELS' ), - ('SGEQLF', 'DGEQLF', 'CGEQLF', 'ZGEQLF' ), - ('SGEQP3', 'DGEQP3', 'CGEQP3', 'ZGEQP3' ), - ('SGEQR2', 'DGEQR2', 'CGEQR2', 'ZGEQR2' ), - ('SGEQRF', 'DGEQRF', 'CGEQRF', 'ZGEQRF' ), - ('SGEQRS', 'DGEQRS', 'CGEQRS', 'ZGEQRS' ), - ('SGESSM', 'DGESSM', 'CGESSM', 'ZGESSM' ), - ('SGESV', 'DGESV', 'CGESV', 'ZGESV' ), - ('SGESV', 'SGESV', 'CGESV', 'CGESV' ), - ('SGET22', 'DGET22', 'CGET22', 'ZGET22' ), - ('SGETF2', 'DGETF2', 'CGETF2', 'ZGETF2' ), - ('SGETRF', 'DGETRF', 'CGETRF', 'ZGETRF' ), - ('SGETRI', 'DGETRI', 'CGETRI', 'ZGETRI' ), - ('SGETRL', 'DGETRL', 'CGETRL', 'ZGETRL' ), - ('SGETRS', 'DGETRS', 'CGETRS', 'ZGETRS' ), - ('SHSEQR', 'DHSEQR', 'CHSEQR', 'ZHSEQR' ), - ('SHST01', 'DHST01', 'CHST01', 'ZHST01' ), - ('SLABAD', 'DLABAD', 'SLABAD', 'DLABAD' ), - ('SLABRD', 'DLABRD', 'CLABRD', 'ZLABRD' ), - ('SLACGV', 'DLACGV', 'CLACGV', 'ZLACGV' ), - ('SLACPY', 'DLACPY', 'CLACPY', 'ZLACPY' ), - ('SLAED', 'DLAED', 'SLAED', 'DLAED' ), - ('SLAEX', 'DLAEX', 'SLAEX', 'DLAEX' ), - ('SLAGSY', 'DLAGSY', 'CLAGSY', 'ZLAGSY' ), - ('SLAHR', 'DLAHR', 'CLAHR', 'ZLAHR' ), - ('SLAMC3', 'DLAMC3', 'SLAMC3', 'DLAMC3' ), - ('SLAMCH', 'DLAMCH', 'SLAMCH', 'DLAMCH' ), - ('SLAMRG', 'DLAMRG', 'SLAMRG', 'DLAMRG' ), - ('SLANGE', 'DLANGE', 'CLANGE', 'ZLANGE' ), - ('SLANST', 'DLANST', 'CLANHT', 'ZLANHT' ), - ('SLANSY', 'DLANSY', 'CLANSY', 'ZLANSY' ), - ('SLANTR', 'DLANTR', 'CLANTR', 'ZLANTR' ), - ('SLAQPS', 'DLAQPS', 'CLAQPS', 'ZLAQPS' ), - ('SLAQP2', 'DLAQP2', 'CLAQP2', 'ZLAQP2' ), - ('SLARFB', 'DLARFB', 'CLARFB', 'ZLARFB' ), - ('SLARFG', 'DLARFG', 'CLARFG', 'ZLARFG' ), - ('SLARFT', 'DLARFT', 'CLARFT', 'ZLARFT' ), - ('SLARFX', 'DLARFX', 'CLARFX', 'ZLARFX' ), - ('SLARFY', 'DLARFY', 'CLARFY', 'ZLARFY' ), - ('SLARNV', 'DLARNV', 'CLARNV', 'ZLARNV' ), - ('SLARNV', 'DLARNV', 'SLARNV', 'DLARNV' ), - ('SLARTG', 'DLARTG', 'CLARTG', 'ZLARTG' ), - ('SLASCL', 'DLASCL', 'CLASCL', 'ZLASCL' ), - ('SLASET', 'DLASET', 'CLASET', 'ZLASET' ), - ('SLASWP', 'DLASWP', 'CLASWP', 'ZLASWP' ), - ('SLATRD', 'DLATRD', 'CLATRD', 'ZLATRD' ), - ('SLAUUM', 'DLAUUM', 'CLAUUM', 'ZLAUUM' ), - ('SPOSV', 'DPOSV', 'CPOSV', 'ZPOSV' ), - ('SSYSV', 'DSYSV', 'CSYSV', 'ZSYSV' ), - ('SPOSV', 'SPOSV', 'CPOSV', 'CPOSV' ), - ('SPOTRF', 'DPOTRF', 'CPOTRF', 'ZPOTRF' ), - ('SSYTRF', 'DSYTRF', 'CSYTRF', 'ZSYTRF' ), - ('SPOTRI', 'DPOTRI', 'CPOTRI', 'ZPOTRI' ), - ('SPOTRS', 'DPOTRS', 'CPOTRS', 'ZPOTRS' ), - ('SSYTRS', 'DSYTRS', 'CSYTRS', 'ZSYTRS' ), - ('SQPT01', 'DQPT01', 'CQPT01', 'ZQPT01' ), - ('SQRT02', 'DQRT02', 'CQRT02', 'ZQRT02' ), - ('SSSSSM', 'DSSSSM', 'CSSSSM', 'ZSSSSM' ), - ('SSTEBZ', 'DSTEBZ', 'SSTEBZ', 'DSTEBZ' ), - ('SSTEDC', 'DSTEDC', 'CSTEDC', 'ZSTEDC' ), - ('SSTEDX', 'DSTEDX', 'CSTEDX', 'ZSTEDX' ), - ('SSTEDX', 'DSTEDX', 'SSTEDX', 'DSTEDX' ), - ('SSTEIN', 'DSTEIN', 'CSTEIN', 'ZSTEIN' ), - ('SSTEMR', 'DSTEMR', 'CSTEMR', 'ZSTEMR' ), - ('SSTEQR', 'DSTEQR', 'CSTEQR', 'ZSTEQR' ), - ('SSTERF', 'DSTERF', 'SSTERF', 'DSTERF' ), - ('SSTERM', 'DSTERM', 'CSTERM', 'ZSTERM' ), - ('SSTT21', 'DSTT21', 'CSTT21', 'ZSTT21' ), - ('STREVC', 'DTREVC', 'CTREVC', 'ZTREVC' ), - ('STRTRI', 'DTRTRI', 'CTRTRI', 'ZTRTRI' ), - ('STSQRT', 'DTSQRT', 'CTSQRT', 'ZTSQRT' ), - ('STSTRF', 'DTSTRF', 'CTSTRF', 'ZTSTRF' ), - ('SUNGESV', 'SUNGESV', 'CUNGESV', 'CUNGESV' ), - ('SSTEGR', 'DSTEGR', 'CSTEGR', 'ZSTEGR' ), + ('', 'SBDSQR', 'DBDSQR', 'CBDSQR', 'ZBDSQR' ), + ('', 'SBDT01', 'DBDT01', 'CBDT01', 'ZBDT01' ), + ('', 'SCHECK', 'DCHECK', 'CCHECK', 'ZCHECK' ), + ('', 'SGEBAK', 'DGEBAK', 'CGEBAK', 'ZGEBAK' ), + ('', 'SGEBAL', 'DGEBAL', 'CGEBAL', 'ZGEBAL' ), + ('', 'SGEBD2', 'DGEBD2', 'CGEBD2', 'ZGEBD2' ), + ('', 'SGEBRD', 'DGEBRD', 'CGEBRD', 'ZGEBRD' ), + ('', 'SGEEV', 'DGEEV', 'CGEEV', 'ZGEEV' ), + ('', 'SGEHD2', 'DGEHD2', 'CGEHD2', 'ZGEHD2' ), + ('', 'SGEHRD', 'DGEHRD', 'CGEHRD', 'ZGEHRD' ), + ('', 'SGELQ2', 'DGELQ2', 'CGELQ2', 'ZGELQ2' ), + ('', 'SGELQF', 'DGELQF', 'CGELQF', 'ZGELQF' ), + ('', 'SGELQS', 'DGELQS', 'CGELQS', 'ZGELQS' ), + ('', 'SGELS', 'DGELS', 'CGELS', 'ZGELS' ), + ('', 'SGEQLF', 'DGEQLF', 'CGEQLF', 'ZGEQLF' ), + ('', 'SGEQP3', 'DGEQP3', 'CGEQP3', 'ZGEQP3' ), + ('', 'SGEQR2', 'DGEQR2', 'CGEQR2', 'ZGEQR2' ), + ('', 'SGEQRF', 'DGEQRF', 'CGEQRF', 'ZGEQRF' ), + ('', 'SGEQRS', 'DGEQRS', 'CGEQRS', 'ZGEQRS' ), + ('', 'SGESSM', 'DGESSM', 'CGESSM', 'ZGESSM' ), + ('', 'SGESV', 'DGESV', 'CGESV', 'ZGESV' ), + ('', 'SGESV', 'SGESV', 'CGESV', 'CGESV' ), + ('', 'SGET22', 'DGET22', 'CGET22', 'ZGET22' ), + ('', 'SGETF2', 'DGETF2', 'CGETF2', 'ZGETF2' ), + ('', 'SGETRF', 'DGETRF', 'CGETRF', 'ZGETRF' ), + ('', 'SGETRI', 'DGETRI', 'CGETRI', 'ZGETRI' ), + ('', 'SGETRL', 'DGETRL', 'CGETRL', 'ZGETRL' ), + ('', 'SGETRS', 'DGETRS', 'CGETRS', 'ZGETRS' ), + ('', 'SHSEQR', 'DHSEQR', 'CHSEQR', 'ZHSEQR' ), + ('', 'SHST01', 'DHST01', 'CHST01', 'ZHST01' ), + ('', 'SLABAD', 'DLABAD', 'SLABAD', 'DLABAD' ), + ('', 'SLABRD', 'DLABRD', 'CLABRD', 'ZLABRD' ), + ('', 'SLACGV', 'DLACGV', 'CLACGV', 'ZLACGV' ), + ('', 'SLACPY', 'DLACPY', 'CLACPY', 'ZLACPY' ), + ('', 'SLAED', 'DLAED', 'SLAED', 'DLAED' ), + ('', 'SLAEX', 'DLAEX', 'SLAEX', 'DLAEX' ), + ('', 'SLAGSY', 'DLAGSY', 'CLAGSY', 'ZLAGSY' ), + ('', 'SLAHR', 'DLAHR', 'CLAHR', 'ZLAHR' ), + ('', 'SLAMC3', 'DLAMC3', 'SLAMC3', 'DLAMC3' ), + ('', 'SLAMCH', 'DLAMCH', 'SLAMCH', 'DLAMCH' ), + ('', 'SLAMRG', 'DLAMRG', 'SLAMRG', 'DLAMRG' ), + ('', 'SLANGE', 'DLANGE', 'CLANGE', 'ZLANGE' ), + ('', 'SLANST', 'DLANST', 'CLANHT', 'ZLANHT' ), + ('', 'SLANSY', 'DLANSY', 'CLANSY', 'ZLANSY' ), + ('', 'SLANTR', 'DLANTR', 'CLANTR', 'ZLANTR' ), + ('', 'SLAQPS', 'DLAQPS', 'CLAQPS', 'ZLAQPS' ), + ('', 'SLAQP2', 'DLAQP2', 'CLAQP2', 'ZLAQP2' ), + ('', 'SLARFB', 'DLARFB', 'CLARFB', 'ZLARFB' ), + ('', 'SLARFG', 'DLARFG', 'CLARFG', 'ZLARFG' ), + ('', 'SLARFT', 'DLARFT', 'CLARFT', 'ZLARFT' ), + ('', 'SLARFX', 'DLARFX', 'CLARFX', 'ZLARFX' ), + ('', 'SLARFY', 'DLARFY', 'CLARFY', 'ZLARFY' ), + ('', 'SLARNV', 'DLARNV', 'CLARNV', 'ZLARNV' ), + ('', 'SLARNV', 'DLARNV', 'SLARNV', 'DLARNV' ), + ('', 'SLARTG', 'DLARTG', 'CLARTG', 'ZLARTG' ), + ('', 'SLASCL', 'DLASCL', 'CLASCL', 'ZLASCL' ), + ('', 'SLASET', 'DLASET', 'CLASET', 'ZLASET' ), + ('', 'SLASWP', 'DLASWP', 'CLASWP', 'ZLASWP' ), + ('', 'SLATRD', 'DLATRD', 'CLATRD', 'ZLATRD' ), + ('', 'SLAUUM', 'DLAUUM', 'CLAUUM', 'ZLAUUM' ), + ('', 'SPOSV', 'DPOSV', 'CPOSV', 'ZPOSV' ), + ('', 'SSYSV', 'DSYSV', 'CSYSV', 'ZSYSV' ), + ('', 'SPOSV', 'SPOSV', 'CPOSV', 'CPOSV' ), + ('', 'SPOTRF', 'DPOTRF', 'CPOTRF', 'ZPOTRF' ), + ('', 'SPOTRF', 'DPOTRF', 'CPXTRF', 'ZPXTRF' ), + ('', 'SSYTRF', 'DSYTRF', 'CSYTRF', 'ZSYTRF' ), + ('', 'SPOTRI', 'DPOTRI', 'CPOTRI', 'ZPOTRI' ), + ('', 'SPOTRS', 'DPOTRS', 'CPOTRS', 'ZPOTRS' ), + ('', 'SSYTRS', 'DSYTRS', 'CSYTRS', 'ZSYTRS' ), + ('', 'SQPT01', 'DQPT01', 'CQPT01', 'ZQPT01' ), + ('', 'SQRT02', 'DQRT02', 'CQRT02', 'ZQRT02' ), + ('', 'SSSSSM', 'DSSSSM', 'CSSSSM', 'ZSSSSM' ), + ('', 'SSTEBZ', 'DSTEBZ', 'SSTEBZ', 'DSTEBZ' ), + ('', 'SSTEDC', 'DSTEDC', 'CSTEDC', 'ZSTEDC' ), + ('', 'SSTEDX', 'DSTEDX', 'CSTEDX', 'ZSTEDX' ), + ('', 'SSTEDX', 'DSTEDX', 'SSTEDX', 'DSTEDX' ), + ('', 'SSTEIN', 'DSTEIN', 'CSTEIN', 'ZSTEIN' ), + ('', 'SSTEMR', 'DSTEMR', 'CSTEMR', 'ZSTEMR' ), + ('', 'SSTEQR', 'DSTEQR', 'CSTEQR', 'ZSTEQR' ), + ('', 'SSTERF', 'DSTERF', 'SSTERF', 'DSTERF' ), + ('', 'SSTERM', 'DSTERM', 'CSTERM', 'ZSTERM' ), + ('', 'SSTT21', 'DSTT21', 'CSTT21', 'ZSTT21' ), + ('', 'STREVC', 'DTREVC', 'CTREVC', 'ZTREVC' ), + ('', 'STRTRI', 'DTRTRI', 'CTRTRI', 'ZTRTRI' ), + ('', 'STSQRT', 'DTSQRT', 'CTSQRT', 'ZTSQRT' ), + ('', 'STSTRF', 'DTSTRF', 'CTSTRF', 'ZTSTRF' ), + ('', 'SUNGESV', 'SUNGESV', 'CUNGESV', 'CUNGESV' ), + ('', 'SSTEGR', 'DSTEGR', 'CSTEGR', 'ZSTEGR' ), # ----- BLAS AND LAPACK, WHERE COMPLEX BASE NAME != REAL BASE NAME # BLAS, WITH PRECISION - ('SDOT', 'DDOT', 'CDOTC', 'ZDOTC' ), - ('SDOT_SUB', 'DDOT_SUB', 'CDOTC_SUB', 'ZDOTC_SUB' ), - ('SDOT_SUB', 'DDOT_SUB', 'CDOTU_SUB', 'ZDOTU_SUB' ), - ('SGER', 'DGER', 'CGERC', 'ZGERC' ), - ('SGER', 'DGER', 'CGERU', 'ZGERU' ), - ('SNRM2', 'DNRM2', 'SCNRM2', 'DZNRM2' ), - ('SSYMM', 'DSYMM', 'CHEMM', 'ZHEMM' ), - ('SSYMV', 'DSYMV', 'CHEMV', 'ZHEMV' ), - ('SSYR2', 'DSYR2', 'CHER2', 'ZHER2' ), - ('SSYR2K', 'DSYR2K', 'CHER2K', 'ZHER2K' ), - ('SSYRK', 'DSYRK', 'CHERK', 'ZHERK' ), - ('SSYR', 'DSYR', 'CHER', 'ZHER' ), + ('', 'SDOT', 'DDOT', 'CDOTC', 'ZDOTC' ), + ('', 'SDOT', 'DDOT', 'CDOTU', 'ZDOTU' ), + ('', 'SGER', 'DGER', 'CGERC', 'ZGERC' ), + ('', 'SGER', 'DGER', 'CGERU', 'ZGERU' ), + ('', 'SNRM2', 'DNRM2', 'SCNRM2', 'DZNRM2' ), + ('', 'SSYMM', 'DSYMM', 'CHEMM', 'ZHEMM' ), + ('', 'SSYMV', 'DSYMV', 'CHEMV', 'ZHEMV' ), + ('', 'SSYR2', 'DSYR2', 'CHER2', 'ZHER2' ), + ('', 'SSYR2K', 'DSYR2K', 'CHER2K', 'ZHER2K' ), + ('', 'SSYRK', 'DSYRK', 'CHERK', 'ZHERK' ), + ('', 'SSYR', 'DSYR', 'CHER', 'ZHER' ), # LAPACK, WITH PRECISION - ('SLAG2D', 'DLAG2S', 'CLAG2Z', 'ZLAG2C' ), - ('SLAGSY', 'DLAGSY', 'CLAGHE', 'ZLAGHE' ), - ('SLASYF', 'DLASYF', 'CLAHEF', 'ZLAHEF' ), - ('SLANSY', 'DLANSY', 'CLANHE', 'ZLANHE' ), - ('SLAVSY', 'DLAVSY', 'CLAVHE', 'ZLAVHE' ), - ('SORG2R', 'DORG2R', 'CUNG2R', 'ZUNG2R' ), - ('SORGBR', 'DORGBR', 'CUNGBR', 'ZUNGBR' ), - ('SORGHR', 'DORGHR', 'CUNGHR', 'ZUNGHR' ), - ('SORGLQ', 'DORGLQ', 'CUNGLQ', 'ZUNGLQ' ), - ('SORGQL', 'DORGQL', 'CUNGQL', 'ZUNGQL' ), - ('SORGQR', 'DORGQR', 'CUNGQR', 'ZUNGQR' ), - ('SORGTR', 'DORGTR', 'CUNGTR', 'ZUNGTR' ), - ('SORM2R', 'DORM2R', 'CUNM2R', 'ZUNM2R' ), - ('SORMBR', 'DORMBR', 'CUNMBR', 'ZUNMBR' ), - ('SORMLQ', 'DORMLQ', 'CUNMLQ', 'ZUNMLQ' ), - ('SORMQL', 'DORMQL', 'CUNMQL', 'ZUNMQL' ), - ('SORMQR', 'DORMQR', 'CUNMQR', 'ZUNMQR' ), - ('SORMR2', 'DORMR2', 'CUNMR2', 'ZUNMR2' ), - ('SORMTR', 'DORMTR', 'CUNMTR', 'ZUNMTR' ), - ('SORT01', 'DORT01', 'CUNT01', 'ZUNT01' ), - ('SPLGSY', 'DPLGSY', 'CPLGHE', 'ZPLGHE' ), - ('SSBTRD', 'DSBTRD', 'CHBTRD', 'ZHBTRD' ), - ('SSYBBD', 'DSYBBD', 'CHEBBD', 'ZHEBBD' ), - ('SSYEV', 'DSYEV', 'CHEEV', 'ZHEEV' ), - ('SSYEVD', 'DSYEVD', 'CHEEVD', 'ZHEEVD' ), - ('SSYGS2', 'DSYGS2', 'CHEGS2', 'ZHEGS2' ), - ('SSYGST', 'DSYGST', 'CHEGST', 'ZHEGST' ), - ('SSYGVD', 'DSYGVD', 'CHEGVD', 'ZHEGVD' ), - ('SSYGVR', 'DSYGVR', 'CHEGVR', 'ZHEGVR' ), - ('SSYGVX', 'DSYGVX', 'CHEGVX', 'ZHEGVX' ), - ('SSYT21', 'DSYT21', 'CHET21', 'ZHET21' ), - ('SSYTD2', 'DSYTD2', 'CHETD2', 'ZHETD2' ), - ('SSYTRD', 'DSYTRD', 'CHETRD', 'ZHETRD' ), - ('SSYTRF', 'DSYTRF', 'CHETRF', 'ZHETRF' ), + ('', 'SLAG2D', 'DLAG2S', 'CLAG2Z', 'ZLAG2C' ), + ('', 'SLAGSY', 'DLAGSY', 'CLAGHE', 'ZLAGHE' ), + ('', 'SLASYF', 'DLASYF', 'CLAHEF', 'ZLAHEF' ), + ('', 'SLANSY', 'DLANSY', 'CLANHE', 'ZLANHE' ), + ('', 'SLAVSY', 'DLAVSY', 'CLAVHE', 'ZLAVHE' ), + ('', 'SORG2R', 'DORG2R', 'CUNG2R', 'ZUNG2R' ), + ('', 'SORGBR', 'DORGBR', 'CUNGBR', 'ZUNGBR' ), + ('', 'SORGHR', 'DORGHR', 'CUNGHR', 'ZUNGHR' ), + ('', 'SORGLQ', 'DORGLQ', 'CUNGLQ', 'ZUNGLQ' ), + ('', 'SORGQL', 'DORGQL', 'CUNGQL', 'ZUNGQL' ), + ('', 'SORGQR', 'DORGQR', 'CUNGQR', 'ZUNGQR' ), + ('', 'SORGTR', 'DORGTR', 'CUNGTR', 'ZUNGTR' ), + ('', 'SORM2R', 'DORM2R', 'CUNM2R', 'ZUNM2R' ), + ('', 'SORMBR', 'DORMBR', 'CUNMBR', 'ZUNMBR' ), + ('', 'SORMLQ', 'DORMLQ', 'CUNMLQ', 'ZUNMLQ' ), + ('', 'SORMQL', 'DORMQL', 'CUNMQL', 'ZUNMQL' ), + ('', 'SORMQR', 'DORMQR', 'CUNMQR', 'ZUNMQR' ), + ('', 'SORMR2', 'DORMR2', 'CUNMR2', 'ZUNMR2' ), + ('', 'SORMTR', 'DORMTR', 'CUNMTR', 'ZUNMTR' ), + ('', 'SORT01', 'DORT01', 'CUNT01', 'ZUNT01' ), + ('', 'SPLGSY', 'DPLGSY', 'CPLGHE', 'ZPLGHE' ), + ('', 'SSBTRD', 'DSBTRD', 'CHBTRD', 'ZHBTRD' ), + ('', 'SSYBBD', 'DSYBBD', 'CHEBBD', 'ZHEBBD' ), + ('', 'SSYEV', 'DSYEV', 'CHEEV', 'ZHEEV' ), + ('', 'SSYEVD', 'DSYEVD', 'CHEEVD', 'ZHEEVD' ), + ('', 'SSYGS2', 'DSYGS2', 'CHEGS2', 'ZHEGS2' ), + ('', 'SSYGST', 'DSYGST', 'CHEGST', 'ZHEGST' ), + ('', 'SSYGVD', 'DSYGVD', 'CHEGVD', 'ZHEGVD' ), + ('', 'SSYGVR', 'DSYGVR', 'CHEGVR', 'ZHEGVR' ), + ('', 'SSYGVX', 'DSYGVX', 'CHEGVX', 'ZHEGVX' ), + ('', 'SSYT21', 'DSYT21', 'CHET21', 'ZHET21' ), + ('', 'SSYTD2', 'DSYTD2', 'CHETD2', 'ZHETD2' ), + ('', 'SSYTRD', 'DSYTRD', 'CHETRD', 'ZHETRD' ), + ('', 'SSYTRF', 'DSYTRF', 'CHETRF', 'ZHETRF' ), # BLAS, WITHOUT PRECISION # MUST BE AFTER BLAS WITH PRECISION # EX: CUBLASZHEMM -> CUBLASSHEMM -> CUBLASSSYMM - ('DOT', 'DOT', 'DOTC', 'DOTC' ), - ('DOT_SUB', 'DOT_SUB', 'DOTC_SUB', 'DOTC_SUB' ), - ('DOT_SUB', 'DOT_SUB', 'DOTU_SUB', 'DOTU_SUB' ), - ('GER', 'GER', 'GERC', 'GERC' ), - ('GER', 'GER', 'GERU', 'GERU' ), - ('NRM2', 'NRM2', 'CNRM2', 'ZNRM2' ), # DZNRM2 -> DNRM2 - ('SYMM', 'SYMM', 'HEMM', 'HEMM' ), - ('SYMV', 'SYMV', 'HEMV', 'HEMV' ), - ('SYR2', 'SYR2', 'HER2', 'HER2' ), - ('SYR2K', 'SYR2K', 'HER2K', 'HER2K' ), - ('SYRK', 'SYRK', 'HERK', 'HERK' ), + ('', 'DOT', 'DOT', 'DOTC', 'DOTC' ), + ('', 'DOT', 'DOT', 'DOTU', 'DOTU' ), + ('', 'GER', 'GER', 'GERC', 'GERC' ), + ('', 'GER', 'GER', 'GERU', 'GERU' ), + ('', 'NRM2', 'NRM2', 'CNRM2', 'ZNRM2' ), # DZNRM2 -> DNRM2 + ('', 'SYMM', 'SYMM', 'HEMM', 'HEMM' ), + ('', 'SYMV', 'SYMV', 'HEMV', 'HEMV' ), + ('', 'SYR2', 'SYR2', 'HER2', 'HER2' ), + ('', 'SYR2K', 'SYR2K', 'HER2K', 'HER2K' ), + ('', 'SYRK', 'SYRK', 'HERK', 'HERK' ), # LAPACK, WITHOUT PRECISION - ('LAG2D', 'LAG2S', 'LAG2Z', 'LAG2C' ), - ('LAGSY', 'LAGSY', 'LAGHE', 'LAGHE' ), - ('LASYF', 'LASYF', 'LAHEF', 'LAHEF' ), - ('LANSY', 'LANSY', 'LANHE', 'LANHE' ), - ('LAVSY', 'LAVSY', 'LAVHE', 'LAVHE' ), - ('ORG2R', 'ORG2R', 'UNG2R', 'UNG2R' ), - ('ORGBR', 'ORGBR', 'UNGBR', 'UNGBR' ), - ('ORGHR', 'ORGHR', 'UNGHR', 'UNGHR' ), - ('ORGLQ', 'ORGLQ', 'UNGLQ', 'UNGLQ' ), - ('ORGQL', 'ORGQL', 'UNGQL', 'UNGQL' ), - ('ORGQR', 'ORGQR', 'UNGQR', 'UNGQR' ), - ('ORGTR', 'ORGTR', 'UNGTR', 'UNGTR' ), - ('ORM2R', 'ORM2R', 'UNM2R', 'UNM2R' ), - ('ORMBR', 'ORMBR', 'UNMBR', 'UNMBR' ), - ('ORMLQ', 'ORMLQ', 'UNMLQ', 'UNMLQ' ), - ('ORMQL', 'ORMQL', 'UNMQL', 'UNMQL' ), - ('ORMQR', 'ORMQR', 'UNMQR', 'UNMQR' ), - ('ORMR2', 'ORMR2', 'UNMR2', 'UNMR2' ), - ('ORMTR', 'ORMTR', 'UNMTR', 'UNMTR' ), - ('ORT01', 'ORT01', 'UNT01', 'UNT01' ), - ('PLGSY', 'PLGSY', 'PLGHE', 'PLGHE' ), - ('SBTRD', 'SBTRD', 'HBTRD', 'HBTRD' ), - ('SYBBD', 'SYBBD', 'HEBBD', 'HEBBD' ), - ('SYEV', 'SYEV', 'HEEV', 'HEEV' ), - ('SYEVD', 'SYEVD', 'HEEVD', 'HEEVD' ), - ('SYGS2', 'SYGS2', 'HEGS2', 'HEGS2' ), - ('SYGST', 'SYGST', 'HEGST', 'HEGST' ), - ('SYGVD', 'SYGVD', 'HEGVD', 'HEGVD' ), - ('SYGVR', 'SYGVR', 'HEGVR', 'HEGVR' ), - ('SYGVX', 'SYGVX', 'HEGVX', 'HEGVX' ), - ('SYT21', 'SYT21', 'HET21', 'HET21' ), - ('SYTD2', 'SYTD2', 'HETD2', 'HETD2' ), - ('SYTRD', 'SYTRD', 'HETRD', 'HETRD' ), - ('SYTRF', 'SYTRF', 'HETRF', 'HETRF' ), + ('', 'LAG2D', 'LAG2S', 'LAG2Z', 'LAG2C' ), + ('', 'LAGSY', 'LAGSY', 'LAGHE', 'LAGHE' ), + ('', 'LASYF', 'LASYF', 'LAHEF', 'LAHEF' ), + ('', 'LANSY', 'LANSY', 'LANHE', 'LANHE' ), + ('', 'LAVSY', 'LAVSY', 'LAVHE', 'LAVHE' ), + ('', 'ORG2R', 'ORG2R', 'UNG2R', 'UNG2R' ), + ('', 'ORGBR', 'ORGBR', 'UNGBR', 'UNGBR' ), + ('', 'ORGHR', 'ORGHR', 'UNGHR', 'UNGHR' ), + ('', 'ORGLQ', 'ORGLQ', 'UNGLQ', 'UNGLQ' ), + ('', 'ORGQL', 'ORGQL', 'UNGQL', 'UNGQL' ), + ('', 'ORGQR', 'ORGQR', 'UNGQR', 'UNGQR' ), + ('', 'ORGTR', 'ORGTR', 'UNGTR', 'UNGTR' ), + ('', 'ORM2R', 'ORM2R', 'UNM2R', 'UNM2R' ), + ('', 'ORMBR', 'ORMBR', 'UNMBR', 'UNMBR' ), + ('', 'ORMLQ', 'ORMLQ', 'UNMLQ', 'UNMLQ' ), + ('', 'ORMQL', 'ORMQL', 'UNMQL', 'UNMQL' ), + ('', 'ORMQR', 'ORMQR', 'UNMQR', 'UNMQR' ), + ('', 'ORMR2', 'ORMR2', 'UNMR2', 'UNMR2' ), + ('', 'ORMTR', 'ORMTR', 'UNMTR', 'UNMTR' ), + ('', 'ORT01', 'ORT01', 'UNT01', 'UNT01' ), + ('', 'PLGSY', 'PLGSY', 'PLGHE', 'PLGHE' ), + ('', 'SBTRD', 'SBTRD', 'HBTRD', 'HBTRD' ), + ('', 'SYBBD', 'SYBBD', 'HEBBD', 'HEBBD' ), + ('', 'SYEV', 'SYEV', 'HEEV', 'HEEV' ), + ('', 'SYEVD', 'SYEVD', 'HEEVD', 'HEEVD' ), + ('', 'SYGS2', 'SYGS2', 'HEGS2', 'HEGS2' ), + ('', 'SYGST', 'SYGST', 'HEGST', 'HEGST' ), + ('', 'SYGVD', 'SYGVD', 'HEGVD', 'HEGVD' ), + ('', 'SYGVR', 'SYGVR', 'HEGVR', 'HEGVR' ), + ('', 'SYGVX', 'SYGVX', 'HEGVX', 'HEGVX' ), + ('', 'SYT21', 'SYT21', 'HET21', 'HET21' ), + ('', 'SYTD2', 'SYTD2', 'HETD2', 'HETD2' ), + ('', 'SYTRD', 'SYTRD', 'HETRD', 'HETRD' ), + ('', 'SYTRF', 'SYTRF', 'HETRF', 'HETRF' ), # QUARK codelets protection (to prevent conversion with LAPACK WITH PRECISION) - ('DAG_CORE_UNG2R', 'DAG_CORE_UNG2R', 'DAG_CORE_UNG2R', 'DAG_CORE_U-NG2R' ), - ('DAG_CORE_UNGBR', 'DAG_CORE_UNGBR', 'DAG_CORE_UNGBR', 'DAG_CORE_U-NGBR' ), - ('DAG_CORE_UNGHR', 'DAG_CORE_UNGHR', 'DAG_CORE_UNGHR', 'DAG_CORE_U-NGHR' ), - ('DAG_CORE_UNGLQ', 'DAG_CORE_UNGLQ', 'DAG_CORE_UNGLQ', 'DAG_CORE_U-NGLQ' ), - ('DAG_CORE_UNGQL', 'DAG_CORE_UNGQL', 'DAG_CORE_UNGQL', 'DAG_CORE_U-NGQL' ), - ('DAG_CORE_UNGQR', 'DAG_CORE_UNGQR', 'DAG_CORE_UNGQR', 'DAG_CORE_U-NGQR' ), - ('DAG_CORE_UNGTR', 'DAG_CORE_UNGTR', 'DAG_CORE_UNGTR', 'DAG_CORE_U-NGTR' ), - ('DAG_CORE_UNM2R', 'DAG_CORE_UNM2R', 'DAG_CORE_UNM2R', 'DAG_CORE_U-NM2R' ), - ('DAG_CORE_UNMBR', 'DAG_CORE_UNMBR', 'DAG_CORE_UNMBR', 'DAG_CORE_U-NMBR' ), - ('DAG_CORE_UNMLQ', 'DAG_CORE_UNMLQ', 'DAG_CORE_UNMLQ', 'DAG_CORE_U-NMLQ' ), - ('DAG_CORE_UNMQL', 'DAG_CORE_UNMQL', 'DAG_CORE_UNMQL', 'DAG_CORE_U-NMQL' ), - ('DAG_CORE_UNMQR', 'DAG_CORE_UNMQR', 'DAG_CORE_UNMQR', 'DAG_CORE_U-NMQR' ), + ('', 'DAG_CORE_UNG2R', 'DAG_CORE_UNG2R', 'DAG_CORE_UNG2R', 'DAG_CORE_U-NG2R' ), + ('', 'DAG_CORE_UNGBR', 'DAG_CORE_UNGBR', 'DAG_CORE_UNGBR', 'DAG_CORE_U-NGBR' ), + ('', 'DAG_CORE_UNGHR', 'DAG_CORE_UNGHR', 'DAG_CORE_UNGHR', 'DAG_CORE_U-NGHR' ), + ('', 'DAG_CORE_UNGLQ', 'DAG_CORE_UNGLQ', 'DAG_CORE_UNGLQ', 'DAG_CORE_U-NGLQ' ), + ('', 'DAG_CORE_UNGQL', 'DAG_CORE_UNGQL', 'DAG_CORE_UNGQL', 'DAG_CORE_U-NGQL' ), + ('', 'DAG_CORE_UNGQR', 'DAG_CORE_UNGQR', 'DAG_CORE_UNGQR', 'DAG_CORE_U-NGQR' ), + ('', 'DAG_CORE_UNGTR', 'DAG_CORE_UNGTR', 'DAG_CORE_UNGTR', 'DAG_CORE_U-NGTR' ), + ('', 'DAG_CORE_UNM2R', 'DAG_CORE_UNM2R', 'DAG_CORE_UNM2R', 'DAG_CORE_U-NM2R' ), + ('', 'DAG_CORE_UNMBR', 'DAG_CORE_UNMBR', 'DAG_CORE_UNMBR', 'DAG_CORE_U-NMBR' ), + ('', 'DAG_CORE_UNMLQ', 'DAG_CORE_UNMLQ', 'DAG_CORE_UNMLQ', 'DAG_CORE_U-NMLQ' ), + ('', 'DAG_CORE_UNMQL', 'DAG_CORE_UNMQL', 'DAG_CORE_UNMQL', 'DAG_CORE_U-NMQL' ), + ('', 'DAG_CORE_UNMQR', 'DAG_CORE_UNMQR', 'DAG_CORE_UNMQR', 'DAG_CORE_U-NMQR' ), # PaStiX - ('sutils.h', 'dutils.h', 'cutils.h', 'zutils.h' ), - ('SMURGE_', 'DMURGE_', 'CMURGE_', 'ZMURGE_' ), - ('smurge_', 'dmurge_', 'cmurge_', 'zmurge_' ), - ('smurge.h', 'dmurge.h', 'cmurge.h', 'zmurge.h' ), - ('smurge.inc', 'dmurge.inc', 'cmurge.inc', 'zmurge.inc' ), - ('smurge.c', 'dmurge.c', 'cmurge.c', 'zmurge.c' ), - ('ssimple', 'dsimple', 'csimple', 'zsimple' ), - ('sstep-by-step', 'dstep-by-step', 'cstep-by-step', 'zstep-by-step' ), - ('starpu_s', 'starpu_d', 'starpu_c', 'starpu_z' ), - ('STARPU_S', 'STARPU_D', 'STARPU_C', 'STARPU_Z' ), - ('pastix_s', 'pastix_d', 'pastix_c', 'pastix_z' ), - ('s_', 'd_', 'c_', 'z_' ), - ('S_', 'D_', 'C_', 'Z_' ), - ('FLT_EPSILON', 'DBL_EPSILON', 'FLT_EPSILON', 'DBL_EPSILON' ), - ('s_RAFF_FLOAT', 'd_RAFF_FLOAT', 'c_RAFF_FLOAT', 'z_RAFF_FLOAT' ), - ('MPI_FLOAT', 'MPI_DOUBLE', 'MPI_COMPLEX', 'MPI_DOUBLE_COMPLEX'), - ('MPI_FLOAT', 'MPI_DOUBLE', 'MPI_FLOAT', 'MPI_DOUBLE' ), + ('', 'sutils.h', 'dutils.h', 'cutils.h', 'zutils.h' ), + ('', 'SMURGE_', 'DMURGE_', 'CMURGE_', 'ZMURGE_' ), + ('', 'smurge_', 'dmurge_', 'cmurge_', 'zmurge_' ), + ('', 'smurge.h', 'dmurge.h', 'cmurge.h', 'zmurge.h' ), + ('', 'smurge.inc', 'dmurge.inc', 'cmurge.inc', 'zmurge.inc' ), + ('', 'smurge.c', 'dmurge.c', 'cmurge.c', 'zmurge.c' ), + ('', 'ssimple', 'dsimple', 'csimple', 'zsimple' ), + ('', 'sstep-by-step', 'dstep-by-step', 'cstep-by-step', 'zstep-by-step' ), + ('', 'starpu_s', 'starpu_d', 'starpu_c', 'starpu_z' ), + ('', 'STARPU_S', 'STARPU_D', 'STARPU_C', 'STARPU_Z' ), + ('', 'pastix_s', 'pastix_d', 'pastix_c', 'pastix_z' ), + ('', 'PASTIX_S', 'PASTIX_D', 'PASTIX_C', 'PASTIX_Z' ), + ('', 's_', 'd_', 'c_', 'z_' ), + ('', 'S_', 'D_', 'C_', 'Z_' ), + ('', 'FLT_EPSILON', 'DBL_EPSILON', 'FLT_EPSILON', 'DBL_EPSILON' ), + ('', 's_RAFF_FLOAT', 'd_RAFF_FLOAT', 'c_RAFF_FLOAT', 'z_RAFF_FLOAT' ), + ('', 'MPI_FLOAT', 'MPI_DOUBLE', 'MPI_COMPLEX', 'MPI_DOUBLE_COMPLEX'), + ('', 'MPI_FLOAT', 'MPI_DOUBLE', 'MPI_FLOAT', 'MPI_DOUBLE' ), # ----- unused? - ('s_check', 'd_check', 'c_check', 'z_check' ), - ('s_get_idparm', 'd_get_idparm', 's_get_idparm', 'd_get_idparm', ), - #('stesting', 'dtesting', 'ctesting', 'ztesting' ), - #('SAUXILIARY', 'DAUXILIARY', 'CAUXILIARY', 'ZAUXILIARY' ), + ('', 's_check', 'd_check', 'c_check', 'z_check' ), + ('', 's_get_idparm', 'd_get_idparm', 's_get_idparm', 'd_get_idparm', ), + #('', 'stesting', 'dtesting', 'ctesting', 'ztesting' ), + #('', 'SAUXILIARY', 'DAUXILIARY', 'CAUXILIARY', 'ZAUXILIARY' ), # BUILD - ('sbuild', 'dbuild', 'cbuild', 'zbuild' ), + ('', 'sbuild', 'dbuild', 'cbuild', 'zbuild' ), ],