From: michael Date: Fri, 5 Nov 2021 22:23:38 +0000 (+0100) Subject: Added mpi4py in python module X-Git-Tag: V9_8_0~50 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0b1c57ca5abb261b7d599fccdf3bdb60c07978ad;p=tools%2Fsolverlab.git Added mpi4py in python module --- diff --git a/CoreFlows/swig/CMakeLists.txt b/CoreFlows/swig/CMakeLists.txt index 71cfdbb..553b8a1 100755 --- a/CoreFlows/swig/CMakeLists.txt +++ b/CoreFlows/swig/CMakeLists.txt @@ -11,6 +11,16 @@ INCLUDE_DIRECTORIES( ${SLEPC_INCLUDES} ) +IF( ${SOLVERLAB_WITH_MPI} ) + INCLUDE_DIRECTORIES( + ${Python_INCLUDE_DIRS} + ${CoreFlows_INCLUDES} # + ${PETSC_INCLUDES} + ${SLEPC_INCLUDES} + ${MPI4PY_ROOT_DIR}/include/ + ) +ENDIF( ${SOLVERLAB_WITH_MPI} ) + IF (${CMAKE_VERSION} VERSION_LESS "3.8.0") SWIG_ADD_MODULE(CoreFlows python CoreFlows.i) ELSE (${CMAKE_VERSION} VERSION_LESS "3.8.0") diff --git a/CoreFlows/swig/CoreFlows.i b/CoreFlows/swig/CoreFlows.i index a3f8ddf..d659bac 100755 --- a/CoreFlows/swig/CoreFlows.i +++ b/CoreFlows/swig/CoreFlows.i @@ -4,6 +4,11 @@ %include std_vector.i %include std_map.i +#ifdef MPI4PY_ROOT_DIR +%include MPI4PY_ROOT_DIR/include/mpi4py/mpi4py.i +%mpi4py_typemap(Comm, MPI_Comm); +#endif + %apply bool& INOUT {bool &stop} namespace std {