Commit 82bae1b8 authored by David Auer's avatar David Auer
Browse files

Add dynamic_placement config switch

parent b4c2ffc0
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -24,6 +24,11 @@ namespace gkfs::config {

constexpr auto hostfile_path = "./gkfs_hosts.txt";
constexpr auto forwarding_file_path = "./gkfs_forwarding.map";
/*
 * Enables adding/removing daemons to the running file system and
 * switches distribution function to Random Slicing.
 */
constexpr auto dynamic_placement = true;

namespace io {
/*
+10 −6
Original line number Diff line number Diff line
@@ -123,9 +123,11 @@ register_server_rpcs(margo_instance_id mid) {
                   rpc_srv_truncate);
    MARGO_REGISTER(mid, gkfs::rpc::tag::get_chunk_stat, rpc_chunk_stat_in_t,
                   rpc_chunk_stat_out_t, rpc_srv_get_chunk_stat);
    if(gkfs::config::dynamic_placement) {
        MARGO_REGISTER(mid, gkfs::rpc::tag::shuffle_start, void, void,
                       rpc_srv_shuffle_start);
    }
}

void
init_rpc_server() {
@@ -526,9 +528,11 @@ main(int argc, const char* argv[]) {
            "Available: {ofi+sockets, ofi+verbs, ofi+psm2} for TCP, Infiniband, "
            "and Omni-Path, respectively. (Default ofi+sockets)\n"
            "Libfabric must have enabled support verbs or psm2.");
    if(gkfs::config::dynamic_placement) {
        desc.add_options()(
                "shuffle",
                "WIP: Send signal for shuffle phase to all running daemons, then quit.");
    }
    desc.add_options()(
            "auto-sm",
            "Enables intra-node communication (IPCs) via the `na+sm` (shared memory) protocol, "
@@ -579,7 +583,7 @@ main(int argc, const char* argv[]) {
        exit(EXIT_FAILURE);
    }

    if(vm.count("shuffle")) {
    if(gkfs::config::dynamic_placement && vm.count("shuffle")) {
        cout << "Starting shuffle...\n";
        test_d2d_rpc();
        return 0;