Merge branch 'fix_curve_mpi' into 'master'

fix rank/ntasks in curvedelems

See merge request jschoeberl/netgen!140
This commit is contained in:
Matthias Hochsteger 2019-02-28 16:11:17 +00:00
commit 10ef58b54b

View File

@ -547,12 +547,10 @@ namespace netgen
void CurvedElements :: BuildCurvedElements(const Refinement * ref, int aorder, void CurvedElements :: BuildCurvedElements(const Refinement * ref, int aorder,
bool arational) bool arational)
{ {
bool working = (ntasks == 1) || (id > 0);
ishighorder = 0; ishighorder = 0;
order = 1; order = 1;
// MPI_Comm curve_comm; // MPI_Comm curve_comm;
const auto & curve_comm = mesh.GetCommunicator(); const auto & curve_comm = mesh.GetCommunicator();
#ifdef PARALLEL #ifdef PARALLEL
@ -564,9 +562,11 @@ namespace netgen
#else #else
// curve_comm = mesh.GetCommunicator(); // curve_comm = mesh.GetCommunicator();
#endif #endif
int rank = curve_comm.Rank(); int id = curve_comm.Rank();
int ntasks = curve_comm.Size(); int ntasks = curve_comm.Size();
bool working = (ntasks == 1) || (id > 0);
if (working) if (working)
order = aorder; order = aorder;