78 template <
typename PartitionPolicy,
typename NodeData = char,
79 typename EdgeData =
void>
83 std::string transposeGraphFile =
"",
84 std::string masterBlockFile =
"",
bool cuspAsync =
true,
85 uint32_t cuspStateRounds = 100,
88 uint32_t nodeWeight = 0, uint32_t edgeWeight = 0) {
90 using DistGraphConstructor =
95 if (!symmetricGraph) {
97 std::string inputToUse;
103 inputToUse = graphFile;
105 useTranspose =
false;
106 }
else if (outputType ==
CUSP_CSC) {
109 GALOIS_DIE(
"CuSP output graph type is invalid");
112 inputToUse = transposeGraphFile;
115 }
else if (outputType ==
CUSP_CSC) {
116 useTranspose =
false;
118 GALOIS_DIE(
"CuSP output graph type is invalid");
121 GALOIS_DIE(
"Invalid input graph type specified in CuSP partitioner");
124 return new DistGraphConstructor(inputToUse, net.ID, net.Num, cuspAsync,
125 cuspStateRounds, useTranspose, readPolicy,
126 nodeWeight, edgeWeight, masterBlockFile);
130 return new DistGraphConstructor(graphFile, net.ID, net.Num, cuspAsync,
131 cuspStateRounds,
false, readPolicy,
132 nodeWeight, edgeWeight, masterBlockFile);
galois::graphs::DistGraph< NodeData, EdgeData > * cuspPartitionGraph(std::string graphFile, CUSP_GRAPH_TYPE inputType, CUSP_GRAPH_TYPE outputType, bool symmetricGraph=false, std::string transposeGraphFile="", std::string masterBlockFile="", bool cuspAsync=true, uint32_t cuspStateRounds=100, galois::graphs::MASTERS_DISTRIBUTION readPolicy=galois::graphs::BALANCED_EDGES_OF_MASTERS, uint32_t nodeWeight=0, uint32_t edgeWeight=0)
Main CuSP function: partitions a graph on disk, one partition per host.
Definition: CuSPPartitioner.h:81
#define GALOIS_DIE(...)
Definition: gIO.h:96
Contains the main graph class as well as the partitioning logic that CuSP uses.
MASTERS_DISTRIBUTION
Enums specifying how masters are to be distributed among hosts.
Definition: DistributedGraph.h:48
NetworkInterface & getSystemNetworkInterface()
Get the network interface.
Definition: Network.cpp:131
CUSP_GRAPH_TYPE
Enum for the input/output format of the partitioner.
Definition: CuSPPartitioner.h:36
Contains the implementation for DistGraph.
Compressed sparse column graph format, i.e. incoming edges.
Definition: CuSPPartitioner.h:38
Definition: NewGeneric.h:47
Contains the declaration of DistMemSys, a way to explicitly initiate the Galois runtime.
Compressed sparse row graph format, i.e. outgoing edges.
Definition: CuSPPartitioner.h:37
Base DistGraph class that all distributed graphs extend from.
Definition: DistributedGraph.h:64
balance edges
Definition: DistributedGraph.h:52