Commit 640e8a7b authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

fix mumps cmake for openmp

parent 0659028d
......@@ -34,6 +34,8 @@ set(CMAKE_C_STANDARD 99)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(MUMPS_PACH_COMMAND "")
if(${CMAKE_VERSION} VERSION_LESS "3.20.0")
set(MUMPS_PATCH_COMMAND patch -p1 < ${PROJECT_SOURCE_DIR}/cmake/CMakeMumpsPre3.20.diff)
else()
set(MUMPS_PATCH_COMMAND patch -p1 < ${PROJECT_SOURCE_DIR}/cmake/CMakeMumps.diff)
endif()
if(BUILD_MUMPS)
......
diff -ruN mumps/CMakeLists.txt mumps-ok/CMakeLists.txt
--- mumps/CMakeLists.txt 2021-10-04 14:31:04.000000000 +0000
+++ mumps-ok/CMakeLists.txt 2021-10-08 14:38:20.823214013 +0000
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.20...3.21)
+cmake_minimum_required(VERSION 3.0...3.21)
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/VERSION PROJECT_VERSION
REGEX "^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)" LIMIT_INPUT 16 LENGTH_MAXIMUM 16 LIMIT_COUNT 1)
diff -ruN mumps/cmake/Modules/CheckSourceCompiles.cmake mumps-ok/cmake/Modules/CheckSourceCompiles.cmake
--- mumps/cmake/Modules/CheckSourceCompiles.cmake 1970-01-01 00:00:00.000000000 +0000
+++ mumps-ok/cmake/Modules/CheckSourceCompiles.cmake 2021-10-08 14:38:20.823214013 +0000
@@ -0,0 +1,134 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+include_guard(GLOBAL)
+
+cmake_policy(PUSH)
+cmake_policy(SET CMP0054 NEW) # if() quoted variables not dereferenced
+cmake_policy(SET CMP0057 NEW) # if() supports IN_LIST
+
+function(CMAKE_CHECK_SOURCE_COMPILES _lang _source _var)
+ if(NOT DEFINED "${_var}")
+
+ if(_lang STREQUAL "C")
+ set(_lang_textual "C")
+ set(_lang_ext "c")
+ elseif(_lang STREQUAL "CXX")
+ set(_lang_textual "C++")
+ set(_lang_ext "cxx")
+ elseif(_lang STREQUAL "CUDA")
+ set(_lang_textual "CUDA")
+ set(_lang_ext "cu")
+ elseif(_lang STREQUAL "Fortran")
+ set(_lang_textual "Fortran")
+ set(_lang_ext "F90")
+ elseif(_lang STREQUAL "HIP")
+ set(_lang_textual "HIP")
+ set(_lang_ext "hip")
+ elseif(_lang STREQUAL "ISPC")
+ set(_lang_textual "ISPC")
+ set(_lang_ext "ispc")
+ elseif(_lang STREQUAL "OBJC")
+ set(_lang_textual "Objective-C")
+ set(_lang_ext "m")
+ elseif(_lang STREQUAL "OBJCXX")
+ set(_lang_textual "Objective-C++")
+ set(_lang_ext "mm")
+ else()
+ message (SEND_ERROR "check_source_compiles: ${_lang}: unknown language.")
+ return()
+ endif()
+
+ get_property (_supported_languages GLOBAL PROPERTY ENABLED_LANGUAGES)
+ if (NOT _lang IN_LIST _supported_languages)
+ message (SEND_ERROR "check_source_compiles: ${_lang}: needs to be enabled before use.")
+ return()
+ endif()
+
+ set(_FAIL_REGEX)
+ set(_SRC_EXT)
+ set(_key)
+ foreach(arg ${ARGN})
+ if("${arg}" MATCHES "^(FAIL_REGEX|SRC_EXT)$")
+ set(_key "${arg}")
+ elseif(_key STREQUAL "FAIL_REGEX")
+ list(APPEND _FAIL_REGEX "${arg}")
+ elseif(_key STREQUAL "SRC_EXT")
+ set(_SRC_EXT "${arg}")
+ set(_key "")
+ else()
+ message(FATAL_ERROR "Unknown argument:\n ${arg}\n")
+ endif()
+ endforeach()
+
+ if(NOT _SRC_EXT)
+ set(_SRC_EXT ${_lang_ext})
+ endif()
+
+ if(CMAKE_REQUIRED_LINK_OPTIONS)
+ set(CHECK_${LANG}_SOURCE_COMPILES_ADD_LINK_OPTIONS
+ LINK_OPTIONS ${CMAKE_REQUIRED_LINK_OPTIONS})
+ else()
+ set(CHECK_${LANG}_SOURCE_COMPILES_ADD_LINK_OPTIONS)
+ endif()
+ if(CMAKE_REQUIRED_LIBRARIES)
+ set(CHECK_${LANG}_SOURCE_COMPILES_ADD_LIBRARIES
+ LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
+ else()
+ set(CHECK_${LANG}_SOURCE_COMPILES_ADD_LIBRARIES)
+ endif()
+ if(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_${LANG}_SOURCE_COMPILES_ADD_INCLUDES
+ "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
+ else()
+ set(CHECK_${LANG}_SOURCE_COMPILES_ADD_INCLUDES)
+ endif()
+ file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.${_SRC_EXT}"
+ "${_source}\n")
+
+ if(NOT CMAKE_REQUIRED_QUIET)
+ message(CHECK_START "Performing Test ${_var}")
+ endif()
+ try_compile(${_var}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.${_SRC_EXT}
+ COMPILE_DEFINITIONS -D${_var} ${CMAKE_REQUIRED_DEFINITIONS}
+ ${CHECK_${LANG}_SOURCE_COMPILES_ADD_LINK_OPTIONS}
+ ${CHECK_${LANG}_SOURCE_COMPILES_ADD_LIBRARIES}
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CMAKE_REQUIRED_FLAGS}
+ "${CHECK_${LANG}_SOURCE_COMPILES_ADD_INCLUDES}"
+ OUTPUT_VARIABLE OUTPUT)
+
+ foreach(_regex ${_FAIL_REGEX})
+ if("${OUTPUT}" MATCHES "${_regex}")
+ set(${_var} 0)
+ endif()
+ endforeach()
+
+ if(${_var})
+ set(${_var} 1 CACHE INTERNAL "Test ${_var}")
+ if(NOT CMAKE_REQUIRED_QUIET)
+ message(CHECK_PASS "Success")
+ endif()
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Performing ${_lang_textual} SOURCE FILE Test ${_var} succeeded with the following output:\n"
+ "${OUTPUT}\n"
+ "Source file was:\n${_source}\n")
+ else()
+ if(NOT CMAKE_REQUIRED_QUIET)
+ message(CHECK_FAIL "Failed")
+ endif()
+ set(${_var} "" CACHE INTERNAL "Test ${_var}")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Performing ${_lang_textual} SOURCE FILE Test ${_var} failed with the following output:\n"
+ "${OUTPUT}\n"
+ "Source file was:\n${_source}\n")
+ endif()
@@ -47,6 +47,10 @@
configure_file(libseq/CMakeLists.txt ${mumps_SOURCE_DIR}/libseq/ COPYONLY)
add_subdirectory(${mumps_SOURCE_DIR}/libseq ${mumps_BINARY_DIR}/libseq)
set(NUMERIC_LIBS mpiseq)
+ if(openmp)
+ find_package(OpenMP COMPONENTS C Fortran REQUIRED)
+ list(APPEND NUMERIC_LIBS OpenMP::OpenMP_Fortran OpenMP::OpenMP_C)
+ endif()
+endfunction()
+
+cmake_policy(POP)
+function(CHECK_SOURCE_COMPILES _lang _source _var)
+ cmake_check_source_compiles(${_lang} "${_source}" ${_var} ${ARGN})
+endfunction()
+
diff -ruN mumps/cmake/get_mumps.cmake mumps-ok/cmake/get_mumps.cmake
--- mumps/cmake/get_mumps.cmake 2021-10-04 14:31:04.000000000 +0000
+++ mumps-ok/cmake/get_mumps.cmake 2021-10-08 14:38:20.823214013 +0000
@@ -2,16 +2,18 @@
file(READ ${CMAKE_CURRENT_LIST_DIR}/libraries.json json)
+string(REGEX MATCH "\"mumps\": {.*\"${MUMPS_UPSTREAM_VERSION}\": {([^}]*)}" _ ${json})
+set(info ${CMAKE_MATCH_1})
+string(REGEX MATCH "\"sha256\": \"([^\"]*)\"" _ ${info})
+set(mumps_sha256 ${CMAKE_MATCH_1})
+string(REGEX MATCH "\"urls\": [\[]([^\]]*)" _ ${info})
+string(REGEX MATCHALL "\"([^\"]*)\"" urllist ${CMAKE_MATCH_1})
set(mumps_urls)
-string(JSON N LENGTH ${json} mumps ${MUMPS_UPSTREAM_VERSION} urls)
-math(EXPR N "${N}-1")
-foreach(i RANGE ${N})
- string(JSON _u GET ${json} mumps ${MUMPS_UPSTREAM_VERSION} urls ${i})
- list(APPEND mumps_urls ${_u})
+foreach(url ${urllist})
+ string(REPLACE "\"" "" urlstrip ${url})
+ list(APPEND mumps_urls ${urlstrip})
endforeach()
-string(JSON mumps_sha256 GET ${json} mumps ${MUMPS_UPSTREAM_VERSION} sha256)
-
FetchContent_Declare(mumps
URL ${mumps_urls}
URL_HASH SHA256=${mumps_sha256}
diff -ruN mumps/cmake/libraries.cmake mumps-ok/cmake/libraries.cmake
--- mumps/cmake/libraries.cmake 2021-10-04 14:31:04.000000000 +0000
+++ mumps-ok/cmake/libraries.cmake 2021-10-08 14:38:20.823214013 +0000
@@ -1,12 +1,13 @@
set(names lapack scalapack)
-file(READ ${CMAKE_CURRENT_LIST_DIR}/libraries.json _libj)
+file(READ ${CMAKE_CURRENT_LIST_DIR}/libraries.json json)
foreach(n ${names})
- foreach(t git tag)
- string(JSON m ERROR_VARIABLE e GET ${_libj} ${n} ${t})
- if(m)
- set(${n}_${t} ${m})
- endif()
+ string(REGEX MATCH "\"${n}\": {([^\}]*)}" _ ${json})
+ string(REGEX MATCHALL "\"[^\"]*\": \"[^\"]*" info_list ${CMAKE_MATCH_1})
+ foreach(info ${info_list})
+ string(REGEX MATCH "\"([^\"]*)\": \"([^\"]*)" INFO_LIST ${info})
+ set(${n}_${CMAKE_MATCH_1} ${CMAKE_MATCH_2})
+ message("${n}_${CMAKE_MATCH_1} ${CMAKE_MATCH_2}")
endforeach()
endforeach()
diff -ruN mumps/cmake/mumps_patch.cmake mumps-ok/cmake/mumps_patch.cmake
--- mumps/cmake/mumps_patch.cmake 2021-10-04 14:31:04.000000000 +0000
+++ mumps-ok/cmake/mumps_patch.cmake 2021-10-08 14:38:20.823214013 +0000
@@ -13,26 +13,22 @@
execute_process(COMMAND ${WSL} wslpath ${mumps_orig}
TIMEOUT 5
OUTPUT_VARIABLE mumps_orig_path
- COMMAND_ERROR_IS_FATAL ANY
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(COMMAND ${WSL} wslpath ${mumps_patch}
TIMEOUT 5
OUTPUT_VARIABLE mumps_patch_path
- COMMAND_ERROR_IS_FATAL ANY
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(COMMAND ${WSL} patch ${mumps_orig_path} ${mumps_patch_path}
TIMEOUT 10
- COMMAND_ERROR_IS_FATAL ANY
)
else()
find_program(PATCH NAMES patch REQUIRED)
execute_process(COMMAND ${PATCH} ${mumps_orig} ${mumps_patch}
TIMEOUT 10
- COMMAND_ERROR_IS_FATAL ANY
)
endif()
endif(parallel)
list(APPEND NUMERIC_LIBS LAPACK::LAPACK ${CMAKE_THREAD_LIBS_INIT})
diff -ruN mumps/CMakeLists.txt mumps-ok/CMakeLists.txt
--- mumps/CMakeLists.txt 2021-10-04 14:31:04.000000000 +0000
+++ mumps-ok/CMakeLists.txt 2021-10-08 14:38:20.823214013 +0000
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.20...3.21)
+cmake_minimum_required(VERSION 3.0...3.21)
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/VERSION PROJECT_VERSION
REGEX "^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)" LIMIT_INPUT 16 LENGTH_MAXIMUM 16 LIMIT_COUNT 1)
@@ -47,6 +47,10 @@
configure_file(libseq/CMakeLists.txt ${mumps_SOURCE_DIR}/libseq/ COPYONLY)
add_subdirectory(${mumps_SOURCE_DIR}/libseq ${mumps_BINARY_DIR}/libseq)
set(NUMERIC_LIBS mpiseq)
+ if(openmp)
+ find_package(OpenMP COMPONENTS C Fortran REQUIRED)
+ list(APPEND NUMERIC_LIBS OpenMP::OpenMP_Fortran OpenMP::OpenMP_C)
+ endif()
endif(parallel)
list(APPEND NUMERIC_LIBS LAPACK::LAPACK ${CMAKE_THREAD_LIBS_INIT})
diff -ruN mumps/cmake/Modules/CheckSourceCompiles.cmake mumps-ok/cmake/Modules/CheckSourceCompiles.cmake
--- mumps/cmake/Modules/CheckSourceCompiles.cmake 1970-01-01 00:00:00.000000000 +0000
+++ mumps-ok/cmake/Modules/CheckSourceCompiles.cmake 2021-10-08 14:38:20.823214013 +0000
@@ -0,0 +1,134 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+include_guard(GLOBAL)
+
+cmake_policy(PUSH)
+cmake_policy(SET CMP0054 NEW) # if() quoted variables not dereferenced
+cmake_policy(SET CMP0057 NEW) # if() supports IN_LIST
+
+function(CMAKE_CHECK_SOURCE_COMPILES _lang _source _var)
+ if(NOT DEFINED "${_var}")
+
+ if(_lang STREQUAL "C")
+ set(_lang_textual "C")
+ set(_lang_ext "c")
+ elseif(_lang STREQUAL "CXX")
+ set(_lang_textual "C++")
+ set(_lang_ext "cxx")
+ elseif(_lang STREQUAL "CUDA")
+ set(_lang_textual "CUDA")
+ set(_lang_ext "cu")
+ elseif(_lang STREQUAL "Fortran")
+ set(_lang_textual "Fortran")
+ set(_lang_ext "F90")
+ elseif(_lang STREQUAL "HIP")
+ set(_lang_textual "HIP")
+ set(_lang_ext "hip")
+ elseif(_lang STREQUAL "ISPC")
+ set(_lang_textual "ISPC")
+ set(_lang_ext "ispc")
+ elseif(_lang STREQUAL "OBJC")
+ set(_lang_textual "Objective-C")
+ set(_lang_ext "m")
+ elseif(_lang STREQUAL "OBJCXX")
+ set(_lang_textual "Objective-C++")
+ set(_lang_ext "mm")
+ else()
+ message (SEND_ERROR "check_source_compiles: ${_lang}: unknown language.")
+ return()
+ endif()
+
+ get_property (_supported_languages GLOBAL PROPERTY ENABLED_LANGUAGES)
+ if (NOT _lang IN_LIST _supported_languages)
+ message (SEND_ERROR "check_source_compiles: ${_lang}: needs to be enabled before use.")
+ return()
+ endif()
+
+ set(_FAIL_REGEX)
+ set(_SRC_EXT)
+ set(_key)
+ foreach(arg ${ARGN})
+ if("${arg}" MATCHES "^(FAIL_REGEX|SRC_EXT)$")
+ set(_key "${arg}")
+ elseif(_key STREQUAL "FAIL_REGEX")
+ list(APPEND _FAIL_REGEX "${arg}")
+ elseif(_key STREQUAL "SRC_EXT")
+ set(_SRC_EXT "${arg}")
+ set(_key "")
+ else()
+ message(FATAL_ERROR "Unknown argument:\n ${arg}\n")
+ endif()
+ endforeach()
+
+ if(NOT _SRC_EXT)
+ set(_SRC_EXT ${_lang_ext})
+ endif()
+
+ if(CMAKE_REQUIRED_LINK_OPTIONS)
+ set(CHECK_${LANG}_SOURCE_COMPILES_ADD_LINK_OPTIONS
+ LINK_OPTIONS ${CMAKE_REQUIRED_LINK_OPTIONS})
+ else()
+ set(CHECK_${LANG}_SOURCE_COMPILES_ADD_LINK_OPTIONS)
+ endif()
+ if(CMAKE_REQUIRED_LIBRARIES)
+ set(CHECK_${LANG}_SOURCE_COMPILES_ADD_LIBRARIES
+ LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
+ else()
+ set(CHECK_${LANG}_SOURCE_COMPILES_ADD_LIBRARIES)
+ endif()
+ if(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_${LANG}_SOURCE_COMPILES_ADD_INCLUDES
+ "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
+ else()
+ set(CHECK_${LANG}_SOURCE_COMPILES_ADD_INCLUDES)
+ endif()
+ file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.${_SRC_EXT}"
+ "${_source}\n")
+
+ if(NOT CMAKE_REQUIRED_QUIET)
+ message(CHECK_START "Performing Test ${_var}")
+ endif()
+ try_compile(${_var}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.${_SRC_EXT}
+ COMPILE_DEFINITIONS -D${_var} ${CMAKE_REQUIRED_DEFINITIONS}
+ ${CHECK_${LANG}_SOURCE_COMPILES_ADD_LINK_OPTIONS}
+ ${CHECK_${LANG}_SOURCE_COMPILES_ADD_LIBRARIES}
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CMAKE_REQUIRED_FLAGS}
+ "${CHECK_${LANG}_SOURCE_COMPILES_ADD_INCLUDES}"
+ OUTPUT_VARIABLE OUTPUT)
+
+ foreach(_regex ${_FAIL_REGEX})
+ if("${OUTPUT}" MATCHES "${_regex}")
+ set(${_var} 0)
+ endif()
+ endforeach()
+
+ if(${_var})
+ set(${_var} 1 CACHE INTERNAL "Test ${_var}")
+ if(NOT CMAKE_REQUIRED_QUIET)
+ message(CHECK_PASS "Success")
+ endif()
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Performing ${_lang_textual} SOURCE FILE Test ${_var} succeeded with the following output:\n"
+ "${OUTPUT}\n"
+ "Source file was:\n${_source}\n")
+ else()
+ if(NOT CMAKE_REQUIRED_QUIET)
+ message(CHECK_FAIL "Failed")
+ endif()
+ set(${_var} "" CACHE INTERNAL "Test ${_var}")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Performing ${_lang_textual} SOURCE FILE Test ${_var} failed with the following output:\n"
+ "${OUTPUT}\n"
+ "Source file was:\n${_source}\n")
+ endif()
+ endif()
+endfunction()
+
+cmake_policy(POP)
+function(CHECK_SOURCE_COMPILES _lang _source _var)
+ cmake_check_source_compiles(${_lang} "${_source}" ${_var} ${ARGN})
+endfunction()
+
diff -ruN mumps/cmake/get_mumps.cmake mumps-ok/cmake/get_mumps.cmake
--- mumps/cmake/get_mumps.cmake 2021-10-04 14:31:04.000000000 +0000
+++ mumps-ok/cmake/get_mumps.cmake 2021-10-08 14:38:20.823214013 +0000
@@ -2,16 +2,18 @@
file(READ ${CMAKE_CURRENT_LIST_DIR}/libraries.json json)
+string(REGEX MATCH "\"mumps\": {.*\"${MUMPS_UPSTREAM_VERSION}\": {([^}]*)}" _ ${json})
+set(info ${CMAKE_MATCH_1})
+string(REGEX MATCH "\"sha256\": \"([^\"]*)\"" _ ${info})
+set(mumps_sha256 ${CMAKE_MATCH_1})
+string(REGEX MATCH "\"urls\": [\[]([^\]]*)" _ ${info})
+string(REGEX MATCHALL "\"([^\"]*)\"" urllist ${CMAKE_MATCH_1})
set(mumps_urls)
-string(JSON N LENGTH ${json} mumps ${MUMPS_UPSTREAM_VERSION} urls)
-math(EXPR N "${N}-1")
-foreach(i RANGE ${N})
- string(JSON _u GET ${json} mumps ${MUMPS_UPSTREAM_VERSION} urls ${i})
- list(APPEND mumps_urls ${_u})
+foreach(url ${urllist})
+ string(REPLACE "\"" "" urlstrip ${url})
+ list(APPEND mumps_urls ${urlstrip})
endforeach()
-string(JSON mumps_sha256 GET ${json} mumps ${MUMPS_UPSTREAM_VERSION} sha256)
-
FetchContent_Declare(mumps
URL ${mumps_urls}
URL_HASH SHA256=${mumps_sha256}
diff -ruN mumps/cmake/libraries.cmake mumps-ok/cmake/libraries.cmake
--- mumps/cmake/libraries.cmake 2021-10-04 14:31:04.000000000 +0000
+++ mumps-ok/cmake/libraries.cmake 2021-10-08 14:38:20.823214013 +0000
@@ -1,12 +1,13 @@
set(names lapack scalapack)
-file(READ ${CMAKE_CURRENT_LIST_DIR}/libraries.json _libj)
+file(READ ${CMAKE_CURRENT_LIST_DIR}/libraries.json json)
foreach(n ${names})
- foreach(t git tag)
- string(JSON m ERROR_VARIABLE e GET ${_libj} ${n} ${t})
- if(m)
- set(${n}_${t} ${m})
- endif()
+ string(REGEX MATCH "\"${n}\": {([^\}]*)}" _ ${json})
+ string(REGEX MATCHALL "\"[^\"]*\": \"[^\"]*" info_list ${CMAKE_MATCH_1})
+ foreach(info ${info_list})
+ string(REGEX MATCH "\"([^\"]*)\": \"([^\"]*)" INFO_LIST ${info})
+ set(${n}_${CMAKE_MATCH_1} ${CMAKE_MATCH_2})
+ message("${n}_${CMAKE_MATCH_1} ${CMAKE_MATCH_2}")
endforeach()
endforeach()
diff -ruN mumps/cmake/mumps_patch.cmake mumps-ok/cmake/mumps_patch.cmake
--- mumps/cmake/mumps_patch.cmake 2021-10-04 14:31:04.000000000 +0000
+++ mumps-ok/cmake/mumps_patch.cmake 2021-10-08 14:38:20.823214013 +0000
@@ -13,26 +13,22 @@
execute_process(COMMAND ${WSL} wslpath ${mumps_orig}
TIMEOUT 5
OUTPUT_VARIABLE mumps_orig_path
- COMMAND_ERROR_IS_FATAL ANY
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(COMMAND ${WSL} wslpath ${mumps_patch}
TIMEOUT 5
OUTPUT_VARIABLE mumps_patch_path
- COMMAND_ERROR_IS_FATAL ANY
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(COMMAND ${WSL} patch ${mumps_orig_path} ${mumps_patch_path}
TIMEOUT 10
- COMMAND_ERROR_IS_FATAL ANY
)
else()
find_program(PATCH NAMES patch REQUIRED)
execute_process(COMMAND ${PATCH} ${mumps_orig} ${mumps_patch}
TIMEOUT 10
- COMMAND_ERROR_IS_FATAL ANY
)
endif()
......@@ -54,7 +54,7 @@ DMUMPS_STRUC_C *mumps_new(int n, int nnz, int *row, int *col) {
/* 50 makes all the validation functional */
id->ICNTL(14)=50;
/* num of openmp threads */
id->ICNTL(16)=4;
id->ICNTL(16)=0;
return id;
}
......
Supports Markdown
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