Skip to content
Snippets Groups Projects
Commit 91289a35 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Fixed partitioning issue with empty partitiones.

parent 5d0b11a2
No related branches found
No related tags found
No related merge requests found
......@@ -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. ===
......
......@@ -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++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment