3.1.4.10. c3po.mpi.MPIMasterExchanger module
Contain the class MPIMasterExchanger.
- class c3po.mpi.MPIMasterExchanger.MPIMasterExchanger(workerProcesses, idExchangerWorker, localExchanger=None)
Bases:
ExchangerMPIMasterExchangeris used by the master to control remotec3po.Exchanger.Exchanger.It can, in addition, be in charge of a local one (that allows the master to participate to the calculation).
The
exchange()method ofMPIMasterExchangercommands workers to exchange data.- __init__(workerProcesses, idExchangerWorker, localExchanger=None)
Build a
MPIMasterExchangerobject.- Parameters:
workerProcesses (list[MPIRemoteProcess | MPIRemoteProcesses | MPICollectiveProcess]) – The list of
MPIRemoteProcess,MPIRemoteProcessesorMPICollectiveProcessidentifying the remote processes involved in the exchange. In the case ofMPICollectiveProcess, the mpiComm must include all the workers + the master, and only them.idExchangerWorker – Number identifying the controlled
c3po.Exchanger.Exchangerin the involved workers (seec3po.mpi.MPIWorker.MPIWorker).localExchanger (Exchanger) – A
c3po.Exchanger.ExchangertheMPIMasterExchangerobject will run in the same time than the workers. It enables the master to contribute to a collective computation.
- clean()
- exchange()
Trigger the exchange of data.