diff --git a/AMDiS/src/parallel/MeshDistributor.cc b/AMDiS/src/parallel/MeshDistributor.cc index 7823e1f14abe8a772c79909e6a9caad3540da2ac..fdc0e96b4cec86c7d5d60689cfb96819896cab4c 100644 --- a/AMDiS/src/parallel/MeshDistributor.cc +++ b/AMDiS/src/parallel/MeshDistributor.cc @@ -1283,6 +1283,10 @@ namespace AMDiS { return; } + TEST_EXIT_DBG(!(partitioner->getSendElements().size() == mesh->getMacroElements().size() && + partitioner->getRecvElements().size() == 0)) + ("Partition is empty, should not happen!\n"); + // === Create map that maps macro element indices to pointers to the === // === macro elements. === diff --git a/AMDiS/src/parallel/ZoltanPartitioner.cc b/AMDiS/src/parallel/ZoltanPartitioner.cc index 77ba7f9b4f1bd4a3f788d802132c536346d24c07..cce8a3a389e5dd1e959f97e1f984bba61b4af1f3 100644 --- a/AMDiS/src/parallel/ZoltanPartitioner.cc +++ b/AMDiS/src/parallel/ZoltanPartitioner.cc @@ -97,6 +97,13 @@ namespace AMDiS { recvElements.clear(); sendElements.clear(); + int createEmptyPartition = + (mesh->getMacroElements().size() == nExportEls && nImportEls == 0); + mpi::globalMax(createEmptyPartition); + + if (createEmptyPartition > 0) + err = ZOLTAN_FATAL; + if (err == ZOLTAN_OK && changes != 0) { if (nImportEls > 0) { for (int i = 0; i < nImportEls; i++) {