From 6aacdb2866a45bd2724fad87cd3f743d9fd50a9f Mon Sep 17 00:00:00 2001 From: Ramon Nou Date: Wed, 22 Nov 2023 13:51:55 +0100 Subject: [PATCH] Update version to 0.3.3 and fix fallocate alternative for beegfs --- CMakeLists.txt | 2 +- spack/packages/cargo/package.py | 8 ++++---- src/master.cpp | 9 +++++++-- src/posix_file/posix_file/file.hpp | 9 +++++++++ 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3da3f20..f76e44f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ cmake_minimum_required(VERSION 3.19) project( cargo - VERSION 0.3.2 + VERSION 0.3.3 LANGUAGES C CXX ) diff --git a/spack/packages/cargo/package.py b/spack/packages/cargo/package.py index e16dcb6..77ee987 100644 --- a/spack/packages/cargo/package.py +++ b/spack/packages/cargo/package.py @@ -27,7 +27,7 @@ class Cargo(CMakePackage): """A parallel data stager for malleable applications.""" homepage = "https://storage.bsc.es/gitlab/hpc/cargo" - url = "https://storage.bsc.es/gitlab/hpc/cargo/-/archive/v0.3.2/cargo-v0.3.2.tar.bz2" + url = "https://storage.bsc.es/gitlab/hpc/cargo/-/archive/v0.3.3/cargo-v0.3.3.tar.bz2" git = "https://storage.bsc.es/gitlab/hpc/cargo.git" maintainers("alberto-miranda") @@ -38,7 +38,7 @@ class Cargo(CMakePackage): version("0.2.0", sha256="fd7fa31891b3961dcb376556ec5fa028bf512d96a7c688a160f9dade58dae36f") version("0.3.1", sha256="613485354e24c4b97cb6d045657569f94dc1d9bbb391b5a166f8d18b3595428b") version("0.3.2", sha256="ceb6bcb738a35fb41f40b7b1cdd8a806d99995a227980e8ced61dd90418e5960") - + version("0.3.3", sha256="ceb6bcb738a35fb41f40b7b1cdd8a806d99995a227980e8ced61dd90418e5960") # build variants variant('build_type', default='Release', @@ -71,8 +71,8 @@ class Cargo(CMakePackage): # specific dependencies # v0.1.0+ depends_on("argobots@1.1", when='@0.1.0:') - depends_on("mochi-margo@0.9.8", when='@0.1.0:') - depends_on("mochi-thallium@0.10.1", when='@0.1.0:') + depends_on("mochi-margo@0.14.1:", when='@0.1.0:') + depends_on("mochi-thallium@0.11.3:", when='@0.1.0:') depends_on("boost@1.71 +program_options +mpi", when='@:0.1.0') depends_on("boost@1.71 +iostreams", when='@0.1.0: +tests') diff --git a/src/master.cpp b/src/master.cpp index a75526e..a6c0a4d 100644 --- a/src/master.cpp +++ b/src/master.cpp @@ -267,9 +267,14 @@ master_server::transfer_datasets(const network::request& req, s_new.path(f); // We need to get filename from the original root // path (d.path) plus the path from f, removing the - // initial path p + // initial path p (taking care of the trailing /) + auto leading = p.size(); + if(leading>0 and p.back() == '/') { + leading--; + } + d_new.path(d.path() / std::filesystem::path( - f.string().substr(p.size() + 1))); + f.string().substr(leading + 1))); LOGGER_DEBUG("Expanded file {} -> {}", s_new.path(), d_new.path()); diff --git a/src/posix_file/posix_file/file.hpp b/src/posix_file/posix_file/file.hpp index f94bd0f..03b4bc7 100644 --- a/src/posix_file/posix_file/file.hpp +++ b/src/posix_file/posix_file/file.hpp @@ -189,7 +189,16 @@ public: static_cast(len)); if(ret == -1) { + // Try an alternative to fallocate for beegfs + if(errno == EOPNOTSUPP) { + ret = ::posix_fallocate(m_handle.native(), offset, + static_cast(len)); + if (ret == -1) { + throw io_error("posix_file::file::posix_fallocate", errno); + } else return; + } throw io_error("posix_file::file::fallocate", errno); + } } -- GitLab