From ed58b88382764240dd2e3324c0cb1ce244211f2c Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Tue, 21 Oct 2025 16:38:54 +0200 Subject: [PATCH 1/6] Update hwmalloc to heap-config branch --- ext/hwmalloc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/hwmalloc b/ext/hwmalloc index 89e113a..8b27a3e 160000 --- a/ext/hwmalloc +++ b/ext/hwmalloc @@ -1 +1 @@ -Subproject commit 89e113a354582fe964bab124cd24d54252e8c9e0 +Subproject commit 8b27a3e4dd166ebae4f97b921fe83669078bcc88 From 9dbbe737656e12ba49c3ba4fe880509130667324 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Wed, 22 Oct 2025 11:43:19 +0200 Subject: [PATCH 2/6] Update hwmalloc commit --- ext/hwmalloc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/hwmalloc b/ext/hwmalloc index 8b27a3e..ca54f36 160000 --- a/ext/hwmalloc +++ b/ext/hwmalloc @@ -1 +1 @@ -Subproject commit 8b27a3e4dd166ebae4f97b921fe83669078bcc88 +Subproject commit ca54f36411ddb2b0690d0948d73bf6129d5132cc From d53e1edef937b9a6a102dbced958edd382461954 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Wed, 22 Oct 2025 12:05:16 +0200 Subject: [PATCH 3/6] Update hwmalloc --- ext/hwmalloc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/hwmalloc b/ext/hwmalloc index ca54f36..ffefcef 160000 --- a/ext/hwmalloc +++ b/ext/hwmalloc @@ -1 +1 @@ -Subproject commit ca54f36411ddb2b0690d0948d73bf6129d5132cc +Subproject commit ffefcefea4a0cc889a3aebf69e5bed21d681cfc3 From d28c769fd6f9b5f5774414cd99376e4438044520 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Fri, 24 Oct 2025 11:40:53 +0200 Subject: [PATCH 4/6] Update never_free and num_reserve_segment params to use hwmalloc::heap_config --- include/oomph/context.hpp | 5 +++-- src/context.cpp | 5 +++-- src/libfabric/context.cpp | 9 ++++++--- src/libfabric/context.hpp | 4 ++-- src/mpi/context.hpp | 7 ++++--- src/ucx/context.hpp | 7 ++++--- 6 files changed, 22 insertions(+), 15 deletions(-) diff --git a/include/oomph/context.hpp b/include/oomph/context.hpp index ac5f66f..cc74344 100644 --- a/include/oomph/context.hpp +++ b/include/oomph/context.hpp @@ -10,6 +10,7 @@ #pragma once #include +#include #include #include #include @@ -41,8 +42,8 @@ class context std::unique_ptr m_schedule; public: - context(MPI_Comm comm, bool thread_safe = true, bool message_pool_never_free = false, - std::size_t message_pool_reserve = 1); + context(MPI_Comm comm, bool thread_safe = true, + hwmalloc::heap_config const& = hwmalloc::get_default_heap_config()); context(context const&) = delete; diff --git a/src/context.cpp b/src/context.cpp index e6be5ad..73d5551 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -8,6 +8,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ #include +#include #include // paths relative to backend @@ -24,9 +25,9 @@ namespace oomph { context::context(MPI_Comm comm, bool thread_safe, //unsigned int num_tag_ranges, - bool message_pool_never_free, std::size_t message_pool_reserve) + hwmalloc::heap_config const& heap_config) : m_mpi_comm{comm} -, m(m_mpi_comm.get(), thread_safe, message_pool_never_free, message_pool_reserve) +, m(m_mpi_comm.get(), thread_safe, heap_config) , m_schedule{std::make_unique()} //, m_tag_range_factory(num_tag_ranges, m->num_tag_bits()) { diff --git a/src/libfabric/context.cpp b/src/libfabric/context.cpp index 9365be8..5621a83 100644 --- a/src/libfabric/context.cpp +++ b/src/libfabric/context.cpp @@ -10,6 +10,9 @@ #include // #include + +#include + // paths relative to backend #include #include @@ -23,10 +26,10 @@ static NS_DEBUG::enable_print src_deb("__SRC__"); using controller_type = libfabric::controller; -context_impl::context_impl(MPI_Comm comm, bool thread_safe, bool message_pool_never_free, - std::size_t message_pool_reserve) +context_impl::context_impl(MPI_Comm comm, bool thread_safe, + hwmalloc::heap_config const& heap_config) : context_base(comm, thread_safe) -, m_heap{this, message_pool_never_free, message_pool_reserve} +, m_heap{this, heap_config} , m_recv_cb_queue(128) , m_recv_cb_cancel(8) { diff --git a/src/libfabric/context.hpp b/src/libfabric/context.hpp index 256cb9f..a7c0c11 100644 --- a/src/libfabric/context.hpp +++ b/src/libfabric/context.hpp @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -59,8 +60,7 @@ class context_impl : public context_base callback_queue m_recv_cb_cancel; public: - context_impl(MPI_Comm comm, bool thread_safe, bool message_pool_never_free, - std::size_t message_pool_reserve); + context_impl(MPI_Comm comm, bool thread_safe, hwmalloc::heap_config const& heap_config); context_impl(context_impl const&) = delete; context_impl(context_impl&&) = delete; diff --git a/src/mpi/context.hpp b/src/mpi/context.hpp index e31bc73..53f1e81 100644 --- a/src/mpi/context.hpp +++ b/src/mpi/context.hpp @@ -9,6 +9,8 @@ */ #pragma once +#include + #include // paths relative to backend @@ -34,10 +36,9 @@ class context_impl : public context_base shared_request_queue m_req_queue; public: - context_impl(MPI_Comm comm, bool thread_safe, bool message_pool_never_free, - std::size_t message_pool_reserve) + context_impl(MPI_Comm comm, bool thread_safe, hwmalloc::heap_config const& heap_config) : context_base(comm, thread_safe) - , m_heap{this, message_pool_never_free, message_pool_reserve} + , m_heap{this, heap_config} //, m_rma_context{m_mpi_comm} { // get largest allowed tag value diff --git a/src/ucx/context.hpp b/src/ucx/context.hpp index 231068c..2f790ae 100644 --- a/src/ucx/context.hpp +++ b/src/ucx/context.hpp @@ -14,6 +14,8 @@ #include +#include + #include // paths relative to backend @@ -74,15 +76,14 @@ class context_impl : public context_base friend struct worker_t; public: // ctors - context_impl(MPI_Comm mpi_c, bool thread_safe, bool message_pool_never_free, - std::size_t message_pool_reserve) + context_impl(MPI_Comm mpi_c, bool thread_safe, hwmalloc::heap_config const& heap_config) : context_base(mpi_c, thread_safe) #if defined OOMPH_UCX_USE_PMI , m_db(address_db_pmi(context_base::m_mpi_comm)) #else , m_db(address_db_mpi(context_base::m_mpi_comm)) #endif - , m_heap{this, message_pool_never_free, message_pool_reserve} + , m_heap{this, heap_config} , m_rma_context() , m_recv_req_queue(128) , m_cancel_recv_req_queue(128) From 7055358ca2a9c136a61603448a7b93c49d54ee3e Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Fri, 24 Oct 2025 11:41:21 +0200 Subject: [PATCH 5/6] Update hwmalloc submodule --- ext/hwmalloc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/hwmalloc b/ext/hwmalloc index ffefcef..2078a51 160000 --- a/ext/hwmalloc +++ b/ext/hwmalloc @@ -1 +1 @@ -Subproject commit ffefcefea4a0cc889a3aebf69e5bed21d681cfc3 +Subproject commit 2078a51ef862ba22705f3c28f4d399d78980604b From 32adb9ef5f029b6e14c758e1a6abf1ef070e13de Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Tue, 4 Nov 2025 19:58:32 +0100 Subject: [PATCH 6/6] Update hwmalloc --- ext/hwmalloc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/hwmalloc b/ext/hwmalloc index 2078a51..c3ddc35 160000 --- a/ext/hwmalloc +++ b/ext/hwmalloc @@ -1 +1 @@ -Subproject commit 2078a51ef862ba22705f3c28f4d399d78980604b +Subproject commit c3ddc35f58ad6709388c209dfaec59b1ff40d472