Commit b4c2ffc0 authored by David Auer's avatar David Auer
Browse files

reformatting

parent d3af07fc
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -3,11 +3,12 @@
#include <sys/time.h>
#include <sys/resource.h>

int main(int argc, const char *argv[])
{
int
main(int argc, const char* argv[]) {
    rlimit rlimits;
    int rv = getrlimit(RLIMIT_NOFILE, &rlimits);
    std::cout << "hello world! rv=" << rv << " RLIMIT_NOFILE{cur: "
              << rlimits.rlim_cur << ", max: " << rlimits.rlim_max << "}"
              << std::endl << std::flush;
    std::cout << "hello world! rv=" << rv
              << " RLIMIT_NOFILE{cur: " << rlimits.rlim_cur
              << ", max: " << rlimits.rlim_max << "}" << std::endl
              << std::flush;
}
 No newline at end of file
+7 −4
Original line number Diff line number Diff line
@@ -465,7 +465,8 @@ parse_input(const po::variables_map& vm) {
    }
}

void test_d2d_rpc() {
void
test_d2d_rpc() {
    auto hosts = gkfs::util::read_hosts_file();

    cout << "number of hosts: " << hosts.size() << "\n";
@@ -474,7 +475,9 @@ void test_d2d_rpc() {
    assert(mid);


    hg_id_t shuffle_start_id = MARGO_REGISTER(mid, gkfs::rpc::tag::shuffle_start, void, void, rpc_srv_shuffle_start);
    hg_id_t shuffle_start_id =
            MARGO_REGISTER(mid, gkfs::rpc::tag::shuffle_start, void, void,
                           rpc_srv_shuffle_start);


    for(auto host : hosts) {
+6 −4
Original line number Diff line number Diff line
@@ -57,11 +57,13 @@ rpc_srv_get_fs_config(hg_handle_t handle) {
    return HG_SUCCESS;
}

hg_return_t rpc_srv_shuffle_start(hg_handle_t handle) {
hg_return_t
rpc_srv_shuffle_start(hg_handle_t handle) {
    cout << "TODO shuffle start received\n";
    auto hret = margo_respond(handle, nullptr);
    if(hret != HG_SUCCESS) {
        GKFS_DATA->spdlogger()->error("{}() Failed to respond to client to serve file system configurations",
        GKFS_DATA->spdlogger()->error(
                "{}() Failed to respond to client to serve file system configurations",
                __func__);
    }

+20 −14
Original line number Diff line number Diff line
@@ -51,15 +51,19 @@ destroy_hosts_file() {
}


// hosts file functions copied from daemon - need Modifications for LOG and hostsfile path source
// TODO clean that up, probably best into global utilities - TBD How do we do logging there?
// hosts file functions copied from daemon - need Modifications for LOG and
// hostsfile path source
// TODO clean that up, probably best into global utilities - TBD How do we do
// logging there?
/**
 * Reads the daemon generator hosts file by a given path, returning hosts and URI addresses
 * Reads the daemon generator hosts file by a given path, returning hosts and
 * URI addresses
 * @param path to hosts file
 * @return vector<pair<hosts, URI>>
 * @throws std::runtime_error
 */
vector<pair<string, string>> load_hostfile(const std::string& path) {
vector<pair<string, string>>
load_hostfile(const std::string& path) {

    // LOG(DEBUG, "Loading hosts file: \"{}\"", path);

@@ -89,13 +93,15 @@ vector<pair<string, string>> load_hostfile(const std::string& path) {
        hosts.emplace_back(host, uri);
    }
    if(hosts.empty()) {
        throw runtime_error("Hosts file found but no suitable addresses could be extracted");
        throw runtime_error(
                "Hosts file found but no suitable addresses could be extracted");
    }
    // ??? extract_protocol(hosts[0].second);
    return hosts;
}

vector<pair<string, string>> read_hosts_file() {
vector<pair<string, string>>
read_hosts_file() {
    string hostfile = GKFS_DATA->hosts_file();

    vector<pair<string, string>> hosts;
+1 −1

File changed.

Contains only whitespace changes.

+2 −2

File changed.

Contains only whitespace changes.

Loading