diff --git a/microbench/triangle-counting/include/tc_algos.hpp b/microbench/triangle-counting/include/tc_algos.hpp index 6d4bfef1..53cc4fc6 100644 --- a/microbench/triangle-counting/include/tc_algos.hpp +++ b/microbench/triangle-counting/include/tc_algos.hpp @@ -19,8 +19,7 @@ template void tc_chunk_vertices(pando::GlobalPtr graph_ptr, galois::DAccumulator final_tri_count); -void HBMainTC(pando::Notification::HandleType hb_done, pando::Array filename, - int64_t num_vertices, bool load_balanced_graph, TC_CHUNK tc_chunk, - galois::DAccumulator final_tri_count); +void HBMainTC(pando::Array filename, int64_t num_vertices, bool load_balanced_graph, + TC_CHUNK tc_chunk, galois::DAccumulator final_tri_count); #endif // TRIANGLE_COUNTING_INCLUDE_TC_ALGOS_HPP_ diff --git a/microbench/triangle-counting/include/utils.hpp b/microbench/triangle-counting/include/utils.hpp index 975ac0b2..71aaac71 100644 --- a/microbench/triangle-counting/include/utils.hpp +++ b/microbench/triangle-counting/include/utils.hpp @@ -56,7 +56,7 @@ struct CommandLineOptions { : elFile(""), num_vertices(0), load_balanced_graph(false), tc_chunk(TC_CHUNK::NO_CHUNK) {} }; -std::shared_ptr read_cmd_line_args(int argc, char** argv); +std::unique_ptr read_cmd_line_args(int argc, char** argv); void printUsageExit(char* argv0); void printUsage(char* argv0); // ##################################################################### diff --git a/microbench/triangle-counting/src/tc.cpp b/microbench/triangle-counting/src/tc.cpp index 7aa1c87b..96718c21 100644 --- a/microbench/triangle-counting/src/tc.cpp +++ b/microbench/triangle-counting/src/tc.cpp @@ -5,7 +5,7 @@ int pandoMain(int argc, char** argv) { auto thisPlace = pando::getCurrentPlace(); - std::shared_ptr opts = read_cmd_line_args(argc, argv); + std::unique_ptr opts = read_cmd_line_args(argc, argv); if (thisPlace.node.id == COORDINATOR_ID) { galois::HostLocalStorageHeap::HeapInit(); @@ -22,13 +22,8 @@ int pandoMain(int argc, char** argv) { galois::DAccumulator final_tri_count{}; PANDO_CHECK(final_tri_count.initialize()); - pando::Notification necessary; - PANDO_CHECK(necessary.init()); - PANDO_CHECK(pando::executeOn(pando::Place{pando::NodeIndex{0}, pando::anyPod, pando::anyCore}, - &HBMainTC, necessary.getHandle(), filename, opts->num_vertices, - opts->load_balanced_graph, opts->tc_chunk, final_tri_count)); - necessary.wait(); - filename.deinitialize(); + HBMainTC(filename, opts->num_vertices, opts->load_balanced_graph, opts->tc_chunk, + final_tri_count); std::cout << "*** FINAL TRI COUNT = " << final_tri_count.reduce() << "\n"; #if BENCHMARK @@ -38,6 +33,7 @@ int pandoMain(int argc, char** argv) { << std::chrono::duration_cast(time_e2e_end - time_e2e_st).count() << "\n"; #endif + filename.deinitialize(); } pando::waitAll(); return 0; diff --git a/microbench/triangle-counting/src/tc_algos.cpp b/microbench/triangle-counting/src/tc_algos.cpp index 0269f668..6c1d813c 100644 --- a/microbench/triangle-counting/src/tc_algos.cpp +++ b/microbench/triangle-counting/src/tc_algos.cpp @@ -294,15 +294,12 @@ void HBGraphDA(pando::Place thisPlace, pando::Array filename, int64_t num_ pando::deallocateMemory(graph_ptr, 1); } -void HBMainTC(pando::Notification::HandleType hb_done, pando::Array filename, - int64_t num_vertices, bool load_balanced_graph, TC_CHUNK tc_chunk, - galois::DAccumulator final_tri_count) { +void HBMainTC(pando::Array filename, int64_t num_vertices, bool load_balanced_graph, + TC_CHUNK tc_chunk, galois::DAccumulator final_tri_count) { auto thisPlace = pando::getCurrentPlace(); if (load_balanced_graph) HBGraphDL(thisPlace, filename, num_vertices, tc_chunk, final_tri_count); else HBGraphDA(thisPlace, filename, num_vertices, final_tri_count); - - hb_done.notify(); } diff --git a/microbench/triangle-counting/src/utils.cpp b/microbench/triangle-counting/src/utils.cpp index 035e7d90..8dbb0a3e 100644 --- a/microbench/triangle-counting/src/utils.cpp +++ b/microbench/triangle-counting/src/utils.cpp @@ -4,8 +4,8 @@ #include // Process command line flags -std::shared_ptr read_cmd_line_args(int argc, char** argv) { - std::shared_ptr opts_ptr = std::make_shared(); +std::unique_ptr read_cmd_line_args(int argc, char** argv) { + std::unique_ptr opts_ptr = std::make_unique(); // Other libraries may have called getopt before, so we reset optind for correctness optind = 0; diff --git a/microbench/triangle-counting/test/test_tc.cpp b/microbench/triangle-counting/test/test_tc.cpp index c75ba754..2b588538 100644 --- a/microbench/triangle-counting/test/test_tc.cpp +++ b/microbench/triangle-counting/test/test_tc.cpp @@ -16,12 +16,7 @@ void e2e_tc_test(uint64_t expected_tc, pando::Array filename, uint64_t num bool load_balanced_graph, TC_CHUNK tc_chunk) { galois::DAccumulator final_tri_count; EXPECT_EQ(final_tri_count.initialize(), pando::Status::Success); - pando::Notification necessary; - PANDO_CHECK(necessary.init()); - PANDO_CHECK(pando::executeOn(pando::Place{pando::NodeIndex{0}, pando::anyPod, pando::anyCore}, - &HBMainTC, necessary.getHandle(), filename, num_vertices, - load_balanced_graph, tc_chunk, final_tri_count)); - necessary.wait(); + HBMainTC(filename, num_vertices, load_balanced_graph, tc_chunk, final_tri_count); EXPECT_EQ(final_tri_count.reduce(), expected_tc); final_tri_count.deinitialize(); } diff --git a/src/ingest_rmat_el.cpp b/src/ingest_rmat_el.cpp index 7d7d1bbc..a17a8727 100644 --- a/src/ingest_rmat_el.cpp +++ b/src/ingest_rmat_el.cpp @@ -80,9 +80,10 @@ pando::Vector> galois::reduceLocalEdges( for (std::uint64_t i = 0; i < localEdges.size(); i++) { pando::Vector> threadLocalEdges = *localEdges.get(i); - for (pando::Vector ev : threadLocalEdges) { - if (ev.size() > 0) { - ELEdge first_edge = ev[0]; + for (pando::GlobalRef> ev : threadLocalEdges) { + const pando::Vector& unboxEV = ev; + if (unboxEV.size() > 0) { + ELEdge first_edge = unboxEV[0]; uint64_t src = first_edge.src; pando::Vector src_ev = reducedEL[src]; PANDO_CHECK(src_ev.append(&ev));