From ee24e786affa17ef133be0c6d57e07f84b7de610 Mon Sep 17 00:00:00 2001 From: Lukas Date: Wed, 30 Jan 2019 16:44:22 +0100 Subject: [PATCH] use global communicator in python-mesh --- libsrc/meshing/python_mesh.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index 6d7760a4..11ba4a7c 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -506,6 +506,7 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) .def(py::init( [] (int dim) { auto mesh = make_shared(); + mesh->SetCommunicator(netgen::ng_comm); mesh -> SetDimension(dim); SetGlobalMesh(mesh); // for visualization mesh -> SetGeometry (nullptr); @@ -533,8 +534,8 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) istream * infile; #ifdef PARALLEL - MPI_Comm_rank(MPI_COMM_WORLD, &id); - MPI_Comm_size(MPI_COMM_WORLD, &ntasks); + MPI_Comm_rank(netgen::ng_comm, &id); + MPI_Comm_size(netgen::ng_comm, &ntasks); char* buf = nullptr; int strs = 0;