diff --git a/src/parallel/decompose/parMetis/parMetis.C b/src/parallel/decompose/parMetis/parMetis.C index b12b0329aa..9fd77d68e0 100644 --- a/src/parallel/decompose/parMetis/parMetis.C +++ b/src/parallel/decompose/parMetis/parMetis.C @@ -308,6 +308,14 @@ Foam::labelList Foam::decompositionMethods::parMetis::decompose << exit(FatalError); } + if (Pstream::parRun() && !points.size()) + { + Pout<< "No points on processor " << Pstream::myProcNo() << nl + << " ParMETIS cannot redistribute without points" + "on all processors." << endl; + FatalErrorInFunction << exit(FatalError); + } + // Make Metis CSR (Compressed Storage Format) storage // adjncy : contains neighbours (= edges in graph) // xadj(celli) : start of information in adjncy for celli @@ -352,6 +360,13 @@ Foam::labelList Foam::decompositionMethods::parMetis::decompose << exit(FatalError); } + if (Pstream::parRun() && !regionPoints.size()) + { + Pout<< "No points on processor " << Pstream::myProcNo() << nl + << " ParMETIS cannot redistribute without points" + "on all processors." << endl; + FatalErrorInFunction << exit(FatalError); + } // Make Metis CSR (Compressed Storage Format) storage // adjncy : contains neighbours (= edges in graph) @@ -405,6 +420,14 @@ Foam::labelList Foam::decompositionMethods::parMetis::decompose << ")." << exit(FatalError); } + if (Pstream::parRun() && !cellCentres.size()) + { + Pout<< "No points on processor " << Pstream::myProcNo() << nl + << " ParMETIS cannot redistribute without points" + "on all processors." << endl; + FatalErrorInFunction << exit(FatalError); + } + // Make Metis Distributed CSR (Compressed Storage Format) storage // adjncy : contains neighbours (= edges in graph) // xadj(celli) : start of information in adjncy for celli