Skip to content

Commit

Permalink
Revert "partition edges parallel (#40)"
Browse files Browse the repository at this point in the history
This reverts commit 0d26a2c.
  • Loading branch information
AdityaAtulTewari committed Apr 9, 2024
1 parent 0d26a2c commit 2a33ec2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions include/pando-lib-galois/graphs/dist_local_csr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,8 @@ class DistLocalCSR {
template <typename ReadVertexType, typename ReadEdgeType>
pando::Status initializeAfterGather(
galois::HostLocalStorage<pando::Vector<ReadVertexType>> vertexData, std::uint64_t numVertices,
galois::HostLocalStorage<pando::Vector<pando::Vector<ReadEdgeType>>> edgeData,
galois::HostLocalStorage<galois::HashTable<std::uint64_t, std::uint64_t>> edgeMap,
galois::HostIndexedMap<pando::Vector<pando::Vector<ReadEdgeType>>> edgeData,
galois::HostIndexedMap<galois::HashTable<std::uint64_t, std::uint64_t>> edgeMap,
galois::HostIndexedMap<std::uint64_t> numEdges,
HostLocalStorage<pando::Array<std::uint64_t>> virtualToPhysical) {
this->virtualToPhysicalMap = virtualToPhysical;
Expand Down Expand Up @@ -574,8 +574,8 @@ class DistLocalCSR {

auto fillCSRFuncs =
+[](DistLocalCSR<VertexType, EdgeType> dlcsr,
galois::HostLocalStorage<pando::Vector<pando::Vector<ReadEdgeType>>> edgeData,
galois::HostLocalStorage<galois::HashTable<std::uint64_t, std::uint64_t>> edgeMap,
galois::HostIndexedMap<pando::Vector<pando::Vector<ReadEdgeType>>> edgeData,
galois::HostIndexedMap<galois::HashTable<std::uint64_t, std::uint64_t>> edgeMap,
galois::HostIndexedMap<std::uint64_t> numVerticesPerHost, std::uint64_t i,
galois::WaitGroup::HandleType wgh) {
CSR currentCSR = dlcsr.arrayOfCSRs[i];
Expand Down
12 changes: 6 additions & 6 deletions include/pando-lib-galois/import/wmd_graph_importer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ uint64_t combiner(B f, B s) {
* grouped by Vertex, along with a rename set of Vertices
*/
template <typename EdgeType, typename VertexType>
[[nodiscard]] Pair<HostLocalStorage<pando::Vector<pando::Vector<EdgeType>>>,
HostLocalStorage<HashTable<std::uint64_t, std::uint64_t>>>
[[nodiscard]] Pair<HostIndexedMap<pando::Vector<pando::Vector<EdgeType>>>,
HostIndexedMap<HashTable<std::uint64_t, std::uint64_t>>>
partitionEdgesParallely(HostLocalStorage<pando::Vector<VertexType>> partitionedVertices,
ThreadLocalVector<pando::Vector<EdgeType>>&& localReadEdges,
HostLocalStorage<pando::Array<std::uint64_t>> v2PM) {
HostLocalStorage<pando::Vector<pando::Vector<EdgeType>>> partEdges{};
HostIndexedMap<pando::Vector<pando::Vector<EdgeType>>> partEdges{};
PANDO_CHECK(partEdges.initialize());

HostLocalStorage<HashTable<std::uint64_t, std::uint64_t>> renamePerHost{};
HostIndexedMap<HashTable<std::uint64_t, std::uint64_t>> renamePerHost{};
PANDO_CHECK(renamePerHost.initialize());

// Initialize hashmap
Expand Down Expand Up @@ -206,8 +206,8 @@ partitionEdgesParallely(HostLocalStorage<pando::Vector<VertexType>> partitionedV

const std::uint64_t numThreads = static_cast<std::uint64_t>(localReadEdges.size());
std::uint64_t numHosts = static_cast<std::uint64_t>(pando::getPlaceDims().node.id);
ThreadLocalStorage<HostIndexedMap<pando::Vector<pando::Vector<EdgeType>>>> perThreadEdges;
PANDO_CHECK(perThreadEdges.initialize());
DistArray<HostIndexedMap<pando::Vector<pando::Vector<EdgeType>>>> perThreadEdges;
PANDO_CHECK(perThreadEdges.initialize(numThreads));
for (uint64_t i = 0; i < numThreads; i++) {
PANDO_CHECK(lift(perThreadEdges[i], initialize));
HostIndexedMap<pando::Vector<pando::Vector<EdgeType>>> pVec = perThreadEdges[i];
Expand Down

0 comments on commit 2a33ec2

Please sign in to comment.