Loading .gitlab-ci.yml +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ rpc: script: - export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:${CI_PROJECT_DIR}/compiled/lib - compiled/bin/scord -f --force-console & - build/examples/cxx/ping ofi+tcp://127.0.0.1:52000 - build/examples/cxx/ADM_ping ofi+tcp://127.0.0.1:52000 - pkill -TERM scord cache: key: $CI_COMMIT_REF_SLUG Loading README.md +1 −1 Original line number Diff line number Diff line Loading @@ -180,7 +180,7 @@ Now we can use one of the example programs to send a `ping` RPC to `scord`: ```bash cd $HOME/scord/build/examples ./ping ofi+tcp://192.168.0.111:52000 ./ADM_ping ofi+tcp://192.168.0.111:52000 ``` And the server logs should update with an entry similar the following one: Loading examples/cxx/ping.cpp→examples/cxx/ADM_ping.cpp +10 −10 Original line number Diff line number Diff line Loading @@ -23,25 +23,25 @@ *****************************************************************************/ #include <fmt/format.h> #include <engine.hpp> #include <admire.hpp> int main(int argc, char* argv[]) { if(argc != 2) { fmt::print(stderr, "ERROR: no server address provided\n"); fmt::print(stderr, "Usage: ping <SERVER_ADDRESS>\n"); fmt::print(stderr, "Usage: ADM_ping <SERVER_ADDRESS>\n"); exit(EXIT_FAILURE); } scord::network::rpc_client rpc_client{"tcp"}; rpc_client.register_rpcs(); admire::server server{"tcp", argv[1]}; auto endp = rpc_client.lookup(argv[1]); fmt::print(stdout, "Calling PING remote procedure on {}...\n", argv[1]); endp.call("ping"); try { admire::ping(server); } catch(const std::exception& e) { fmt::print(stderr, "FATAL: ADM_ping() failed: {}\n", e.what()); exit(EXIT_FAILURE); } fmt::print(stdout, "PING remote procedure completed successfully\n"); fmt::print(stdout, "ADM_ping() remote procedure completed successfully\n"); } examples/cxx/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ ################################################################################ list(APPEND examples_cxx ping ADM_ping ADM_register_job ADM_update_job ADM_remove_job ADM_register_adhoc_storage ADM_update_adhoc_storage ADM_remove_adhoc_storage ADM_deploy_adhoc_storage Loading src/api/admire.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,16 @@ init_logger() { namespace admire { void ping(const server& srv) { if(const auto ec = detail::ping(srv)) { throw std::runtime_error( fmt::format("ADM_register_job() error: {}", ADM_strerror(ec))); } } admire::job register_job(const server& srv, ADM_job_requirements_t reqs) { Loading Loading
.gitlab-ci.yml +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ rpc: script: - export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:${CI_PROJECT_DIR}/compiled/lib - compiled/bin/scord -f --force-console & - build/examples/cxx/ping ofi+tcp://127.0.0.1:52000 - build/examples/cxx/ADM_ping ofi+tcp://127.0.0.1:52000 - pkill -TERM scord cache: key: $CI_COMMIT_REF_SLUG Loading
README.md +1 −1 Original line number Diff line number Diff line Loading @@ -180,7 +180,7 @@ Now we can use one of the example programs to send a `ping` RPC to `scord`: ```bash cd $HOME/scord/build/examples ./ping ofi+tcp://192.168.0.111:52000 ./ADM_ping ofi+tcp://192.168.0.111:52000 ``` And the server logs should update with an entry similar the following one: Loading
examples/cxx/ping.cpp→examples/cxx/ADM_ping.cpp +10 −10 Original line number Diff line number Diff line Loading @@ -23,25 +23,25 @@ *****************************************************************************/ #include <fmt/format.h> #include <engine.hpp> #include <admire.hpp> int main(int argc, char* argv[]) { if(argc != 2) { fmt::print(stderr, "ERROR: no server address provided\n"); fmt::print(stderr, "Usage: ping <SERVER_ADDRESS>\n"); fmt::print(stderr, "Usage: ADM_ping <SERVER_ADDRESS>\n"); exit(EXIT_FAILURE); } scord::network::rpc_client rpc_client{"tcp"}; rpc_client.register_rpcs(); admire::server server{"tcp", argv[1]}; auto endp = rpc_client.lookup(argv[1]); fmt::print(stdout, "Calling PING remote procedure on {}...\n", argv[1]); endp.call("ping"); try { admire::ping(server); } catch(const std::exception& e) { fmt::print(stderr, "FATAL: ADM_ping() failed: {}\n", e.what()); exit(EXIT_FAILURE); } fmt::print(stdout, "PING remote procedure completed successfully\n"); fmt::print(stdout, "ADM_ping() remote procedure completed successfully\n"); }
examples/cxx/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ ################################################################################ list(APPEND examples_cxx ping ADM_ping ADM_register_job ADM_update_job ADM_remove_job ADM_register_adhoc_storage ADM_update_adhoc_storage ADM_remove_adhoc_storage ADM_deploy_adhoc_storage Loading
src/api/admire.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,16 @@ init_logger() { namespace admire { void ping(const server& srv) { if(const auto ec = detail::ping(srv)) { throw std::runtime_error( fmt::format("ADM_register_job() error: {}", ADM_strerror(ec))); } } admire::job register_job(const server& srv, ADM_job_requirements_t reqs) { Loading