Loading ci/check_rpcs.py +1 −1 Viewed Changes for ci/check_rpcs.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ RPC_NAMES = { 'ADM_remove_pfs_storage', 'ADM_transfer_datasets', 'ADM_get_transfer_priority', 'ADM_set_transfer_priority', 'ADM_cancel_transfer', 'ADM_get_pending_transfers', 'ADM_get_pending_transfers', 'ADM_transfer_update', 'ADM_set_qos_constraints', 'ADM_get_qos_constraints', 'ADM_define_data_operation', 'ADM_connect_data_operation', 'ADM_finalize_data_operation', Loading examples/c/CMakeLists.txt +1 −1 Viewed Changes for examples/c/CMakeLists.txt: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ list(APPEND c_examples_without_controller add_library(c_examples_common STATIC) target_sources(c_examples_common PUBLIC common.h PRIVATE common.c) target_link_libraries(c_examples_common libscord_c_types) target_link_libraries(c_examples_common libscord_c_types spdlog::spdlog fmt::fmt) foreach(example IN LISTS c_examples_with_controller c_examples_without_controller) add_executable(${example}_c) Loading examples/cxx/ADM_transfer_update.cpp 0 → 100644 +95 −0 Viewed Changes for examples/cxx/ADM_transfer_update.cpp: 95 added lines, 0 removed lines. Original line number Diff line number Diff line /****************************************************************************** * Copyright 2021-2022, Barcelona Supercomputing Center (BSC), Spain * * This software was partially supported by the EuroHPC-funded project ADMIRE * (Project ID: 956748, https://www.admire-eurohpc.eu). * * This file is part of scord. * * scord is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * scord is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with scord. If not, see <https://www.gnu.org/licenses/>. * * SPDX-License-Identifier: GPL-3.0-or-later *****************************************************************************/ #include <fmt/format.h> #include <scord/scord.hpp> #include "common.hpp" #define NJOB_NODES 50 #define NADHOC_NODES 25 #define NINPUTS 10 #define NOUTPUTS 5 #define NSOURCES 5 #define NTARGETS 5 #define NLIMITS 4 int main(int argc, char* argv[]) { test_info test_info{ .name = TESTNAME, .requires_server = true, .requires_controller = true, .requires_data_stager = true, }; const auto cli_args = process_args(argc, argv, test_info); scord::server server{"tcp", cli_args.server_address}; const auto job_nodes = prepare_nodes(NJOB_NODES); const auto adhoc_nodes = prepare_nodes(NADHOC_NODES); const auto inputs = prepare_routes("{}-input-dataset-{}", NINPUTS); const auto outputs = prepare_routes("{}-output-dataset-{}", NOUTPUTS); const auto expected_outputs = prepare_routes("{}-exp-output-dataset-{}", NEXPOUTPUTS); const auto sources = prepare_datasets("source-dataset-{}", NSOURCES); const auto targets = prepare_datasets("target-dataset-{}", NTARGETS); const auto qos_limits = prepare_qos_limits(NLIMITS); const auto mapping = scord::transfer::mapping::n_to_n; std::string name = "adhoc_storage_42"; const auto adhoc_storage_ctx = scord::adhoc_storage::ctx{ cli_args.controller_address, cli_args.data_stager_address, scord::adhoc_storage::execution_mode::separate_new, scord::adhoc_storage::access_type::read_write, 100, false}; const auto adhoc_resources = scord::adhoc_storage::resources{adhoc_nodes}; try { const auto adhoc_storage = scord::register_adhoc_storage( server, name, scord::adhoc_storage::type::gekkofs, adhoc_storage_ctx, adhoc_resources); scord::job::requirements reqs(inputs, outputs, expected_outputs, adhoc_storage); const auto job = scord::register_job( server, scord::job::resources{job_nodes}, reqs, 0); const auto transfer = scord::transfer_datasets( server, job, sources, targets, qos_limits, mapping); scord::transfer_update(server, transfer.id(), 10.0f); fmt::print(stdout, "ADM_transfer_update() remote procedure completed " "successfully\n"); exit(EXIT_SUCCESS); } catch(const std::exception& e) { fmt::print(stderr, "FATAL: ADM_transfer_update() failed: {}\n", e.what()); exit(EXIT_FAILURE); } } examples/cxx/CMakeLists.txt +2 −2 Viewed Changes for examples/cxx/CMakeLists.txt: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ list(APPEND cxx_examples_with_controller ADM_deploy_adhoc_storage ADM_terminate_adhoc_storage # transfers ADM_transfer_datasets ADM_get_transfer_priority ADM_set_transfer_priority ADM_cancel_transfer ADM_get_pending_transfers ADM_cancel_transfer ADM_get_pending_transfers ADM_transfer_update # qos ADM_set_qos_constraints ADM_get_qos_constraints # data operations Loading @@ -56,7 +56,7 @@ foreach(example IN LISTS cxx_examples_with_controller cxx_examples_without_contr add_executable(${example}_cxx) target_sources(${example}_cxx PRIVATE ${example}.cpp) target_link_libraries(${example}_cxx PUBLIC fmt::fmt libscord cxx_examples_common) PUBLIC fmt::fmt spdlog::spdlog libscord cxx_examples_common) set_target_properties(${example}_cxx PROPERTIES OUTPUT_NAME ${example}) endforeach() Loading src/common/net/server.cpp +1 −0 Viewed Changes for src/common/net/server.cpp: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include <filesystem> #include <string> #include <system_error> #include <fmt/std.h> #include <fmt/format.h> #ifdef SCORD_DEBUG_BUILD Loading Loading
ci/check_rpcs.py +1 −1 Viewed Changes for ci/check_rpcs.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ RPC_NAMES = { 'ADM_remove_pfs_storage', 'ADM_transfer_datasets', 'ADM_get_transfer_priority', 'ADM_set_transfer_priority', 'ADM_cancel_transfer', 'ADM_get_pending_transfers', 'ADM_get_pending_transfers', 'ADM_transfer_update', 'ADM_set_qos_constraints', 'ADM_get_qos_constraints', 'ADM_define_data_operation', 'ADM_connect_data_operation', 'ADM_finalize_data_operation', Loading
examples/c/CMakeLists.txt +1 −1 Viewed Changes for examples/c/CMakeLists.txt: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ list(APPEND c_examples_without_controller add_library(c_examples_common STATIC) target_sources(c_examples_common PUBLIC common.h PRIVATE common.c) target_link_libraries(c_examples_common libscord_c_types) target_link_libraries(c_examples_common libscord_c_types spdlog::spdlog fmt::fmt) foreach(example IN LISTS c_examples_with_controller c_examples_without_controller) add_executable(${example}_c) Loading
examples/cxx/ADM_transfer_update.cpp 0 → 100644 +95 −0 Viewed Changes for examples/cxx/ADM_transfer_update.cpp: 95 added lines, 0 removed lines. Original line number Diff line number Diff line /****************************************************************************** * Copyright 2021-2022, Barcelona Supercomputing Center (BSC), Spain * * This software was partially supported by the EuroHPC-funded project ADMIRE * (Project ID: 956748, https://www.admire-eurohpc.eu). * * This file is part of scord. * * scord is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * scord is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with scord. If not, see <https://www.gnu.org/licenses/>. * * SPDX-License-Identifier: GPL-3.0-or-later *****************************************************************************/ #include <fmt/format.h> #include <scord/scord.hpp> #include "common.hpp" #define NJOB_NODES 50 #define NADHOC_NODES 25 #define NINPUTS 10 #define NOUTPUTS 5 #define NSOURCES 5 #define NTARGETS 5 #define NLIMITS 4 int main(int argc, char* argv[]) { test_info test_info{ .name = TESTNAME, .requires_server = true, .requires_controller = true, .requires_data_stager = true, }; const auto cli_args = process_args(argc, argv, test_info); scord::server server{"tcp", cli_args.server_address}; const auto job_nodes = prepare_nodes(NJOB_NODES); const auto adhoc_nodes = prepare_nodes(NADHOC_NODES); const auto inputs = prepare_routes("{}-input-dataset-{}", NINPUTS); const auto outputs = prepare_routes("{}-output-dataset-{}", NOUTPUTS); const auto expected_outputs = prepare_routes("{}-exp-output-dataset-{}", NEXPOUTPUTS); const auto sources = prepare_datasets("source-dataset-{}", NSOURCES); const auto targets = prepare_datasets("target-dataset-{}", NTARGETS); const auto qos_limits = prepare_qos_limits(NLIMITS); const auto mapping = scord::transfer::mapping::n_to_n; std::string name = "adhoc_storage_42"; const auto adhoc_storage_ctx = scord::adhoc_storage::ctx{ cli_args.controller_address, cli_args.data_stager_address, scord::adhoc_storage::execution_mode::separate_new, scord::adhoc_storage::access_type::read_write, 100, false}; const auto adhoc_resources = scord::adhoc_storage::resources{adhoc_nodes}; try { const auto adhoc_storage = scord::register_adhoc_storage( server, name, scord::adhoc_storage::type::gekkofs, adhoc_storage_ctx, adhoc_resources); scord::job::requirements reqs(inputs, outputs, expected_outputs, adhoc_storage); const auto job = scord::register_job( server, scord::job::resources{job_nodes}, reqs, 0); const auto transfer = scord::transfer_datasets( server, job, sources, targets, qos_limits, mapping); scord::transfer_update(server, transfer.id(), 10.0f); fmt::print(stdout, "ADM_transfer_update() remote procedure completed " "successfully\n"); exit(EXIT_SUCCESS); } catch(const std::exception& e) { fmt::print(stderr, "FATAL: ADM_transfer_update() failed: {}\n", e.what()); exit(EXIT_FAILURE); } }
examples/cxx/CMakeLists.txt +2 −2 Viewed Changes for examples/cxx/CMakeLists.txt: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ list(APPEND cxx_examples_with_controller ADM_deploy_adhoc_storage ADM_terminate_adhoc_storage # transfers ADM_transfer_datasets ADM_get_transfer_priority ADM_set_transfer_priority ADM_cancel_transfer ADM_get_pending_transfers ADM_cancel_transfer ADM_get_pending_transfers ADM_transfer_update # qos ADM_set_qos_constraints ADM_get_qos_constraints # data operations Loading @@ -56,7 +56,7 @@ foreach(example IN LISTS cxx_examples_with_controller cxx_examples_without_contr add_executable(${example}_cxx) target_sources(${example}_cxx PRIVATE ${example}.cpp) target_link_libraries(${example}_cxx PUBLIC fmt::fmt libscord cxx_examples_common) PUBLIC fmt::fmt spdlog::spdlog libscord cxx_examples_common) set_target_properties(${example}_cxx PROPERTIES OUTPUT_NAME ${example}) endforeach() Loading
src/common/net/server.cpp +1 −0 Viewed Changes for src/common/net/server.cpp: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include <filesystem> #include <string> #include <system_error> #include <fmt/std.h> #include <fmt/format.h> #ifdef SCORD_DEBUG_BUILD Loading