Instead of hard fail, just print the number of unconneced nodes
This commit is contained in:
parent
00d01946cd
commit
517b27bfc3
@ -201,6 +201,8 @@ template <bool UseShareMemory> class CellStorageImpl
|
|||||||
std::vector<std::pair<CellID, NodeID>> level_source_boundary;
|
std::vector<std::pair<CellID, NodeID>> level_source_boundary;
|
||||||
std::vector<std::pair<CellID, NodeID>> level_destination_boundary;
|
std::vector<std::pair<CellID, NodeID>> level_destination_boundary;
|
||||||
|
|
||||||
|
std::size_t number_of_unconneced = 0;
|
||||||
|
|
||||||
for (LevelID level = 1u; level < partition.GetNumberOfLevels(); ++level)
|
for (LevelID level = 1u; level < partition.GetNumberOfLevels(); ++level)
|
||||||
{
|
{
|
||||||
auto level_offset = level_to_cell_offset[LevelIDToIndex(level)];
|
auto level_offset = level_to_cell_offset[LevelIDToIndex(level)];
|
||||||
@ -232,12 +234,14 @@ template <bool UseShareMemory> class CellStorageImpl
|
|||||||
level_source_boundary.emplace_back(cell_id, node);
|
level_source_boundary.emplace_back(cell_id, node);
|
||||||
if (is_destination_node)
|
if (is_destination_node)
|
||||||
level_destination_boundary.emplace_back(cell_id, node);
|
level_destination_boundary.emplace_back(cell_id, node);
|
||||||
// a partition that contains boundary nodes that have no arcs going into
|
|
||||||
// the cells or coming out of it is invalid. These nodes should be reassigned
|
// if a node is unconnected we still need to keep it for correctness
|
||||||
// to a different cell.
|
// this adds it to the destination array to form an "empty" column
|
||||||
BOOST_ASSERT_MSG(
|
if (!is_source_node && !is_destination_node)
|
||||||
is_source_node || is_destination_node,
|
{
|
||||||
"Node needs to either have incoming or outgoing edges in cell");
|
number_of_unconneced++;
|
||||||
|
level_destination_boundary.emplace_back(cell_id, node);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,6 +292,14 @@ template <bool UseShareMemory> class CellStorageImpl
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// a partition that contains boundary nodes that have no arcs going into
|
||||||
|
// the cells or coming out of it is bad. These nodes should be reassigned
|
||||||
|
// to a different cell.
|
||||||
|
if (number_of_unconneced > 0)
|
||||||
|
{
|
||||||
|
util::Log(logWARNING) << "Node needs to either have incoming or outgoing edges in cell";
|
||||||
|
}
|
||||||
|
|
||||||
// Set weight offsets and calculate total storage size
|
// Set weight offsets and calculate total storage size
|
||||||
WeightOffset weight_offset = 0;
|
WeightOffset weight_offset = 0;
|
||||||
for (auto &cell : cells)
|
for (auto &cell : cells)
|
||||||
|
Loading…
Reference in New Issue
Block a user