Commit e013f22a authored by Ramon Nou's avatar Ramon Nou
Browse files

Sequential fix

parent eeb1791f
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ cmake_minimum_required(VERSION 3.19)

project(
  cargo
  VERSION 0.3.0
  VERSION 0.3.1
  LANGUAGES C CXX
)

+5 −2
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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
+18 −19
Original line number Diff line number Diff line
@@ -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
@@ -135,7 +135,6 @@ worker::run() {
                    }
                }
            }
            }

            if(m_ops.size() == 0) {
                std::this_thread::sleep_for(150ms);