Skip to content
Snippets Groups Projects
Commit 1b188bf7 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

[bindings] fix init_mpi in the presence of dune-fem

parent eabfe276
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,10 @@
#include <dune/common/parallel/mpihelper.hh>
#if HAVE_DUNE_FEM
#include <dune/fem/misc/mpimanager.hh>
#endif
#include <dune/pybindxi/pybind11.h>
#include <dune/pybindxi/stl.h>
......@@ -43,7 +47,11 @@ PYBIND11_PLUGIN(_common)
[](const std::vector<std::string>& args) {
int argc = boost::numeric_cast<int>(args.size());
char** argv = Dune::XT::Common::vector_to_main_args(args);
#if HAVE_DUNE_FEM
Dune::Fem::MPIManager::initialize(argc, argv);
#else
Dune::MPIHelper::instance(argc, argv);
#endif
},
"args"_a = std::vector<std::string>());
......
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