diff --git a/src/vt/objgroup/proxy/proxy_objgroup.h b/src/vt/objgroup/proxy/proxy_objgroup.h index 7b8c2e36a4..26dc7a99ae 100644 --- a/src/vt/objgroup/proxy/proxy_objgroup.h +++ b/src/vt/objgroup/proxy/proxy_objgroup.h @@ -318,6 +318,11 @@ struct Proxy { */ ProxyElm operator()(NodeType node) const; + template + void serialize(Serializer& s) { + s | proxy_; + } + private: ObjGroupProxyType proxy_ = no_obj_group; /**< The raw proxy ID bits */ }; diff --git a/src/vt/vrt/collection/balance/lb_invoke/lb_manager.h b/src/vt/vrt/collection/balance/lb_invoke/lb_manager.h index 2d080e8b95..dfd4e573ff 100644 --- a/src/vt/vrt/collection/balance/lb_invoke/lb_manager.h +++ b/src/vt/vrt/collection/balance/lb_invoke/lb_manager.h @@ -252,6 +252,22 @@ struct LBManager : runtime::component::Component { */ std::shared_ptr getLoadModel() { return model_; } + template + void serialize(Serializer& s) { + s | num_invocations_ + | num_release_ + | cached_phase_ + // ambiguous: hasNoninSerialize, isEnum + //| cached_lb_ + | destroy_lb_ + | synced_in_lb_ + | listeners_ + | proxy_; + // LoadModel is pure abstract interface + // | base_model_ + // | model_; + } + protected: /** * \internal \brief Collectively construct a new load balancer diff --git a/tests/unit/runtime/test_memory_footprint.nompi.cc b/tests/unit/runtime/test_memory_footprint.nompi.cc index d7345d73ea..facab577ec 100644 --- a/tests/unit/runtime/test_memory_footprint.nompi.cc +++ b/tests/unit/runtime/test_memory_footprint.nompi.cc @@ -47,6 +47,7 @@ #include #include "vt/configs/arguments/args.h" #include "vt/timetrigger/time_trigger_manager.h" +#include "vt/vrt/collection/balance/lb_invoke/lb_manager.h" #include "test_harness.h" @@ -71,4 +72,12 @@ TEST_F(TestMemoryFootprinting, test_time_trigger_manager) { fmt::print("getMemoryFootprint: {}\n", size); } +TEST_F(TestMemoryFootprinting, test_lb_manager) { + vt::vrt::collection::balance::LBManager lb_manager; + fmt::print("sizeof instance: {}\n", sizeof(lb_manager)); + + auto size = checkpoint::getMemoryFootprint(lb_manager); + fmt::print("getMemoryFootprint: {}\n", size); +} + }}} /* end namespace vt::tests::unit */