61 #include <boost/bind.hpp>
62 #include <boost/function.hpp>
73 #include <boost/interprocess/managed_heap_memory.hpp>
78 int main(
int argc,
char** argv) {
82 int mpi_rank(0), mpi_size(0);
86 CHK_MPI(MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank));
87 CHK_MPI(MPI_Comm_size(MPI_COMM_WORLD, &mpi_size));
91 std::cout <<
"MPI initialized with " << mpi_size <<
" ranks." << std::endl;
92 std::cout <<
"CMD line:";
93 for (
int i = 0; i < argc; ++i) {
94 std::cout <<
" " << argv[i];
96 std::cout << std::endl;
100 MPI_Barrier(MPI_COMM_WORLD);
103 std::string graph_input;
106 std::cerr <<
"usage: <graph input file name>"
107 <<
" (argc:" << argc <<
" )." << std::endl;
111 graph_input = argv[pos++];
115 MPI_Barrier(MPI_COMM_WORLD);
120 find<graph_type>(
"graph_obj").first;
121 assert(graph !=
nullptr);
123 MPI_Barrier(MPI_COMM_WORLD);
125 std::cout <<
"Graph Loaded Ready." << std::endl;
128 MPI_Barrier(MPI_COMM_WORLD);
130 for(
int i=0; i<100; ++i) {
131 uint64_t count =
triangle_count(*graph, graph->label_to_locator(i));
133 std::cout <<
"Vertex " << i <<
" has " << count <<
" triangles." << std::endl;
hmpi::delegate_partitioned_graph< segment_manager_t > graph_type
mapped_type::segment_manager segment_manager_type
segment_manager_type * get_segment_manager()
old_environment & get_environment()
uint64_t triangle_count(TGraph &g, typename TGraph::vertex_locator s)
int main(int argc, char **argv)
havoqgt::distributed_db::segment_manager_type segment_manager_t
void havoqgt_init(int *argc, char ***argv)