Skip to content
Snippets Groups Projects
Commit 67aa67bb authored by Boman Romain's avatar Boman Romain
Browse files

fix FindMPI4PY for python3

parent 72cb4be6
No related branches found
No related tags found
2 merge requests!49Add CI with python 3 including trilinos,!48Futurize for python2/3
Pipeline #521 failed
This commit is part of merge request !48. Comments created here will be created in the context of that merge request.
......@@ -14,16 +14,16 @@
if(NOT MPI4PY_INCLUDE_DIR)
execute_process(COMMAND
"${PYTHON_EXECUTABLE}" "-c" "import mpi4py; print mpi4py.get_include()"
"${PYTHON_EXECUTABLE}" "-c" "from __future__ import print_function; import mpi4py; print(mpi4py.get_include())"
OUTPUT_VARIABLE MPI4PY_INCLUDE_DIR
RESULT_VARIABLE MPI4PY_COMMAND_RESULT
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(MPI4PY_COMMAND_RESULT)
message("jfa: mpi4py not found")
message("waves/CMake/FindMPI4PY: mpi4py not found")
set(MPI4PY_FOUND FALSE)
else(MPI4PY_COMMAND_RESULT)
if (MPI4PY_INCLUDE_DIR MATCHES "Traceback")
message("jfa: mpi4py matches traceback")
message("waves/CMake/FindMPI4PY: mpi4py matches traceback")
## Did not successfully include MPI4PY
set(MPI4PY_FOUND FALSE)
else (MPI4PY_INCLUDE_DIR MATCHES "Traceback")
......
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