fpmas 1.6
Public Member Functions | List of all members
fpmas::synchro::hard::TerminationAlgorithm Class Reference

#include <termination.h>

Inheritance diagram for fpmas::synchro::hard::TerminationAlgorithm:
Inheritance graph
[legend]
Collaboration diagram for fpmas::synchro::hard::TerminationAlgorithm:
Collaboration graph
[legend]

Public Member Functions

 TerminationAlgorithm (fpmas::api::communication::MpiCommunicator &comm, fpmas::api::communication::TypedMpi< Color > &color_mpi)
 
void terminate (api::Server &server) override
 
virtual void terminate (Server &server)=0
 

Detailed Description

api::TerminationAlgorithm implementation.

More precisely, this class implements the Dijkstra-Feijen-Gasteren algorithm to establish the termination of the provided api::Server.

Constructor & Destructor Documentation

◆ TerminationAlgorithm()

fpmas::synchro::hard::TerminationAlgorithm::TerminationAlgorithm ( fpmas::api::communication::MpiCommunicator comm,
fpmas::api::communication::TypedMpi< Color > &  color_mpi 
)
inline

TerminationAlgorithm constructor.

Parameters
commMPI communicator used to exchange termination messages
color_mpiTyped MPI instance used to transmit Color

Member Function Documentation

◆ terminate()

void fpmas::synchro::hard::TerminationAlgorithm::terminate ( api::Server server)
overridevirtual

Apply the termination algorithm to the provided server.

Termination is determined when all the processes have entered this function and no more request is pending in the global process. In consequence, the argument server must still be able to respond to requests from processes that have not terminated yet while the termination algorithm is applied to ensure progress. This can be performed in practice by the termination algorithm using the Server::handleIncomingRequests() method.

Moreover, the termination algorithm must toggle the Server Epoch once termination has been detected.

Parameters
serverserver to terminate

Implements fpmas::synchro::hard::api::TerminationAlgorithm.


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