diff --git a/include/ripples/configuration.h b/include/ripples/configuration.h index 3b260e61..97791ffc 100644 --- a/include/ripples/configuration.h +++ b/include/ripples/configuration.h @@ -56,6 +56,7 @@ namespace ripples { struct GraphInputConfiguration { std::string IFileName{""}; //!< The input file name std::string metall_dir{"/tmp/graph"}; //!< Where is the metall directory? + std::string rr_dir{"/tmp/rr"}; //!< Where is the rr directory? bool weighted{false}; //!< is Graph weighted? bool undirected{false}; //!< is Graph undirected? bool disable_renumbering{false}; //!< trust the input to be clean. @@ -74,7 +75,9 @@ struct GraphInputConfiguration { ->group("Input Options") ->required(); app.add_flag("--metall-store-dir", metall_dir, - "Directory to store metall graph data.") + "Directory to store metall graph data.") + ->group("Input Options"); + app.add_flag("--rr-store-dir", rr_dir, "Directory to store RR data.") ->group("Input Options"); app.add_flag("--reload-binary", reload, "Reload a graph from binary input") ->group("Input Options"); diff --git a/include/ripples/generate_rrr_sets.h b/include/ripples/generate_rrr_sets.h index 919b0631..8567f14b 100644 --- a/include/ripples/generate_rrr_sets.h +++ b/include/ripples/generate_rrr_sets.h @@ -78,8 +78,8 @@ using RRRsetAllocator = libmemkind::pmem::allocator; template using RRRsetAllocator = metall::manager::allocator_type; -metall::manager &metall_manager_instance() { - static metall::manager manager(metall::create_only, "/dev/shm/metall_tmp"); +metall::manager &metall_manager_instance(std::string path) { + static metall::manager manager(metall::create_only, path.c_str()); return manager; } diff --git a/include/ripples/graph.h b/include/ripples/graph.h index 1af0a851..df4ec6a4 100644 --- a/include/ripples/graph.h +++ b/include/ripples/graph.h @@ -591,6 +591,12 @@ class Graph { template void load_binary(FStream &FS) { + #ifdef ENABLE_METALL + // Static assert 0 + throw 0 && "Not implemented yet, don't use with Metall"; + #endif + + if (!FS.is_open()) throw "Bad things happened!!!"; FS.read(reinterpret_cast(&numNodes), sizeof(numNodes)); diff --git a/include/ripples/imm.h b/include/ripples/imm.h index 3c15351f..f26e8354 100644 --- a/include/ripples/imm.h +++ b/include/ripples/imm.h @@ -180,7 +180,7 @@ auto Sampling(const GraphTy &G, const ConfTy &CFG, double l, double LB = 0; #if defined ENABLE_MEMKIND - RRRsetAllocator allocator("/mnt/bb/reeceneff/memkind_tmp", 0); + RRRsetAllocator allocator(CFG.rr_dir.c_str(), 0); #elif defined ENABLE_METALL_RRRSETS RRRsetAllocator allocator = metall_manager_instance().get_allocator(); #else @@ -266,7 +266,7 @@ auto Sampling(const GraphTy &G, const ConfTy &CFG, double l, double LB = 0; #if defined ENABLE_MEMKIND - RRRsetAllocator allocator("/mnt/bb/reeceneff/memkind_tmp", 0); + RRRsetAllocator allocator(CFG.rr_dir.c_str(), 0); #elif defined ENABLE_METALL_RRRSETS RRRsetAllocator allocator = metall_manager_instance().get_allocator(); #else