Loading src/master.cpp +24 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,8 @@ #include "proto/rpc/response.hpp" #include "proto/mpi/message.hpp" #include "parallel_request.hpp" #include <regex> #include <fstream> using namespace std::literals; namespace mpi = boost::mpi; Loading Loading @@ -152,7 +154,7 @@ master_server::mpi_listener_ult() { auto msg = world.iprobe(); if(!msg) { std::this_thread::sleep_for(1000us); std::this_thread::sleep_for(10ms); // thallium::thread::self().sleep(m_network_engine, 10); continue; } Loading Loading @@ -342,6 +344,21 @@ master_server::shutdown(const network::request& req) { void master_server::transfer_dataset_internal(pending_transfer& pt) { // setup regex // Read the regular expression pattern from the file auto patternFile = "/lustre/project/nhr-admire/shared/nek_regex4cargo.txt"; std::ifstream file(patternFile); std::string patternStr; if (file.is_open()) { std::getline(file, patternStr); file.close(); } else { LOGGER_ERROR("opening pattern file {}", patternFile); return; } LOGGER_INFO("Using pattern str '{}' for regex from file '{}'", patternStr, patternFile); std::regex pattern(patternStr); mpi::communicator world; std::vector<cargo::dataset> v_s_new; std::vector<cargo::dataset> v_d_new; Loading Loading @@ -385,6 +402,11 @@ master_server::transfer_dataset_internal(pending_transfer& pt) { // We need to get filename from the original root // path (d.path) plus the path from f, removing the // initial path p (taking care of the trailing /) //LOGGER_INFO("GKFS file {} checking ...", s_new.path()); if(!std::regex_match(s_new.path(), pattern)) { LOGGER_INFO("GKFS file {} IGNORED", s_new.path()); continue; } auto leading = p.size(); if(leading > 0 and p.back() == '/') { leading--; Loading @@ -400,6 +422,7 @@ master_server::transfer_dataset_internal(pending_transfer& pt) { v_s_new.push_back(s_new); v_d_new.push_back(d_new); } //break; } } else { fs->stat(s.path(), &buf); Loading src/net/server.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -343,6 +343,7 @@ server::run() { LOGGER_INFO("LIBGKFS_HOSTS_FILE env variable set to: {}", gkfs_hosts); } LOGGER_INFO(""); LOGGER_INFO("[[ Start up successful, awaiting requests... ]]"); Loading src/worker/mpio_write.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,7 @@ mpio_write::progress(int ongoing_index) { } // step 2. write buffer data in parallel to the PFS //LOGGER_INFO("START WRITING file {}", m_output_path); const auto output_file = mpioxx::file::open(m_workers, m_output_path, mpioxx::file_open_mode::create | Loading Loading @@ -238,6 +239,7 @@ mpio_write::progress(int ongoing_index) { return -1; } //LOGGER_INFO("END WRITING file {}", m_output_path); m_status = error_code::success; return -1; Loading Loading
src/master.cpp +24 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,8 @@ #include "proto/rpc/response.hpp" #include "proto/mpi/message.hpp" #include "parallel_request.hpp" #include <regex> #include <fstream> using namespace std::literals; namespace mpi = boost::mpi; Loading Loading @@ -152,7 +154,7 @@ master_server::mpi_listener_ult() { auto msg = world.iprobe(); if(!msg) { std::this_thread::sleep_for(1000us); std::this_thread::sleep_for(10ms); // thallium::thread::self().sleep(m_network_engine, 10); continue; } Loading Loading @@ -342,6 +344,21 @@ master_server::shutdown(const network::request& req) { void master_server::transfer_dataset_internal(pending_transfer& pt) { // setup regex // Read the regular expression pattern from the file auto patternFile = "/lustre/project/nhr-admire/shared/nek_regex4cargo.txt"; std::ifstream file(patternFile); std::string patternStr; if (file.is_open()) { std::getline(file, patternStr); file.close(); } else { LOGGER_ERROR("opening pattern file {}", patternFile); return; } LOGGER_INFO("Using pattern str '{}' for regex from file '{}'", patternStr, patternFile); std::regex pattern(patternStr); mpi::communicator world; std::vector<cargo::dataset> v_s_new; std::vector<cargo::dataset> v_d_new; Loading Loading @@ -385,6 +402,11 @@ master_server::transfer_dataset_internal(pending_transfer& pt) { // We need to get filename from the original root // path (d.path) plus the path from f, removing the // initial path p (taking care of the trailing /) //LOGGER_INFO("GKFS file {} checking ...", s_new.path()); if(!std::regex_match(s_new.path(), pattern)) { LOGGER_INFO("GKFS file {} IGNORED", s_new.path()); continue; } auto leading = p.size(); if(leading > 0 and p.back() == '/') { leading--; Loading @@ -400,6 +422,7 @@ master_server::transfer_dataset_internal(pending_transfer& pt) { v_s_new.push_back(s_new); v_d_new.push_back(d_new); } //break; } } else { fs->stat(s.path(), &buf); Loading
src/net/server.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -343,6 +343,7 @@ server::run() { LOGGER_INFO("LIBGKFS_HOSTS_FILE env variable set to: {}", gkfs_hosts); } LOGGER_INFO(""); LOGGER_INFO("[[ Start up successful, awaiting requests... ]]"); Loading
src/worker/mpio_write.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,7 @@ mpio_write::progress(int ongoing_index) { } // step 2. write buffer data in parallel to the PFS //LOGGER_INFO("START WRITING file {}", m_output_path); const auto output_file = mpioxx::file::open(m_workers, m_output_path, mpioxx::file_open_mode::create | Loading Loading @@ -238,6 +239,7 @@ mpio_write::progress(int ongoing_index) { return -1; } //LOGGER_INFO("END WRITING file {}", m_output_path); m_status = error_code::success; return -1; Loading