From 16421b4be3ad6f324acd0fe29c8a32ae5ba67440 Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 28 Feb 2019 16:24:57 +0100 Subject: [PATCH 1/2] fix rank/ntasks in curvedelems --- libsrc/meshing/curvedelems.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsrc/meshing/curvedelems.cpp b/libsrc/meshing/curvedelems.cpp index e694968c..2eb5f956 100644 --- a/libsrc/meshing/curvedelems.cpp +++ b/libsrc/meshing/curvedelems.cpp @@ -547,12 +547,10 @@ namespace netgen void CurvedElements :: BuildCurvedElements(const Refinement * ref, int aorder, bool arational) { - bool working = (ntasks == 1) || (id > 0); ishighorder = 0; order = 1; - // MPI_Comm curve_comm; const auto & curve_comm = mesh.GetCommunicator(); #ifdef PARALLEL @@ -567,6 +565,8 @@ namespace netgen int rank = curve_comm.Rank(); int ntasks = curve_comm.Size(); + bool working = (ntasks == 1) || (id > 0); + if (working) order = aorder; From c1256c3ffdf5b3330717189a9a6c4b4bd89d00a8 Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 28 Feb 2019 16:46:27 +0100 Subject: [PATCH 2/2] fix typo --- libsrc/meshing/curvedelems.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsrc/meshing/curvedelems.cpp b/libsrc/meshing/curvedelems.cpp index 2eb5f956..98410568 100644 --- a/libsrc/meshing/curvedelems.cpp +++ b/libsrc/meshing/curvedelems.cpp @@ -562,7 +562,7 @@ namespace netgen #else // curve_comm = mesh.GetCommunicator(); #endif - int rank = curve_comm.Rank(); + int id = curve_comm.Rank(); int ntasks = curve_comm.Size(); bool working = (ntasks == 1) || (id > 0);