struct
#include <src/vt/group/group_manager.h>
GroupManager A core VT component that can create and manage groups of nodes.
Enables rooted and collective asynchronous construction of groups of nodes. The default group is all the nodes in the communicator, which is the group a normal broadcast targets. Beyond this, both the VT system and users can dynamically create groups in a fully distributed manner.
Base classes
-
template<typename T>struct vt::runtime::component::Component<GroupManager>
Component
class for a generic VT runtime module, CRTP'ed over the component's actual type
Derived classes
-
template<typename T>struct GroupManagerT
- Group manager that handles typed actions that are registered for system use.
Public types
-
using RegionType = region::
Region - using RegionPtrType = std::unique_ptr<RegionType>
- using GroupInfoType = Info
- using GroupInfoPtrType = std::unique_ptr<GroupInfoType>
- using GroupContainerType = std::unordered_map<GroupType, GroupInfoPtrType>
- using ActionGroupType = std::function<void(GroupType)>
-
using TreeType = collective::
tree:: Tree - using TreePtrType = std::unique_ptr<TreeType>
- using ActionListType = std::vector<ActionType>
- using ActionContainerType = std::unordered_map<RemoteOperationIDType, ActionListType>
-
using ReduceType = collective::
reduce:: Reduce - using ReducePtrType = ReduceType*
-
using CollectiveScopeType = collective::
CollectiveScope
Constructors, destructors, conversion operators
- GroupManager()
- Construct the GroupManager.
- ~GroupManager() virtual
Public functions
- auto name() -> std::string override
- Get the name of the component.
- void setupDefaultGroup()
- Setup the default group spanning all nodes. Called by the VT system at startup so broadcasts can take place.
-
void AddNewTempGroup(const region::
Region:: ListType& range, GroupType group) - Cache group created by multicast. This allows for reusing the same group.
-
auto GetTempGroupForRange(const region::
Region:: ListType& range) -> std::optional<GroupType> - Return (if any) group associated with given range of nodes.
- auto newGroup(RegionPtrType in_region, bool const is_static, ActionGroupType action) -> GroupType
- Create a new rooted group.
- auto newGroup(RegionPtrType in_region, ActionGroupType action) -> GroupType
- Create a new rooted group.
- auto newGroupCollective(bool const in_group, ActionGroupType action, bool make_mpi_group = false) -> GroupType
- Create a group collectively, must be called on all nodes.
- void deleteGroupCollective(GroupType group_id)
- Delete an existing group that is no longer needed.
- auto newGroupCollectiveLabel(GroupCollectiveLabelTagType) -> GroupType
- Generate the next group ID.
- auto inGroup(GroupType const group) -> bool
- Query whether this node is part of a group.
- auto getGroupComm(GroupType const group_id) -> MPI_Comm
- Get MPI_Comm from VT group.
-
template<typename MsgT, ActiveTypedFnType<MsgT>* f>void sendMsg(GroupType const group, MsgT* msg)
-
template<auto f>void sendMsg(GroupType const group, typename FuncTraits<decltype(f)>::MsgT* msg)
- auto groupReducer(GroupType const group) -> ReducePtrType
- Get the reducer associated with a group to reduce over it.
- auto groupRoot(GroupType const group) const -> NodeType
- Get the root node for a group.
- auto isGroupDefault(GroupType const group) const -> bool
- Check if a group is the default group (all nodes, default spanning tree)
- void addCleanupAction(ActionType action)
- Add a cleanup action.
- auto getNextOpID() -> RemoteOperationIDType
- Get the next operation ID.
-
template<typename SerializerT>void serialize(SerializerT& s)
Function documentation
void vt:: group:: GroupManager:: AddNewTempGroup(const region:: Region:: ListType& range,
GroupType group)
Cache group created by multicast. This allows for reusing the same group.
Parameters | |
---|---|
range in | list of nodes that are part of given group |
group in | group to cache |
GroupType vt:: group:: GroupManager:: newGroup(RegionPtrType in_region,
bool const is_static,
ActionGroupType action)
Create a new rooted group.
Parameters | |
---|---|
in_region in | list of nodes to include |
is_static in | whether the group is static after creation |
action in | action to execute when group is finished construction |
Returns | the group ID |
GroupType vt:: group:: GroupManager:: newGroup(RegionPtrType in_region,
ActionGroupType action)
Create a new rooted group.
Parameters | |
---|---|
in_region in | list of nodes to include |
action in | action to execute when group is finished construction |
Returns | the group ID |
GroupType vt:: group:: GroupManager:: newGroupCollective(bool const in_group,
ActionGroupType action,
bool make_mpi_group = false)
Create a group collectively, must be called on all nodes.
Parameters | |
---|---|
in_group in | whether this node is included the new group |
action in | action to execute when group is finished construction |
make_mpi_group in | whether VT should create an underlying MPI group |
Returns | the group ID |
void vt:: group:: GroupManager:: deleteGroupCollective(GroupType group_id)
Delete an existing group that is no longer needed.
Parameters | |
---|---|
group_id in | the id for the group |
GroupType vt:: group:: GroupManager:: newGroupCollectiveLabel(GroupCollectiveLabelTagType)
Generate the next group ID.
Returns | the group ID |
---|
MPI_Comm vt:: group:: GroupManager:: getGroupComm(GroupType const group_id)
Get MPI_Comm from VT group.
Parameters | |
---|---|
group_id in | the group ID |
Returns | the MPI_Comm associated with the group; or the default communicator if none. |
ReducePtrType vt:: group:: GroupManager:: groupReducer(GroupType const group)
Get the reducer associated with a group to reduce over it.
Parameters | |
---|---|
group in | the group ID |
Returns | pointer to the reducer |
bool vt:: group:: GroupManager:: isGroupDefault(GroupType const group) const
Check if a group is the default group (all nodes, default spanning tree)
Parameters | |
---|---|
group in | the group ID |
Returns | whether it is the default group |
void vt:: group:: GroupManager:: addCleanupAction(ActionType action)
Add a cleanup action.
Parameters | |
---|---|
action in | the action |
RemoteOperationIDType vt:: group:: GroupManager:: getNextOpID()
Get the next operation ID.
Returns | the operation ID |
---|