3.1.4.11. c3po.mpi.MPIMasterPhysicsDriver module
Contain the class MPIMasterPhysicsDriver.
- class c3po.mpi.MPIMasterPhysicsDriver.MPIMasterPhysicsDriver(workerProcess, localPhysicsDriver=None)
Bases:
PhysicsDriverMPIMasterPhysicsDriveris used by a master process to control a (set of) remotec3po.PhysicsDriver.PhysicsDriveras a local one.It can, in addition, be in charge of a local one (can be usefull for codes using an internal collaborative MPI parallelization).
Inherits from
c3po.PhysicsDriver.PhysicsDriver. All the methods ofc3po.PhysicsDriver.PhysicsDriverare implemented and consist in commanding the worker to execute them. Methods inherited fromc3po.DataAccessor.DataAccessorare NOT implemented (apart from thesetInput(Double/Int/String)Valuemethods, for convenience). Use anc3po.mpi.MPIMasterExchanger.MPIMasterExchangerto exchange data with the worker.- __init__(workerProcess, localPhysicsDriver=None)
Build a
MPIMasterPhysicsDriverobject.- Parameters:
workerProcess (MPIRemoteProcess, MPIRemoteProcesses or MPICollectiveProcess) – A
c3po.mpi.MPIRemoteProcess.MPIRemoteProcess, ac3po.mpi.MPIRemoteProcesses.MPIRemoteProcessesor ac3po.mpi.MPICollectiveProcess.MPICollectiveProcessidentifying the worker process(es). Each worker process can be in charge of only onec3po.PhysicsDriver.PhysicsDriver. In case of ac3po.mpi.MPICollectiveProcess.MPICollectiveProcess, the MPIComm must include all the workers + the master, and only them.localPhysicsDriver – A
c3po.PhysicsDriver.PhysicsDrivertheMPIMasterPhysicsDriverobject will run in the same time than the workers. It enables the master to contribute to a collaborative calculations.
- abortTimeStep()
- computeTimeStep()
- forget(label, method)
- getInitStatus()
- getInputValuesNames()
- getIterateStatus()
- getMPIComm()
- getOutputDoubleValue(name)
- getOutputIntValue(name)
- getOutputStringValue(name)
- getOutputValuesNames()
- getSolveStatus()
- getStationaryMode()
- getValueType(name)
- getValueUnit(name)
- init()
See
PhysicsDriver.init().
- initTimeStep(dt)
- initialize()
- isStationary()
- iterate()
- iterateTimeStep()
- presentTime()
- recvData(data, collectiveOperator=mpi4py.MPI.MIN)
INTERNAL
- resetTime(time_)
- restore(label, method)
- save(label, method)
See
PhysicsDriver.save().
- sendData(tag, data=None)
INTERNAL
- setDataFile(datafile)
- setDataManagerToFree(idDataManager)
INTERNAL
- setInputDoubleValue(name, value)
- setInputIntValue(name, value)
- setInputStringValue(name, value)
- setStationaryMode(stationaryMode)
- solve()
- solveTimeStep()
- terminate()
- validateTimeStep()