Skip to content

Commit

Permalink
#1009: memory footprinting: remove virtual serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Nov 21, 2020
1 parent c5142b2 commit 9b22874
Show file tree
Hide file tree
Showing 51 changed files with 63 additions and 139 deletions.
4 changes: 2 additions & 2 deletions src/vt/collective/collective_alg.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
#if !defined INCLUDED_COLLECTIVE_COLLECTIVE_ALG_H
#define INCLUDED_COLLECTIVE_COLLECTIVE_ALG_H

#include <checkpoint/checkpoint.h>

#include "vt/config.h"
#include "vt/collective/tree/tree.h"
#include "vt/activefn/activefn.h"
Expand Down Expand Up @@ -79,8 +81,6 @@ struct CollectiveAlg :
virtual barrier::Barrier,
virtual scatter::Scatter
{
checkpoint_virtual_serialize_derived_from(Component)

/*----------------------------------------------------------------------------
*
* CollectiveAlg class implements all collective operations:
Expand Down
4 changes: 2 additions & 2 deletions src/vt/configs/arguments/args.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
#if !defined INCLUDED_VT_CONFIGS_ARGUMENTS_ARGS_H
#define INCLUDED_VT_CONFIGS_ARGUMENTS_ARGS_H

#include <checkpoint/checkpoint.h>

#include "vt/configs/arguments/app_config.h"
#include "vt/runtime/component/component.h"

Expand All @@ -67,8 +69,6 @@ namespace vt { namespace arguments {
* through the command-line arguments.
*/
struct ArgConfig : runtime::component::Component<ArgConfig> {
checkpoint_virtual_serialize_derived_from(Component)

/// Parse the arguments into ArgConfig.
/// Re-assigns argc/argv to remove consumed arguments.
/// On success the tuple will be {-1, ""}. Otherwise the exit code
Expand Down
4 changes: 2 additions & 2 deletions src/vt/context/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
#include <memory>
#include <mpi.h>

#include <checkpoint/checkpoint.h>

#include "vt/config.h"
#include "vt/runtime/component/component_pack.h"
#include "vt/context/context_attorney_fwd.h"
Expand All @@ -69,8 +71,6 @@ namespace vt { namespace ctx {
* functionality analogous to \c MPI_Comm_size and \c MPI_Comm_rank.
*/
struct Context : runtime::component::Component<Context> {
checkpoint_virtual_serialize_derived_from(Component)

/**
* \internal
* \brief Construct the context.
Expand Down
4 changes: 2 additions & 2 deletions src/vt/event/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
#include "vt/event/event_holder.h"
#include "vt/event/event_msgs.h"

#include <checkpoint/checkpoint.h>

#include <memory>
#include <vector>
#include <list>
Expand Down Expand Up @@ -84,8 +86,6 @@ enum class EventState : int8_t {
* Component to track events in the system to trigger actions or other events
*/
struct AsyncEvent : runtime::component::PollableComponent<AsyncEvent> {
checkpoint_virtual_serialize_derived_from(PollableComponent)

using EventRecordTypeType = eEventRecord;
using EventManagerType = EventIDManager;
using EventStateType = EventState;
Expand Down
4 changes: 2 additions & 2 deletions src/vt/group/group_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
#include "vt/collective/collective_scope.h"
#include "vt/runtime/component/component_pack.h"

#include <checkpoint/checkpoint.h>

#include <memory>
#include <unordered_map>
#include <cstdlib>
Expand All @@ -84,8 +86,6 @@ namespace vt { namespace group {
* can dynamically create groups in a fully distributed manner.
*/
struct GroupManager : runtime::component::Component<GroupManager> {
checkpoint_virtual_serialize_derived_from(Component)

using RegionType = region::Region;
using RegionPtrType = std::unique_ptr<RegionType>;
using GroupInfoType = Info;
Expand Down
4 changes: 2 additions & 2 deletions src/vt/messaging/active.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
#include <memory>
#include <mpi.h>

#include <checkpoint/checkpoint.h>

#include "vt/config.h"
#include "vt/activefn/activefn.h"
#include "vt/messaging/active.fwd.h"
Expand Down Expand Up @@ -312,8 +314,6 @@ struct MultiMsg;
* - \ref sendpayload
*/
struct ActiveMessenger : runtime::component::PollableComponent<ActiveMessenger> {
checkpoint_virtual_serialize_derived_from(PollableComponent)

using BufferedMsgType = BufferedActiveMsg;
using MessageType = ShortMessage;
using CountType = int32_t;
Expand Down
4 changes: 0 additions & 4 deletions src/vt/messaging/listener.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
#if !defined INCLUDED_VT_MESSAGING_LISTENER_H
#define INCLUDED_VT_MESSAGING_LISTENER_H

#include <checkpoint/checkpoint.h>

#include "vt/config.h"

namespace vt { namespace messaging {
Expand All @@ -62,8 +60,6 @@ namespace vt { namespace messaging {
struct Listener {
virtual ~Listener() {}

checkpoint_virtual_serialize_root()

/**
* \brief The pure virtual method for listening to all message sends while
* registered
Expand Down
4 changes: 0 additions & 4 deletions src/vt/objgroup/dispatch/dispatch_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
#if !defined INCLUDED_VT_OBJGROUP_DISPATCH_DISPATCH_BASE_H
#define INCLUDED_VT_OBJGROUP_DISPATCH_DISPATCH_BASE_H

#include <checkpoint/checkpoint.h>

#include "vt/config.h"
#include "vt/objgroup/common.h"
#include "vt/messaging/message/smart_ptr.h"
Expand All @@ -66,8 +64,6 @@ struct DispatchBase {

virtual ~DispatchBase() = default;

checkpoint_virtual_serialize_root()

/*
* Dispatch to the handler; the base is closed around the proper object
* pointer that is type-erased here
Expand Down
6 changes: 0 additions & 6 deletions src/vt/objgroup/holder/holder_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
#if !defined INCLUDED_VT_OBJGROUP_HOLDER_HOLDER_BASE_H
#define INCLUDED_VT_OBJGROUP_HOLDER_HOLDER_BASE_H

#include <checkpoint/checkpoint.h>

#include "vt/config.h"
#include "vt/objgroup/common.h"

Expand All @@ -56,8 +54,6 @@ struct HolderBase {
virtual ~HolderBase() = default;
virtual bool exists() = 0;

checkpoint_virtual_serialize_root()

template <typename Serializer>
void serialize(Serializer& s) {}
};
Expand All @@ -67,8 +63,6 @@ struct HolderObjBase : HolderBase {
virtual ~HolderObjBase() = default;
virtual ObjT* get() = 0;

checkpoint_virtual_serialize_derived_from(HolderBase)

template <typename Serializer>
void serialize(Serializer& s) {}
};
Expand Down
4 changes: 2 additions & 2 deletions src/vt/objgroup/holder/holder_basic.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
#if !defined INCLUDED_VT_OBJGROUP_HOLDER_HOLDER_BASIC_H
#define INCLUDED_VT_OBJGROUP_HOLDER_HOLDER_BASIC_H

#include <checkpoint/checkpoint.h>

#include "vt/config.h"
#include "vt/objgroup/common.h"
#include "vt/objgroup/holder/holder_base.h"
Expand All @@ -54,8 +56,6 @@ namespace vt { namespace objgroup { namespace holder {
template <typename ObjT>
struct HolderBasic final : HolderObjBase<ObjT> {

checkpoint_virtual_serialize_derived_from(HolderObjBase<ObjT>)

explicit HolderBasic(ObjT* in_obj)
: obj_(in_obj)
{ }
Expand Down
2 changes: 0 additions & 2 deletions src/vt/objgroup/holder/holder_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ namespace vt { namespace objgroup { namespace holder {
template <template <typename> class UserPtr, typename ObjT>
struct HolderUser final : HolderObjBase<ObjT> {

checkpoint_virtual_serialize_derived_from(HolderObjBase<ObjT>)

explicit HolderUser(UserPtr<ObjT> in_obj)
: obj_(in_obj)
{ }
Expand Down
3 changes: 2 additions & 1 deletion src/vt/objgroup/manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
#include "vt/messaging/message/smart_ptr.h"
#include "vt/messaging/pending_send.h"

#include <checkpoint/checkpoint.h>

#include <memory>
#include <functional>
#include <unordered_map>
Expand All @@ -82,7 +84,6 @@ namespace vt { namespace objgroup {
* implemented as object groups, such as the load balancers.
*/
struct ObjGroupManager : runtime::component::Component<ObjGroupManager> {
checkpoint_virtual_serialize_derived_from(Component)

template <typename ObjT>
using ProxyType = proxy::Proxy<ObjT>;
Expand Down
1 change: 0 additions & 1 deletion src/vt/parameterization/parameterization.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ static void dataMessageHandler(DataMsg<Tuple>* msg) {
* \warning This is an experimental component.
*/
struct Param : runtime::component::Component<Param> {
checkpoint_virtual_serialize_derived_from(Component)

std::string name() override { return "Param"; }

Expand Down
4 changes: 2 additions & 2 deletions src/vt/phase/phase_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
#include "vt/phase/phase_hook_enum.h"
#include "vt/phase/phase_hook_id.h"

#include <checkpoint/checkpoint.h>

#include <unordered_map>
#include <map>

Expand Down Expand Up @@ -81,8 +83,6 @@ struct NextMsg;
* registered and are always run in a collective epoch.
*/
struct PhaseManager : runtime::component::Component<PhaseManager> {
checkpoint_virtual_serialize_derived_from(Component)

using HookIDType = typename std::underlying_type<PhaseHook>::type;
using HookMapType = std::map<std::size_t, ActionType>;
using HookIDMapType = std::unordered_map<HookIDType, HookMapType>;
Expand Down
2 changes: 0 additions & 2 deletions src/vt/pipe/pipe_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ struct PipeManager
: runtime::component::Component<PipeManager>,
PipeManagerTL, PipeManagerTyped
{
checkpoint_virtual_serialize_derived_from(Component)

template <typename FunctorT>
using GetMsgType = typename util::FunctorExtractor<FunctorT>::MessageType;
using Void = V;
Expand Down
2 changes: 0 additions & 2 deletions src/vt/pmpi/pmpi_component.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ namespace vt { namespace pmpi {
* and infrastructure lifetimes such as registrations of events.
*/
struct PMPIComponent : runtime::component::Component<PMPIComponent> {
checkpoint_virtual_serialize_derived_from(Component)

PMPIComponent() = default;

std::string name() override { return "PMPI"; }
Expand Down
4 changes: 2 additions & 2 deletions src/vt/pool/pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
#if !defined INCLUDED_POOL_POOL_H
#define INCLUDED_POOL_POOL_H

#include <checkpoint/checkpoint.h>

#include "vt/config.h"
#include "vt/runtime/component/component_pack.h"
#include "vt/pool/static_sized/memory_pool_equal.h"
Expand All @@ -67,8 +69,6 @@ namespace vt { namespace pool {
* buckets with free-list to quickly allocate and de-allocate.
*/
struct Pool : runtime::component::Component<Pool> {
checkpoint_virtual_serialize_derived_from(Component)

using SizeType = size_t;
using HeaderType = Header;
using HeaderManagerType = HeaderManager;
Expand Down
4 changes: 2 additions & 2 deletions src/vt/rdma/rdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@

#include "vt/collective/collective_scope.h"

#include <checkpoint/checkpoint.h>

#include <unordered_map>
#include <cassert>

Expand All @@ -91,8 +93,6 @@ namespace vt { namespace rdma {
* RDMA.
*/
struct RDMAManager : runtime::component::Component<RDMAManager> {
checkpoint_virtual_serialize_derived_from(Component)

using RDMA_BitsType = Bits;
using RDMA_StateType = State;
using RDMA_TypeType = Type;
Expand Down
4 changes: 2 additions & 2 deletions src/vt/rdmahandle/manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
#include "vt/runtime/component/component_pack.h"
#include "vt/collective/collective_scope.h"

#include <checkpoint/checkpoint.h>

namespace vt { namespace rdma {

/** \file */
Expand All @@ -81,8 +83,6 @@ struct InformRDMAMsg;
* \brief RDMA Handle Manager for creation of node- or index-level handles
*/
struct Manager : runtime::component::Component<Manager> {
checkpoint_virtual_serialize_derived_from(Component)

using ProxyType = vt::objgroup::proxy::Proxy<Manager>;
using ElemToHandle = std::unordered_map<int64_t, RDMA_HandleType>;
using HandleToManager = std::unordered_map<RDMA_HandleType, ObjGroupProxyType>;
Expand Down
4 changes: 2 additions & 2 deletions src/vt/registry/registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
#include <unordered_map>
#include <cassert>

#include <checkpoint/checkpoint.h>

#include "vt/config.h"
#include "vt/activefn/activefn.h"
#include "vt/handler/handler.h"
Expand All @@ -62,8 +64,6 @@ namespace vt { namespace registry {
* \brief A VT component that manages registered active handlers.
*/
struct Registry : runtime::component::Component<Registry> {
checkpoint_virtual_serialize_derived_from(Component)

using HandlerManagerType = HandlerManager;
using HandlerBitsType = eHandlerBits;
using TaggerHandlerType = std::tuple<TagType, HandlerType>;
Expand Down
4 changes: 0 additions & 4 deletions src/vt/runtime/component/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
#if !defined INCLUDED_VT_RUNTIME_COMPONENT_BASE_H
#define INCLUDED_VT_RUNTIME_COMPONENT_BASE_H

#include <checkpoint/checkpoint.h>

#include "vt/configs/types/types_type.h"
#include "vt/runtime/component/diagnostic.h"
#include "vt/runtime/component/bufferable.h"
Expand All @@ -62,8 +60,6 @@ struct ComponentPack;
* \brief The abstract \c BaseComponent for VT runtime component pack
*/
struct BaseComponent : Diagnostic, Bufferable, Progressable {
checkpoint_virtual_serialize_root()

/**
* \struct DepsPack
*
Expand Down
4 changes: 0 additions & 4 deletions src/vt/runtime/component/component.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ struct ComponentConstructor<
*/
template <typename T>
struct Component : BaseComponent {
checkpoint_virtual_serialize_derived_from(BaseComponent)

Component() = default;

/**
Expand Down Expand Up @@ -174,8 +172,6 @@ struct Component : BaseComponent {
*/
template <typename T>
struct PollableComponent : Component<T> {
checkpoint_virtual_serialize_derived_from(Component<T>)

/**
* \brief Whether the component requires the scheduler to poll
*
Expand Down
4 changes: 2 additions & 2 deletions src/vt/scheduler/scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
#include "vt/timing/timing.h"
#include "vt/runtime/component/component_pack.h"

#include <checkpoint/checkpoint.h>

#include <cassert>
#include <vector>
#include <list>
Expand Down Expand Up @@ -96,8 +98,6 @@ enum SchedulerEvent {
* components for incoming work.
*/
struct Scheduler : runtime::component::Component<Scheduler> {
checkpoint_virtual_serialize_derived_from(Component)

using SchedulerEventType = SchedulerEvent;
using TriggerType = std::function<void()>;
using TriggerContainerType = std::list<TriggerType>;
Expand Down
2 changes: 0 additions & 2 deletions src/vt/sequence/sequencer.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ struct Sequencer
: runtime::component::Component<Sequencer>,
TaggedSequencer<SeqType, SeqMigratableTriggerType>
{
checkpoint_virtual_serialize_derived_from(Component)

std::string name() override { return "Sequencer"; }

template <typename Serializer>
Expand Down
Loading

0 comments on commit 9b22874

Please sign in to comment.