Skip to content
Snippets Groups Projects
Commit a5c56520 authored by David Gobbi's avatar David Gobbi Committed by Kitware Robot
Browse files

Merge topic 'mpi4py-4.0.1-fix' into release


fbdd9a63 Merge branch 'upstream-mpi4py' into mpi4py-4.0.1-fix
1ac079e5 mpi4py 2024-11-13 (549ebe14)
99bf9e73 mpi4py: update to fix errors with msmpi

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Tested-by: default avatarbuildbot <buildbot@kitware.com>
Reviewed-by: default avatarMathieu Westphal (Kitware) <mathieu.westphal@kitware.com>
Reviewed-by: default avatarSankhesh Jhaveri <sankhesh.jhaveri@kitware.com>
Merge-request: !11647
parents cbcf657d fbdd9a63
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ readonly name="mpi4py"
readonly ownership="mpi4py Upstream <kwrobot@kitware.com>"
readonly subtree="ThirdParty/$name/vtk$name"
readonly repo="https://gitlab.kitware.com/third-party/mpi4py.git"
readonly tag="for/vtk-20241030-4.0.1"
readonly tag="for/vtk-20241113-4.0.1"
readonly paths="
.gitattributes
CMakeLists.txt
......
......@@ -65,6 +65,34 @@ set_target_properties(vtkmpi4py.MPI
PREFIX ""
LIBRARY_OUTPUT_DIRECTORY "${mpi4py_build_dir}/mpi4py")
if (WIN32)
if ("msmpi" IN_LIST MPI_C_LIB_NAMES)
if (NOT VTK_MPI4PY_MSMPI_VER)
# set default msmpi version to 10.0, but also check registry
set(_msmpi_version_hex 0xa00)
# XXX(cmake-3.24) use cmake_host_system_information() to read registry
execute_process(COMMAND REG "QUERY" "HKLM\\SOFTWARE\\Microsoft\\MPI"
RESULT_VARIABLE _reg_result
OUTPUT_VARIABLE _reg_output
ERROR_QUIET)
if (_reg_result EQUAL 0)
string(REGEX MATCH "[ \t\r\n]+Version[ \t]+REG_SZ[ \t]+([^ \t\r\n]*)"
_fullmatch "${_reg_output}")
set(_msmpi_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)"
_short_version "${_msmpi_VERSION}")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.13")
math(EXPR _msmpi_version_hex
"${CMAKE_MATCH_1} * 256 + ${CMAKE_MATCH_2}"
OUTPUT_FORMAT HEXADECIMAL)
endif ()
endif ()
set(VTK_MPI4PY_MSMPI_VER "${_msmpi_version_hex}" CACHE INTERNAL
"Hexadecimal msmpi version (with 0x) for mpi4py")
endif ()
target_compile_definitions(vtkmpi4py.MPI
PRIVATE
MSMPI_VER=${VTK_MPI4PY_MSMPI_VER})
endif ()
set_target_properties(vtkmpi4py.MPI
PROPERTIES
# XXX(python-debug): VTK doesn't expect a debug Python for Debug builds
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment