OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
MasterNode< SolutionState_t, NeighborStrategy_t > Class Template Reference

#include <MasterNode.h>

Inheritance diagram for MasterNode< SolutionState_t, NeighborStrategy_t >:
Collaboration diagram for MasterNode< SolutionState_t, 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
void collect (std::ostringstream &states)
 collect all best values from all other masters

Private Attributes

char * serialized_best_values_
 pointer to MPI window holding current best solution state
size_t buf_size_upper_bound_
 and upper bound on the allocated memory in the MPI window
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
size_t revision_
 my solution state revision number
std::vector< size_t > revision_state_
 revision numbers of my neighbors

Detailed Description

template<class SolutionState_t, class NeighborStrategy_t>
class MasterNode< SolutionState_t, NeighborStrategy_t >

Definition at line 55 of file MasterNode.h.

Constructor & Destructor Documentation

◆ MasterNode()

template<class SolutionState_t, class NeighborStrategy_t>
MasterNode< SolutionState_t, NeighborStrategy_t >::MasterNode ( MPI_Comm master_comm,
size_t buf_size_upper_bound,
size_t dim,
int island_id )
inline

Definition at line 60 of file MasterNode.h.

◆ ~MasterNode()

template<class SolutionState_t, class NeighborStrategy_t>
MasterNode< SolutionState_t, NeighborStrategy_t >::~MasterNode ( )
inline

Definition at line 90 of file MasterNode.h.

Member Function Documentation

◆ collect()

template<class SolutionState_t, class NeighborStrategy_t>
void MasterNode< SolutionState_t, NeighborStrategy_t >::collect ( std::ostringstream & states)
inline

collect all best values from all other masters

Definition at line 115 of file MasterNode.h.

◆ store()

template<class SolutionState_t, class NeighborStrategy_t>
void MasterNode< SolutionState_t, NeighborStrategy_t >::store ( char * local_state,
size_t buffer_size )
inline

store my best values

Definition at line 98 of file MasterNode.h.

Member Data Documentation

◆ buf_size_upper_bound_

template<class SolutionState_t, class NeighborStrategy_t>
size_t MasterNode< SolutionState_t, NeighborStrategy_t >::buf_size_upper_bound_
private

and upper bound on the allocated memory in the MPI window

Definition at line 161 of file MasterNode.h.

◆ collectFrom_

template<class SolutionState_t, class NeighborStrategy_t>
std::set<size_t> MasterNode< SolutionState_t, NeighborStrategy_t >::collectFrom_
private

neighbors we collect solution states from

Definition at line 172 of file MasterNode.h.

◆ master_comm_

template<class SolutionState_t, class NeighborStrategy_t>
MPI_Comm MasterNode< SolutionState_t, NeighborStrategy_t >::master_comm_
private

Definition at line 163 of file MasterNode.h.

◆ myID_

template<class SolutionState_t, class NeighborStrategy_t>
size_t MasterNode< SolutionState_t, NeighborStrategy_t >::myID_
private

Definition at line 169 of file MasterNode.h.

◆ numMasters_

template<class SolutionState_t, class NeighborStrategy_t>
size_t MasterNode< SolutionState_t, NeighborStrategy_t >::numMasters_
private

Definition at line 162 of file MasterNode.h.

◆ revision_

template<class SolutionState_t, class NeighborStrategy_t>
size_t MasterNode< SolutionState_t, NeighborStrategy_t >::revision_
private

my solution state revision number

Definition at line 174 of file MasterNode.h.

◆ revision_state_

template<class SolutionState_t, class NeighborStrategy_t>
std::vector<size_t> MasterNode< SolutionState_t, NeighborStrategy_t >::revision_state_
private

revision numbers of my neighbors

Definition at line 176 of file MasterNode.h.

◆ serialized_best_values_

template<class SolutionState_t, class NeighborStrategy_t>
char* MasterNode< SolutionState_t, NeighborStrategy_t >::serialized_best_values_
private

pointer to MPI window holding current best solution state

Definition at line 158 of file MasterNode.h.

◆ win_

template<class SolutionState_t, class NeighborStrategy_t>
MPI_Win MasterNode< SolutionState_t, NeighborStrategy_t >::win_
private

Definition at line 166 of file MasterNode.h.

◆ win_rev_

template<class SolutionState_t, class NeighborStrategy_t>
MPI_Win MasterNode< SolutionState_t, NeighborStrategy_t >::win_rev_
private

Definition at line 167 of file MasterNode.h.


The documentation for this class was generated from the following file: