Loading CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ cmake_minimum_required(VERSION 3.19) project( cargo VERSION 0.3.0 VERSION 0.3.1 LANGUAGES C CXX ) Loading src/worker/sequential.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -31,17 +31,20 @@ namespace cargo { cargo::error_code seq_operation::operator()() { LOGGER_CRITICAL("{}: to be implemented", __FUNCTION__); m_status = cargo::error_code::not_implemented; return cargo::error_code::not_implemented; } cargo::error_code seq_operation::progress() const { return error_code::success; return m_status; } int seq_operation::progress(int ongoing_index) { return ++ongoing_index; ongoing_index++; m_status = cargo::error_code::not_implemented; return -1; } } // namespace cargo src/worker/sequential.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ private: mpi::communicator m_comm; std::filesystem::path m_input_path; std::filesystem::path m_output_path; cargo::error_code m_status; }; } // namespace cargo Loading src/worker/worker.cpp +18 −19 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ worker::run() { auto op = I->second.first.get(); int index = I->second.second; if(op) { if(op->t() == tag::pread or op->t() == tag::pwrite) { index = op->progress(index); if(index == -1) { // operation finished Loading @@ -135,7 +135,6 @@ worker::run() { } } } } if(m_ops.size() == 0) { std::this_thread::sleep_for(150ms); Loading Loading
CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ cmake_minimum_required(VERSION 3.19) project( cargo VERSION 0.3.0 VERSION 0.3.1 LANGUAGES C CXX ) Loading
src/worker/sequential.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -31,17 +31,20 @@ namespace cargo { cargo::error_code seq_operation::operator()() { LOGGER_CRITICAL("{}: to be implemented", __FUNCTION__); m_status = cargo::error_code::not_implemented; return cargo::error_code::not_implemented; } cargo::error_code seq_operation::progress() const { return error_code::success; return m_status; } int seq_operation::progress(int ongoing_index) { return ++ongoing_index; ongoing_index++; m_status = cargo::error_code::not_implemented; return -1; } } // namespace cargo
src/worker/sequential.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ private: mpi::communicator m_comm; std::filesystem::path m_input_path; std::filesystem::path m_output_path; cargo::error_code m_status; }; } // namespace cargo Loading
src/worker/worker.cpp +18 −19 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ worker::run() { auto op = I->second.first.get(); int index = I->second.second; if(op) { if(op->t() == tag::pread or op->t() == tag::pwrite) { index = op->progress(index); if(index == -1) { // operation finished Loading @@ -135,7 +135,6 @@ worker::run() { } } } } if(m_ops.size() == 0) { std::this_thread::sleep_for(150ms); Loading