Commit 595f0032 authored by Ramon Nou's avatar Ramon Nou
Browse files

remove output file

parent 5517dc0e
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -317,6 +317,7 @@ open(const std::filesystem::path& filepath, int flags, ::mode_t mode,
    // We don't check if it exists, we just create it if flags is set to O_CREAT
    // We don't check if it exists, we just create it if flags is set to O_CREAT


    if(flags & O_CREAT) {
    if(flags & O_CREAT) {
        fs_plugin->unlink(filepath);
        recursive_mkdir(filepath, fs_plugin);
        recursive_mkdir(filepath, fs_plugin);
    }
    }


+3 −1
Original line number Original line Diff line number Diff line
@@ -50,7 +50,8 @@ mpio_write::operator()() {
        // We need to open the file and ask size (using fs_plugin)
        // We need to open the file and ask size (using fs_plugin)
        m_input_file = std::make_unique<posix_file::file>(
        m_input_file = std::make_unique<posix_file::file>(
                posix_file::open(m_input_path, O_RDONLY, 0, m_fs_i_type));
                posix_file::open(m_input_path, O_RDONLY, 0, m_fs_i_type));
        LOGGER_INFO("Worker: Opening {} --> handler {} ", m_input_path, m_input_file->handle());     
        remove (m_output_path.c_str());
        LOGGER_INFO("Worker: Opening {} --> handler {} / fileSize {} --- Output {} ", m_input_path, m_input_file->handle(), m_file_size, m_output_path);     
        std::size_t file_size = m_file_size;
        std::size_t file_size = m_file_size;


        // compute the number of blocks in the file
        // compute the number of blocks in the file
@@ -180,6 +181,7 @@ mpio_write::progress(int ongoing_index) {
        m_input_file->close();
        m_input_file->close();
        // step 2. write buffer data in parallel to the PFS
        // step 2. write buffer data in parallel to the PFS
        //LOGGER_INFO("START WRITING file {}", m_output_path);
        //LOGGER_INFO("START WRITING file {}", m_output_path);
               
        const auto output_file =
        const auto output_file =
                mpioxx::file::open(m_workers, m_output_path,
                mpioxx::file::open(m_workers, m_output_path,
                                   mpioxx::file_open_mode::create |
                                   mpioxx::file_open_mode::create |
+0 −1
Original line number Original line Diff line number Diff line
@@ -73,7 +73,6 @@ seq_mixed_operation::operator()() {
            m_buffer_regions.emplace_back(m_buffer.data() + i * block_size,
            m_buffer_regions.emplace_back(m_buffer.data() + i * block_size,
                                          block_size);
                                          block_size);
        }
        }

        m_output_file = std::make_unique<posix_file::file>(posix_file::create(
        m_output_file = std::make_unique<posix_file::file>(posix_file::create(
                m_output_path, O_WRONLY, S_IRUSR | S_IWUSR, m_fs_o_type));
                m_output_path, O_WRONLY, S_IRUSR | S_IWUSR, m_fs_o_type));