|
OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
|
#include <MasterNode.h>
Inherits NeighborStrategy_t.
Classes | |
| struct | Meta_t |
Public Member Functions | |
| MasterNode (MPI_Comm master_comm, std::size_t buf_size_upper_bound, std::size_t dim, int island_id) | |
| ~MasterNode () | |
| void | store (char *local_state, std::size_t buffer_size) |
| store my best values | |
| void | collect (std::ostringstream &states) |
| collect all best values from all other masters | |
Private Attributes | |
| char * | serialized_best_values_ |
| pointer to MPI window holding header (revision + size) and best solution state | |
| std::size_t | buf_size_upper_bound_ |
| upper bound on the serialized payload (excludes the header) | |
| std::size_t | win_bytes_ |
| total window size in bytes: sizeof(Meta_t) + buf_size_upper_bound_ | |
| std::size_t | numMasters_ |
| MPI_Comm | master_comm_ |
| MPI_Win | win_ |
| std::size_t | myID_ |
| std::set< std::size_t > | collectFrom_ |
| neighbors we collect solution states from | |
| std::size_t | revision_ |
| my solution state revision number | |
| std::vector< std::size_t > | revision_state_ |
| revision numbers of my neighbors | |
Definition at line 53 of file MasterNode.h.
|
inline |
Definition at line 67 of file MasterNode.h.
References MasterNode< SolutionState_t, NeighborStrategy_t >::collectFrom_, MasterNode< SolutionState_t, NeighborStrategy_t >::myID_, MasterNode< SolutionState_t, NeighborStrategy_t >::numMasters_, MasterNode< SolutionState_t, NeighborStrategy_t >::revision_state_, MasterNode< SolutionState_t, NeighborStrategy_t >::serialized_best_values_, MasterNode< SolutionState_t, NeighborStrategy_t >::win_, and MasterNode< SolutionState_t, NeighborStrategy_t >::win_bytes_.
|
inline |
Definition at line 98 of file MasterNode.h.
References MasterNode< SolutionState_t, NeighborStrategy_t >::serialized_best_values_, and MasterNode< SolutionState_t, NeighborStrategy_t >::win_.
|
inline |
collect all best values from all other masters
Definition at line 126 of file MasterNode.h.
References MasterNode< SolutionState_t, NeighborStrategy_t >::collectFrom_, MasterNode< SolutionState_t, NeighborStrategy_t >::myID_, MasterNode< SolutionState_t, NeighborStrategy_t >::numMasters_, readSolutionState(), MasterNode< SolutionState_t, NeighborStrategy_t >::Meta_t::revision, MasterNode< SolutionState_t, NeighborStrategy_t >::revision_state_, MasterNode< SolutionState_t, NeighborStrategy_t >::Meta_t::size, MasterNode< SolutionState_t, NeighborStrategy_t >::win_, MasterNode< SolutionState_t, NeighborStrategy_t >::win_bytes_, and writeSolutionState().

|
inline |
store my best values
Definition at line 104 of file MasterNode.h.
References MasterNode< SolutionState_t, NeighborStrategy_t >::buf_size_upper_bound_, MasterNode< SolutionState_t, NeighborStrategy_t >::Meta_t::revision, MasterNode< SolutionState_t, NeighborStrategy_t >::revision_, MasterNode< SolutionState_t, NeighborStrategy_t >::serialized_best_values_, MasterNode< SolutionState_t, NeighborStrategy_t >::Meta_t::size, and MasterNode< SolutionState_t, NeighborStrategy_t >::win_.
|
private |
upper bound on the serialized payload (excludes the header)
Definition at line 174 of file MasterNode.h.
Referenced by MasterNode< SolutionState_t, NeighborStrategy_t >::store().
|
private |
neighbors we collect solution states from
Definition at line 188 of file MasterNode.h.
Referenced by MasterNode< SolutionState_t, NeighborStrategy_t >::collect(), and MasterNode< SolutionState_t, NeighborStrategy_t >::MasterNode().
|
private |
Definition at line 178 of file MasterNode.h.
|
private |
Definition at line 185 of file MasterNode.h.
Referenced by MasterNode< SolutionState_t, NeighborStrategy_t >::collect(), and MasterNode< SolutionState_t, NeighborStrategy_t >::MasterNode().
|
private |
Definition at line 177 of file MasterNode.h.
Referenced by MasterNode< SolutionState_t, NeighborStrategy_t >::collect(), and MasterNode< SolutionState_t, NeighborStrategy_t >::MasterNode().
|
private |
my solution state revision number
Definition at line 190 of file MasterNode.h.
Referenced by MasterNode< SolutionState_t, NeighborStrategy_t >::store().
|
private |
revision numbers of my neighbors
Definition at line 192 of file MasterNode.h.
Referenced by MasterNode< SolutionState_t, NeighborStrategy_t >::collect(), and MasterNode< SolutionState_t, NeighborStrategy_t >::MasterNode().
|
private |
pointer to MPI window holding header (revision + size) and best solution state
Definition at line 171 of file MasterNode.h.
Referenced by MasterNode< SolutionState_t, NeighborStrategy_t >::MasterNode(), MasterNode< SolutionState_t, NeighborStrategy_t >::store(), and MasterNode< SolutionState_t, NeighborStrategy_t >::~MasterNode().
|
private |
single window for header + solution state; all ranks must call MPI_Win_fence on it the same number of times, in the same order, which requires collectFrom_ to have equal cardinality on every rank
Definition at line 183 of file MasterNode.h.
Referenced by MasterNode< SolutionState_t, NeighborStrategy_t >::collect(), MasterNode< SolutionState_t, NeighborStrategy_t >::MasterNode(), MasterNode< SolutionState_t, NeighborStrategy_t >::store(), and MasterNode< SolutionState_t, NeighborStrategy_t >::~MasterNode().
|
private |
total window size in bytes: sizeof(Meta_t) + buf_size_upper_bound_
Definition at line 176 of file MasterNode.h.
Referenced by MasterNode< SolutionState_t, NeighborStrategy_t >::collect(), and MasterNode< SolutionState_t, NeighborStrategy_t >::MasterNode().