Commits (14)
......@@ -10,5 +10,5 @@ Find:
- cd modules/find/tests
- mkdir -p build
- cd build
- cmake .. -DENABLE_CTEST=ON -DQUARK_COMPONENTS="HWLOC" -DPASTIX_COMPONENTS="PARSEC;STARPU"
- cmake .. -DENABLE_CTEST=ON -DLAPACKE_COMPONENTS="TMG" -DQUARK_COMPONENTS="HWLOC" -DPASTIX_COMPONENTS="PARSEC;STARPU"
- ctest -V
......@@ -32,10 +32,14 @@ CMake project and include the MorseInit module:
list(APPEND CMAKE_MODULE_PATH "${MORSE_CMAKE_MODULE_PATH}/modules/" )
# Include the init module
include(MorseInit)
#
We recommend to use this project as a `git submodule` of your project.
Testing
---------------------
See the file [README](modules/find/tests/README.md).
Get involved!
---------------------
......
This diff is collapsed.
......@@ -44,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_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()
......@@ -84,10 +85,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
......@@ -197,7 +197,7 @@ 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}")
else()
......@@ -209,7 +209,7 @@ 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}")
else()
......@@ -231,7 +231,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()
......@@ -240,7 +240,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()
......@@ -252,7 +252,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()
......@@ -261,7 +261,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()
......@@ -309,83 +309,64 @@ 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_FOUND)
set(BLASEXT_FOUND ${BLAS_FOUND})
endif()
if (BLAS_LIBRARIES)
set(BLASEXT_LIBRARIES ${BLAS_LIBRARIES})
endif()
......
......@@ -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
......
......@@ -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)
......
......@@ -44,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()
......@@ -61,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 ()
......@@ -155,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)
......@@ -177,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)
......@@ -189,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)
......@@ -204,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)
......@@ -239,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}")
......@@ -278,84 +269,64 @@ 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")
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
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_FOUND)
set(LAPACKEXT_FOUND ${LAPACK_FOUND})
endif()
if (LAPACK_LIBRARIES)
set(LAPACKEXT_LIBRARIES ${LAPACK_LIBRARIES})
endif()
......
......@@ -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}")
......
......@@ -9,6 +9,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../")
set(PACKAGES "" CACHE STRING "List of packages to find, ex: BLAS;STARPU;PASTIX")
# specific components to look for with packages
set(LAPACKE_COMPONENTS "" CACHE STRING "List of specific dependencies to look for with LAPACKE, ex: TMG")
set(QUARK_COMPONENTS "" CACHE STRING "List of specific dependencies to look for with QUARK, ex: HWLOC")
set(PASTIX_COMPONENTS "" CACHE STRING "List of specific dependencies to look for with PASTIX, ex: MPI;SEQ;STARPU;STARPU_CUDA;STARPU_FXT;SCOTCH;PTSCOTCH;METIS")
set(PETSC_COMPONENTS "" CACHE STRING "List of specific dependencies to look for with PETSc, ex: CXX|C")
......@@ -34,16 +35,25 @@ foreach(_library ${PACKAGES})
else()
message(WARNING "${_library}_LIBRARIES not found: ${${_library}_LIBRARIES}")
endif()
if (${_library}_LIBRARIES_DEP)
message(STATUS "${_library}_LIBRARIES_DEP found: ${${_library}_LIBRARIES_DEP}")
endif()
if (${_library}_LIBRARY_DIRS)
message(STATUS "${_library}_LIBRARY_DIRS found: ${${_library}_LIBRARY_DIRS}")
else()
message(WARNING "${_library}_LIBRARY_DIRS not found: ${${_library}_LIBRARY_DIRS}")
endif()
if (${_library}_LIBRARY_DIRS_DEP)
message(STATUS "${_library}_LIBRARY_DIRS_DEP found: ${${_library}_LIBRARY_DIRS_DEP}")
endif()
if (${_library}_INCLUDE_DIRS)
message(STATUS "${_library}_INCLUDE_DIRS found: ${${_library}_INCLUDE_DIRS}")
else()
message(WARNING "${_library}_INCLUDE_DIRS not found: ${${_library}_INCLUDE_DIRS}")
endif()
if (${_library}_INCLUDE_DIRS_DEP)
message(STATUS "${_library}_INCLUDE_DIRS_DEP found: ${${_library}_INCLUDE_DIRS_DEP}")
endif()
else()
message(FATAL_ERROR "${_library} NOT FOUND !!")
endif()
......
Test MORSE CMake modules
========================
Procedure to test the `find_package` modules hosted in `modules/find`
```
git clone https://gitlab.inria.fr/solverstack/morse_cmake.git
cd morse_cmake/modules/find/tests
mkdir build
cd build
# to test all the packages, e.g.
cmake .. -DENABLE_CTEST=ON
# to test some only, e.g.
cmake .. -DPACKAGES="HWLOC;STARPU;PASTIX"
# to enable some components in some find, e.g. here we look for QUARK linked with HWLOC and PASTIX with PARSEC and STARPU
cmake .. -DENABLE_CTEST=ON -DQUARK_COMPONENTS="HWLOC" -DPASTIX_COMPONENTS="PARSEC;STARPU"
```
......@@ -628,6 +628,7 @@ subs = {
('', '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' ),
......