OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
Implements a node in the network of all pilots, exposing store and collect operations on a specific set of neighbors. More...
#include <MasterNode.h>
Inherits NeighborStrategy_t.
Public Member Functions | |
MasterNode (MPI_Comm master_comm, size_t buf_size_upper_bound, size_t dim, int island_id) | |
~MasterNode () | |
void | store (char *local_state, size_t buffer_size) |
store my best values More... | |
void | collect (std::ostringstream &states) |
collect all best values from all other masters More... | |
Private Attributes | |
char * | serialized_best_values_ |
pointer to MPI window holding current best solution state More... | |
size_t | buf_size_upper_bound_ |
and upper bound on the allocated memory in the MPI window More... | |
size_t | numMasters_ |
MPI_Comm | master_comm_ |
MPI_Win | win_ |
MPI_Win | win_rev_ |
size_t | myID_ |
std::set< size_t > | collectFrom_ |
neighbors we collect solution states from More... | |
size_t | revision_ |
my solution state revision number More... | |
std::vector< size_t > | revision_state_ |
revision numbers of my neighbors More... | |
Implements a node in the network of all pilots, exposing store and collect operations on a specific set of neighbors.
Using the neighbor strategy a set of neighbors we collect solution state from (and they collect from us) is defined. Using this set of neighbors the solution states propagate throughout the network. The store and collect operations are implemented using one sided MPI communication methods (simulating shared memory). A revision number is used to prevent receiving previously collected solution states from neighbors.
Definition at line 38 of file MasterNode.h.
|
inline |
Definition at line 43 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_, 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_rev_.
|
inline |
|
inline |
collect all best values from all other masters
Definition at line 98 of file MasterNode.h.
References MasterNode< SolutionState_t, NeighborStrategy_t >::buf_size_upper_bound_, 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 >::win_, and MasterNode< SolutionState_t, NeighborStrategy_t >::win_rev_.
|
inline |
store my best values
Definition at line 81 of file MasterNode.h.
References MasterNode< SolutionState_t, NeighborStrategy_t >::buf_size_upper_bound_, endl(), MasterNode< SolutionState_t, NeighborStrategy_t >::revision_, MasterNode< SolutionState_t, NeighborStrategy_t >::serialized_best_values_, MasterNode< SolutionState_t, NeighborStrategy_t >::win_, and MasterNode< SolutionState_t, NeighborStrategy_t >::win_rev_.
|
private |
and upper bound on the allocated memory in the MPI window
Definition at line 144 of file MasterNode.h.
Referenced by MasterNode< SolutionState_t, NeighborStrategy_t >::collect(), and MasterNode< SolutionState_t, NeighborStrategy_t >::store().
|
private |
neighbors we collect solution states from
Definition at line 155 of file MasterNode.h.
Referenced by MasterNode< SolutionState_t, NeighborStrategy_t >::collect(), and MasterNode< SolutionState_t, NeighborStrategy_t >::MasterNode().
|
private |
Definition at line 146 of file MasterNode.h.
|
private |
Definition at line 152 of file MasterNode.h.
Referenced by MasterNode< SolutionState_t, NeighborStrategy_t >::collect(), and MasterNode< SolutionState_t, NeighborStrategy_t >::MasterNode().
|
private |
Definition at line 145 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 157 of file MasterNode.h.
Referenced by MasterNode< SolutionState_t, NeighborStrategy_t >::MasterNode(), and MasterNode< SolutionState_t, NeighborStrategy_t >::store().
|
private |
revision numbers of my neighbors
Definition at line 159 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 current best solution state
Definition at line 141 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 |
Definition at line 149 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 |
Definition at line 150 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().