From 8c14a57cc2ad1a45cec828416c9c0b93380b6d80 Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Fri, 22 Apr 2022 13:18:26 +0200
Subject: [PATCH] [python] Use Dumux::initialize

---
 python/dumux/common/_common.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/python/dumux/common/_common.cc b/python/dumux/common/_common.cc
index b1a27adffa..921a20b442 100644
--- a/python/dumux/common/_common.cc
+++ b/python/dumux/common/_common.cc
@@ -20,6 +20,7 @@
 #include <dune/python/pybind11/pybind11.h>
 #include <dune/python/pybind11/stl.h>
 
+#include <dumux/common/initialize.hh>
 #include <dumux/common/parameters.hh>
 #include <dumux/python/common/timeloop.hh>
 
@@ -28,6 +29,11 @@ PYBIND11_MODULE(_common, module)
     using namespace Dumux;
     using pybind11::operator""_a;
 
+    // maybe initialize MPI and/or multithreading backend
+    int argc = 0;
+    char **argv = NULL;
+    Dumux::initialize(argc, argv);
+
     // export time loop
     Python::registerTimeLoop<double>(module);
 
-- 
GitLab