Reduce memory consumption during partition
This commit is contained in:
parent
1e9806f872
commit
54367bfa98
@ -95,7 +95,7 @@ void LogGeojson(const std::string &filename, const std::vector<std::uint32_t> &b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int Partitioner::Run(const PartitionConfig &config)
|
auto getGraphBisection(const PartitionConfig &config)
|
||||||
{
|
{
|
||||||
auto compressed_node_based_graph =
|
auto compressed_node_based_graph =
|
||||||
LoadCompressedNodeBasedGraph(config.compressed_node_based_graph_path.string());
|
LoadCompressedNodeBasedGraph(config.compressed_node_based_graph_path.string());
|
||||||
@ -122,6 +122,14 @@ int Partitioner::Run(const PartitionConfig &config)
|
|||||||
config.num_optimizing_cuts,
|
config.num_optimizing_cuts,
|
||||||
config.small_component_size);
|
config.small_component_size);
|
||||||
|
|
||||||
|
// Return bisection ids, keyed by node based graph nodes
|
||||||
|
return recursive_bisection.BisectionIDs();
|
||||||
|
}
|
||||||
|
|
||||||
|
int Partitioner::Run(const PartitionConfig &config)
|
||||||
|
{
|
||||||
|
const std::vector<BisectionID> &node_based_partition_ids = getGraphBisection(config);
|
||||||
|
|
||||||
// Up until now we worked on the compressed node based graph.
|
// Up until now we worked on the compressed node based graph.
|
||||||
// But what we actually need is a partition for the edge based graph to work on.
|
// But what we actually need is a partition for the edge based graph to work on.
|
||||||
// The following loads a mapping from node based graph to edge based graph.
|
// The following loads a mapping from node based graph to edge based graph.
|
||||||
@ -137,11 +145,6 @@ int Partitioner::Run(const PartitionConfig &config)
|
|||||||
<< edge_based_graph.GetNumberOfEdges() << " edges, "
|
<< edge_based_graph.GetNumberOfEdges() << " edges, "
|
||||||
<< edge_based_graph.GetNumberOfNodes() << " nodes";
|
<< edge_based_graph.GetNumberOfNodes() << " nodes";
|
||||||
|
|
||||||
// TODO: node based graph to edge based graph partition id mapping should be done split off.
|
|
||||||
|
|
||||||
// Partition ids, keyed by node based graph nodes
|
|
||||||
const auto &node_based_partition_ids = recursive_bisection.BisectionIDs();
|
|
||||||
|
|
||||||
// Partition ids, keyed by edge based graph nodes
|
// Partition ids, keyed by edge based graph nodes
|
||||||
std::vector<NodeID> edge_based_partition_ids(edge_based_graph.GetNumberOfNodes(),
|
std::vector<NodeID> edge_based_partition_ids(edge_based_graph.GetNumberOfNodes(),
|
||||||
SPECIAL_NODEID);
|
SPECIAL_NODEID);
|
||||||
|
Loading…
Reference in New Issue
Block a user