pomerol  2.1
Public Member Functions | Data Fields | Protected Attributes
pMPI::MPIWorker Struct Reference

Abstraction of an MPI worker process. More...

#include <mpi_dispatcher.hpp>

Public Member Functions

 MPIWorker (MPI_Comm const &Comm, int Boss)
 
void receive_order ()
 Check if there is an outstanding order from the master. More...
 
void report_job_done ()
 Notify the master about a job's completion. More...
 
bool is_finished ()
 Has this worker process finished execution. More...
 
bool is_working ()
 Is a job being processed by this worker? More...
 
JobId current_job () const
 Get the ID of the job currently assigned to this worker. More...
 

Data Fields

MPI_Comm Comm
 MPI communicator. More...
 
const WorkerId id
 Worker ID of this process. More...
 
const int boss
 Rank of the master process. More...
 

Protected Attributes

JobId current_job_
 ID of the job currently assigned to this worker. More...
 
MPI_Request req
 An MPI request handle used for non-blocking communications. More...
 
WorkerTag Status
 Current state of this worker. More...
 

Detailed Description

Abstraction of an MPI worker process.

Definition at line 44 of file mpi_dispatcher.hpp.

Constructor & Destructor Documentation

◆ MPIWorker()

pMPI::MPIWorker::MPIWorker ( MPI_Comm const &  Comm,
int  Boss 
)

Constructor.

Parameters
[in]CommMPI communicator
[in]BossRank of the master process.

Member Function Documentation

◆ current_job()

JobId pMPI::MPIWorker::current_job ( ) const
inline

Get the ID of the job currently assigned to this worker.

Definition at line 66 of file mpi_dispatcher.hpp.

◆ is_finished()

bool pMPI::MPIWorker::is_finished ( )

Has this worker process finished execution.

◆ is_working()

bool pMPI::MPIWorker::is_working ( )

Is a job being processed by this worker?

◆ receive_order()

void pMPI::MPIWorker::receive_order ( )

Check if there is an outstanding order from the master.

◆ report_job_done()

void pMPI::MPIWorker::report_job_done ( )

Notify the master about a job's completion.

Field Documentation

◆ boss

const int pMPI::MPIWorker::boss

Rank of the master process.

Definition at line 50 of file mpi_dispatcher.hpp.

◆ Comm

MPI_Comm pMPI::MPIWorker::Comm

MPI communicator.

Definition at line 46 of file mpi_dispatcher.hpp.

◆ current_job_

JobId pMPI::MPIWorker::current_job_
protected

ID of the job currently assigned to this worker.

Definition at line 66 of file mpi_dispatcher.hpp.

◆ id

const WorkerId pMPI::MPIWorker::id

Worker ID of this process.

Definition at line 48 of file mpi_dispatcher.hpp.

◆ req

MPI_Request pMPI::MPIWorker::req
protected

An MPI request handle used for non-blocking communications.

Definition at line 72 of file mpi_dispatcher.hpp.

◆ Status

WorkerTag pMPI::MPIWorker::Status
protected

Current state of this worker.

Definition at line 74 of file mpi_dispatcher.hpp.


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