From 30928eaaa84a423a7e5bf7344e7c0a7fb04fd4e2 Mon Sep 17 00:00:00 2001 From: Lukas Date: Tue, 12 Jun 2018 11:11:36 +0200 Subject: [PATCH] Fixed it --- libsrc/interface/nginterface.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libsrc/interface/nginterface.cpp b/libsrc/interface/nginterface.cpp index 46228f79..ce3ad450 100644 --- a/libsrc/interface/nginterface.cpp +++ b/libsrc/interface/nginterface.cpp @@ -247,12 +247,15 @@ void Ng_LoadMesh (const char * filename) SetGlobalMesh (mesh); mesh->SendRecvMesh(); } + if(ntasks>1) { /** Scatter the geometry-string **/ MPI_Bcast(&strs, 1, MPI_INT, 0, MPI_COMM_WORLD); if(id!=0) buf = new char[strs]; MPI_Bcast(buf, strs, MPI_CHAR, 0, MPI_COMM_WORLD); +} +#endif infile = new istringstream(string((const char*)buf, (size_t)strs)); delete[] buf; for (int i = 0; i < geometryregister.Size(); i++) @@ -269,8 +272,6 @@ void Ng_LoadMesh (const char * filename) ng_geometry = make_shared(); mesh->SetGeometry(ng_geometry); delete infile; - } -#endif } void Ng_LoadMeshFromString (const char * mesh_as_string)