]> SALOME platform Git repositories - tools/solverlab.git/commitdiff
Salome HOME
Added mpi4py in python module
authormichael <michael@localhost.localdomain>
Fri, 5 Nov 2021 22:23:38 +0000 (23:23 +0100)
committermichael <michael@localhost.localdomain>
Fri, 5 Nov 2021 22:23:38 +0000 (23:23 +0100)
CoreFlows/swig/CMakeLists.txt
CoreFlows/swig/CoreFlows.i

index 71cfdbb9e571d0a671a5a081e54b2cef7db8a453..553b8a1d401f0dd73d8e990a83c62ba70dab933f 100755 (executable)
@@ -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") 
index a3f8ddfdde947cad3bb06f496b48fefe3c06dbf7..d659bacfde85098029a563c2a9013143cc31d566 100755 (executable)
@@ -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 {