Maj terminée. Pour consulter la release notes associée voici le lien :
https://about.gitlab.com/releases/2021/07/07/critical-security-release-gitlab-14-0-4-released/

Commit f7592114 authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

add PARSEC in possible components

parent 6f52fd65
......@@ -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, STARPU, STARPU_CUDA, SCOTCH, PTSCOTCH, METIS)? "
"See the explanation in FindPASTIX.cmake.")
endif()
endif()
set(CMAKE_REQUIRED_INCLUDES)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment