diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a260711ca1e02a2aedf2acfc3d86e0c8efe00c6e..8dd76465c8b1f31907132487c8f8e943ac0cbadf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,6 @@ # Compilation of scord and execution of tests -image: bscstorage/scord:0.2.0-wip +image: bscstorage/scord:0.3.0 stages: - build diff --git a/CMakeLists.txt b/CMakeLists.txt index b0d5385e640f185dbc84706bf8dd354a8006f7eb..97c3dafb59cefccb7d9b21dd5bd53b3bd27942c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ cmake_minimum_required(VERSION 3.19) project( scord - VERSION 0.2.2 + VERSION 0.3.0 LANGUAGES C CXX ) diff --git a/docker/0.2.0-wip-debug/Makefile b/docker/0.2.0-wip-debug/Makefile deleted file mode 100644 index 8360186090ed435e5c033dc727963c6c665db21e..0000000000000000000000000000000000000000 --- a/docker/0.2.0-wip-debug/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -.PHONY: all - -all: - docker build -t bscstorage/scord:0.2.0-wip-debug . diff --git a/docker/0.2.0-wip-debug/patches/mochi-thallium.patch b/docker/0.2.0-wip-debug/patches/mochi-thallium.patch deleted file mode 100644 index f9ba1f73a849245202c2b075c7164f1aca2d535c..0000000000000000000000000000000000000000 --- a/docker/0.2.0-wip-debug/patches/mochi-thallium.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff --git a/include/thallium/packed_data.hpp b/include/thallium/packed_data.hpp -index 9e6e76e..37e64d3 100644 ---- a/include/thallium/packed_data.hpp -+++ b/include/thallium/packed_data.hpp -@@ -14,13 +14,13 @@ - - namespace thallium { - --template class callable_remote_procedure_with_context; -+template class callable_remote_procedure_with_context; - class async_response; --template class request_with_context; -+template class request_with_context; - using request = request_with_context<>; - - namespace detail { -- struct engine_impl; -+struct engine_impl; - } - - /** -@@ -36,9 +36,9 @@ class packed_data { - - private: - std::weak_ptr m_engine_impl; -- hg_handle_t m_handle = HG_HANDLE_NULL; -- hg_return_t (*m_unpack_fn)(hg_handle_t,void*) = nullptr; -- hg_return_t (*m_free_fn)(hg_handle_t,void*) = nullptr; -+ hg_handle_t m_handle = HG_HANDLE_NULL; -+ hg_return_t (*m_unpack_fn)(hg_handle_t, void*) = nullptr; -+ hg_return_t (*m_free_fn)(hg_handle_t, void*) = nullptr; - mutable std::tuple m_context; - - /** -@@ -62,6 +62,41 @@ class packed_data { - MARGO_ASSERT(ret, margo_ref_incr); - } - -+ packed_data(const packed_data&) = delete; -+ packed_data& operator=(const packed_data&) = delete; -+ -+ packed_data(packed_data&& rhs) -+ : m_engine_impl(std::move(rhs.m_engine_impl), -+ m_context(std::move(rhs.m_context))) { -+ m_handle = rhs.m_handle; -+ rhs.m_handle = HG_HANDLE_NULL; -+ m_unpack_fn = rhs.m_unpack_fn; -+ rhs.m_unpack_fn = nullptr; -+ m_free_fn = rhs.m_free_fn; -+ rhs.m_free_fn = nullptr; -+ } -+ -+ packed_data& operator=(packed_data&& rhs) { -+ -+ if(&rhs == this) { -+ return *this; -+ } -+ -+ // the original members m_handle, m_context, and m_handle are being -+ // replaced here by the ones from rhs. It may be necessary to release -+ // their resources if `packed_data` has claimed ownership over them, -+ // otherwise we would be leaking -+ m_engine_impl = std::move(rhs.m_engine_impl); -+ m_context = std::move(rhs.m_context); -+ -+ m_handle = rhs.m_handle; -+ rhs.m_handle = HG_HANDLE_NULL; -+ m_unpack_fn = rhs.m_unpack_fn; -+ rhs.m_unpack_fn = nullptr; -+ m_free_fn = rhs.m_free_fn; -+ rhs.m_free_fn = nullptr; -+ } -+ - packed_data() = default; - - public: -@@ -78,7 +113,7 @@ class packed_data { - * @tparam NewCtxArg Types of the serialization context. - * @param args Context. - */ -- template -+ template - auto with_serialization_context(NewCtxArg&&... args) { - return packed_data...>( - m_unpack_fn, m_free_fn, m_handle, m_engine_impl, diff --git a/docker/0.2.0-wip/Makefile b/docker/0.2.0-wip/Makefile deleted file mode 100644 index 67260f17f04526b2682ca43598609c5b09e72b3f..0000000000000000000000000000000000000000 --- a/docker/0.2.0-wip/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -.PHONY: all - -all: - docker build -t bscstorage/scord:0.2.0-wip . diff --git a/docker/0.2.0-wip/patches/mochi-thallium.patch b/docker/0.2.0-wip/patches/mochi-thallium.patch deleted file mode 100644 index f9ba1f73a849245202c2b075c7164f1aca2d535c..0000000000000000000000000000000000000000 --- a/docker/0.2.0-wip/patches/mochi-thallium.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff --git a/include/thallium/packed_data.hpp b/include/thallium/packed_data.hpp -index 9e6e76e..37e64d3 100644 ---- a/include/thallium/packed_data.hpp -+++ b/include/thallium/packed_data.hpp -@@ -14,13 +14,13 @@ - - namespace thallium { - --template class callable_remote_procedure_with_context; -+template class callable_remote_procedure_with_context; - class async_response; --template class request_with_context; -+template class request_with_context; - using request = request_with_context<>; - - namespace detail { -- struct engine_impl; -+struct engine_impl; - } - - /** -@@ -36,9 +36,9 @@ class packed_data { - - private: - std::weak_ptr m_engine_impl; -- hg_handle_t m_handle = HG_HANDLE_NULL; -- hg_return_t (*m_unpack_fn)(hg_handle_t,void*) = nullptr; -- hg_return_t (*m_free_fn)(hg_handle_t,void*) = nullptr; -+ hg_handle_t m_handle = HG_HANDLE_NULL; -+ hg_return_t (*m_unpack_fn)(hg_handle_t, void*) = nullptr; -+ hg_return_t (*m_free_fn)(hg_handle_t, void*) = nullptr; - mutable std::tuple m_context; - - /** -@@ -62,6 +62,41 @@ class packed_data { - MARGO_ASSERT(ret, margo_ref_incr); - } - -+ packed_data(const packed_data&) = delete; -+ packed_data& operator=(const packed_data&) = delete; -+ -+ packed_data(packed_data&& rhs) -+ : m_engine_impl(std::move(rhs.m_engine_impl), -+ m_context(std::move(rhs.m_context))) { -+ m_handle = rhs.m_handle; -+ rhs.m_handle = HG_HANDLE_NULL; -+ m_unpack_fn = rhs.m_unpack_fn; -+ rhs.m_unpack_fn = nullptr; -+ m_free_fn = rhs.m_free_fn; -+ rhs.m_free_fn = nullptr; -+ } -+ -+ packed_data& operator=(packed_data&& rhs) { -+ -+ if(&rhs == this) { -+ return *this; -+ } -+ -+ // the original members m_handle, m_context, and m_handle are being -+ // replaced here by the ones from rhs. It may be necessary to release -+ // their resources if `packed_data` has claimed ownership over them, -+ // otherwise we would be leaking -+ m_engine_impl = std::move(rhs.m_engine_impl); -+ m_context = std::move(rhs.m_context); -+ -+ m_handle = rhs.m_handle; -+ rhs.m_handle = HG_HANDLE_NULL; -+ m_unpack_fn = rhs.m_unpack_fn; -+ rhs.m_unpack_fn = nullptr; -+ m_free_fn = rhs.m_free_fn; -+ rhs.m_free_fn = nullptr; -+ } -+ - packed_data() = default; - - public: -@@ -78,7 +113,7 @@ class packed_data { - * @tparam NewCtxArg Types of the serialization context. - * @param args Context. - */ -- template -+ template - auto with_serialization_context(NewCtxArg&&... args) { - return packed_data...>( - m_unpack_fn, m_free_fn, m_handle, m_engine_impl, diff --git a/docker/0.2.0-wip/Dockerfile b/docker/0.3.0/Dockerfile similarity index 100% rename from docker/0.2.0-wip/Dockerfile rename to docker/0.3.0/Dockerfile diff --git a/docker/0.3.0/Makefile b/docker/0.3.0/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..10b8e45597262b0ba8689abdd8b5ece7dadaddc2 --- /dev/null +++ b/docker/0.3.0/Makefile @@ -0,0 +1,4 @@ +.PHONY: all + +all: + docker build -t bscstorage/scord:0.3.0 . diff --git a/docker/0.2.0-wip-debug/Dockerfile b/docker/0.4.0-wip/Dockerfile similarity index 91% rename from docker/0.2.0-wip-debug/Dockerfile rename to docker/0.4.0-wip/Dockerfile index 0caa65c0e422d51817b4291b26c942763fab0b73..fea5b4d9280194305553a00f0dea04bb270ae468 100644 --- a/docker/0.2.0-wip-debug/Dockerfile +++ b/docker/0.4.0-wip/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:testing-slim +FROM debian:bullseye-slim LABEL Description="Debian-based environment suitable to build scord" @@ -15,9 +15,8 @@ RUN apt-get update && \ automake \ gcc \ g++ \ - g++-11 \ - vim \ - gdb \ + clang \ + libc++-dev \ procps \ # AGIOS dependencies libconfig-dev \ @@ -35,6 +34,8 @@ RUN apt-get update && \ python3-venv \ # redis-plus-plus dependencies \ libhiredis-dev \ + # Slurm plugin dependencies \ + libslurm-dev \ # tests dependencies \ python3-pip && \ ### install cmake 3.23.1 ################################################### @@ -77,7 +78,7 @@ RUN apt-get update && \ cd deps/argobots && \ ./autogen.sh && \ mkdir build && cd build && \ - CFLAGS="-ggdb3 -O0" ../configure --prefix=${DEPS_INSTALL_PATH} && \ + ../configure --prefix=${DEPS_INSTALL_PATH} && \ make install -j && \ cd .. && rm -rf build && cd && \ cd deps/libfabric && \ @@ -85,7 +86,7 @@ RUN apt-get update && \ ### libfabric ./autogen.sh && \ mkdir build && cd build && \ - CFLAGS="-ggdb3 -O0" ../configure --prefix=${DEPS_INSTALL_PATH} && \ + ../configure --prefix=${DEPS_INSTALL_PATH} && \ make install -j && \ cd .. && rm -rf build && cd && \ \ @@ -99,7 +100,7 @@ RUN apt-get update && \ -DBUILD_SHARED_LIBS:BOOL=ON \ -DNA_USE_OFI:BOOL=ON \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ - -DCMAKE_BUILD_TYPE:STRING=Debug \ + -DCMAKE_BUILD_TYPE:STRING=Release \ .. && \ make install -j && \ cd .. && rm -rf build && cd && \ @@ -116,7 +117,7 @@ RUN apt-get update && \ cd deps/mochi-margo && \ ./prepare.sh && \ mkdir build && cd build && \ - CFLAGS="-ggdb3 -O0" ../configure --prefix=${DEPS_INSTALL_PATH} && \ + ../configure --prefix=${DEPS_INSTALL_PATH} && \ make -j install && \ cd .. && rm -rf build && cd && \ \ @@ -124,7 +125,7 @@ RUN apt-get update && \ cd deps/redis-plus-plus && \ mkdir build && cd build && \ cmake -DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_PATH} \ - -DCMAKE_BUILD_TYPE:STRING=Debug \ + -DCMAKE_BUILD_TYPE:STRING=Release \ .. && \ make install -j && \ cd .. && rm -rf build && cd && \ @@ -133,7 +134,7 @@ RUN apt-get update && \ cd deps/agios && \ mkdir build && cd build && \ cmake -DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_PATH} \ - -DCMAKE_BUILD_TYPE:STRING=Debug \ + -DCMAKE_BUILD_TYPE:STRING=Release \ .. && \ make install -j && \ cd .. && rm -rf build && cd && \ @@ -141,7 +142,7 @@ RUN apt-get update && \ ### cereal cd deps/cereal && \ mkdir build && cd build && \ - cmake -DCMAKE_BUILD_TYPE:STRING=Debug \ + cmake -DCMAKE_BUILD_TYPE:STRING=Release \ -DBUILD_DOC:BOOL=OFF \ -DBUILD_SANDBOX:BOOL=OFF \ -DBUILD_TESTS:BOOL=OFF \ @@ -155,7 +156,7 @@ RUN apt-get update && \ cd deps/mochi-thallium && \ mkdir build && cd build && \ cmake -DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_PATH} \ - -DCMAKE_BUILD_TYPE:STRING=Debug \ + -DCMAKE_BUILD_TYPE:STRING=Release \ .. && \ make -j install && \ cd .. && rm -rf build && cd && \ diff --git a/docker/0.4.0-wip/Makefile b/docker/0.4.0-wip/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..6596372e95cc76b1ebb00defb6bfeb5277a9026e --- /dev/null +++ b/docker/0.4.0-wip/Makefile @@ -0,0 +1,4 @@ +.PHONY: all + +all: + docker build -t bscstorage/scord:0.4.0-wip .