#include <vtkMultiProcessController.h>
Inheritance diagram for vtkMultiProcessController:
vtkMultiProcessController is used to control multiple processes/threads in a shared memory/distributed computing environment. It has methods for executing single/multiple method(s) on multiple processors, triggering registered callbacks (Remote Methods) (AddRMI(), TriggerRMI()) and communication. Please note that the communication is done using the communicator which is accessible to the user. Therefore it is possible to get the communicator with GetCommunicator() and use it to send and receive data. This is the encoured communication method. The internal (RMI) communications are done using a second internal communicator (called RMICommunicator). For the threaded controllers, this is identical to the user communicator. However, for the MPI controller, this is a communicator which shares the same process group as the user communicator but uses a different context. Therefore, the user and the internal communications can not interfere with each other (even if the same message tag is used).
Definition at line 88 of file vtkMultiProcessController.h.
[NOHEADER] | |
int | Receive (int *data, int length, int remoteProcessId, int tag) |
int | Receive (unsigned long *data, int length, int remoteProcessId, int tag) |
int | Receive (char *data, int length, int remoteProcessId, int tag) |
int | Receive (unsigned char *data, int length, int remoteProcessId, int tag) |
int | Receive (float *data, int length, int remoteProcessId, int tag) |
int | Receive (double *data, int length, int remoteProcessId, int tag) |
int | Receive (vtkDataObject *data, int remoteId, int tag) |
int | Receive (vtkDataArray *data, int remoteId, int tag) |
vtkMultiProcessController () | |
~vtkMultiProcessController () | |
void | ProcessRMI (int remoteProcessId, void *arg, int argLength, int rmiTag) |
virtual vtkMultiProcessController * | GetLocalController () |
int | MaximumNumberOfProcesses |
int | NumberOfProcesses |
int | LocalProcessId |
vtkProcessFunctionType | SingleMethod |
void * | SingleData |
vtkProcessFunctionType | MultipleMethod [MAX_PROCESSES] |
void * | MultipleData [MAX_PROCESSES] |
vtkCollection * | RMIs |
int | BreakFlag |
int | ForceDeepCopy |
vtkOutputWindow * | OutputWindow |
vtkCommunicator * | Communicator |
vtkCommunicator * | RMICommunicator |
Public Types | |
typedef vtkObject | Superclass |
enum | Consts { MAX_PROCESSES = 8192, ANY_SOURCE = -1, INVALID_SOURCE = -2, RMI_TAG = 315167, RMI_ARG_TAG = 315168, BREAK_RMI_TAG = 239954 } |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | Initialize (int *vtkNotUsed(argc), char ***vtkNotUsed(argv))=0 |
virtual void | Finalize ()=0 |
virtual void | Finalize (int finalizedExternally)=0 |
virtual void | SingleMethodExecute ()=0 |
virtual void | MultipleMethodExecute ()=0 |
virtual void | CreateOutputWindow ()=0 |
void | AddRMI (vtkRMIFunctionType, void *localArg, int tag) |
int | RemoveFirstRMI (int tag) |
void | TriggerRMI (int remoteProcessId, void *arg, int argLength, int tag) |
void | TriggerBreakRMIs () |
void | ProcessRMIs () |
virtual void | Barrier ()=0 |
virtual void | Initialize (int *vtkNotUsed(argc), char ***vtkNotUsed(argv), int initializedExternally)=0 |
virtual void | SetNumberOfProcesses (int num) |
virtual int | GetNumberOfProcesses () |
void | SetSingleMethod (vtkProcessFunctionType, void *data) |
void | SetMultipleMethod (int index, vtkProcessFunctionType, void *data) |
virtual int | GetLocalProcessId () |
virtual void | SetForceDeepCopy (int) |
virtual int | GetForceDeepCopy () |
virtual void | ForceDeepCopyOn () |
virtual void | ForceDeepCopyOff () |
void | RemoveRMI (vtkRMIFunctionType f, void *arg, int tag) |
void | TriggerRMI (int remoteProcessId, const char *arg, int tag) |
void | TriggerRMI (int remoteProcessId, int tag) |
virtual void | SetBreakFlag (int) |
virtual int | GetBreakFlag () |
virtual vtkCommunicator * | GetCommunicator () |
int | Send (int *data, int length, int remoteProcessId, int tag) |
int | Send (unsigned long *data, int length, int remoteProcessId, int tag) |
int | Send (char *data, int length, int remoteProcessId, int tag) |
int | Send (unsigned char *data, int length, int remoteProcessId, int tag) |
int | Send (float *data, int length, int remoteProcessId, int tag) |
int | Send (double *data, int length, int remoteProcessId, int tag) |
int | Send (vtkDataObject *data, int remoteId, int tag) |
int | Send (vtkDataArray *data, int remoteId, int tag) |
Static Public Member Functions | |
vtkMultiProcessController * | New () |
int | IsTypeOf (const char *type) |
vtkMultiProcessController * | SafeDownCast (vtkObject *o) |
vtkMultiProcessController * | GetGlobalController () |
void | SetGlobalController (vtkMultiProcessController *controller) |
|
Reimplemented from vtkObject. Reimplemented in vtkDummyController, vtkMPIController, vtkSocketController, and vtkThreadedController. Definition at line 92 of file vtkMultiProcessController.h. |
|
Reimplemented in vtkSocketController. Definition at line 238 of file vtkMultiProcessController.h. |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. |
|
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. Reimplemented from vtkObject. Reimplemented in vtkDummyController, vtkMPIController, vtkSocketController, and vtkThreadedController. |
|
Reimplemented from vtkObject. Reimplemented in vtkDummyController, vtkMPIController, vtkSocketController, and vtkThreadedController. |
|
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkDummyController, vtkMPIController, vtkSocketController, and vtkThreadedController. |
|
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkDummyController, vtkMPIController, vtkSocketController, and vtkThreadedController. |
|
Reimplemented from vtkObject. Reimplemented in vtkDummyController, vtkMPIController, vtkSocketController, and vtkThreadedController. |
|
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkObject. Reimplemented in vtkDummyController, vtkMPIController, vtkSocketController, and vtkThreadedController. |
|
This method is for setting up the processes. If a subclass needs to initialize process communication (i.e. MPI) it would over ride this method. Referenced by vtkThreadedController::Initialize(), vtkSocketController::Initialize(), and vtkMPIController::Initialize(). |
|
This method is for setting up the processes. If a subclass needs to initialize process communication (i.e. MPI) it would over ride this method. Provided for initialization outside vtk. Implemented in vtkMPIController. |
|
This method is for cleaning up. If a subclass needs to clean up process communication (i.e. MPI) it would over ride this method. Implemented in vtkDummyController, vtkMPIController, vtkSocketController, and vtkThreadedController. Referenced by vtkThreadedController::Finalize(), and vtkMPIController::Finalize(). |
|
This method is for cleaning up. If a subclass needs to clean up process communication (i.e. MPI) it would over ride this method. Provided for finalization outside vtk. Implemented in vtkDummyController, vtkMPIController, vtkSocketController, and vtkThreadedController. |
|
Set the number of processes you will be using. This defaults to the maximum number available. If you set this to a value higher than the default, you will get an error. Reimplemented in vtkSocketController. |
|
Set the number of processes you will be using. This defaults to the maximum number available. If you set this to a value higher than the default, you will get an error. |
|
Set the SingleMethod to f() and the UserData of the for the method to be executed by all of the processes when SingleMethodExecute is called. All the processes will start by calling this function. |
|
Execute the SingleMethod (as define by SetSingleMethod) using this->NumberOfProcesses processes. This will only return when all the processes finish executing their methods. Implemented in vtkDummyController, vtkMPIController, vtkSocketController, and vtkThreadedController. |
|
Set the MultipleMethod to f() and the UserData of the for the method to be executed by the process index when MultipleMethodExecute is called. This is for having each process start with a different function and data argument. |
|
Execute the MultipleMethods (as define by calling SetMultipleMethod for each of the required this->NumberOfProcesses methods) using this->NumberOfProcesses processes. Implemented in vtkDummyController, vtkMPIController, vtkSocketController, and vtkThreadedController. |
|
Tells you which process [0, NumProcess) you are in. Reimplemented in vtkDummyController, and vtkThreadedController. |
|
This convenience method returns the controller associated with the local process. It returns NULL until the processes are spawned. It is better if you hang on to the controller passed as an argument to the SingleMethod or MultipleMethod functions. |
|
This method can be used to tell the controller to create a special output window in which all messages are preceded by the process id. Implemented in vtkDummyController, vtkMPIController, vtkSocketController, and vtkThreadedController. |
|
By default, sending objects use shallow copy whenever possible. This flag forces the controller to use deep copies instead. This is necessary when asynchronous processing occurs (i.e. pipeline parallelism). This is only important when using vtkThreadedController. |
|
By default, sending objects use shallow copy whenever possible. This flag forces the controller to use deep copies instead. This is necessary when asynchronous processing occurs (i.e. pipeline parallelism). This is only important when using vtkThreadedController. |
|
By default, sending objects use shallow copy whenever possible. This flag forces the controller to use deep copies instead. This is necessary when asynchronous processing occurs (i.e. pipeline parallelism). This is only important when using vtkThreadedController. |
|
By default, sending objects use shallow copy whenever possible. This flag forces the controller to use deep copies instead. This is necessary when asynchronous processing occurs (i.e. pipeline parallelism). This is only important when using vtkThreadedController. |
|
Register remote method invocation in the receiving process which makes the call. It must have a unique tag as an RMI id. The vtkRMIFunctionType has several arguments: localArg (same as passed in), remoteArg, remoteArgLength (memory passed by process triggering the RMI), remoteProcessId. |
|
Remove the first RMI matching the tag. |
|
Take an RMI away. Definition at line 195 of file vtkMultiProcessController.h. References vtkRMIFunctionType. |
|
A method to trigger a method invocation in another process. |
|
A conveniance method. Called on process 0 to break "ProcessRMIs" loop on all other processes. |
|
Convenience method when the arg is a string. Definition at line 209 of file vtkMultiProcessController.h. |
|
Convenience method when there is no argument. Definition at line 216 of file vtkMultiProcessController.h. |
|
Calling this method gives control to the controller to start processing RMIs. |
|
Setting this flag to 1 will cause the ProcessRMIs loop to return. This also causes vtkUpStreamPorts to return from their WaitForUpdate loops. |
|
Setting this flag to 1 will cause the ProcessRMIs loop to return. This also causes vtkUpStreamPorts to return from their WaitForUpdate loops. |
|
|
|
This method can be used to synchronize processes/threads. Implemented in vtkDummyController, vtkMPIController, vtkSocketController, and vtkThreadedController. |
|
|
|
This method sends data to another process. Tag eliminates ambiguity when multiple sends or receives exist in the same process. Definition at line 372 of file vtkMultiProcessController.h. References Communicator, and vtkCommunicator::Send(). |
|
This method sends data to another process. Tag eliminates ambiguity when multiple sends or receives exist in the same process. Definition at line 385 of file vtkMultiProcessController.h. References Communicator, and vtkCommunicator::Send(). |
|
This method sends data to another process. Tag eliminates ambiguity when multiple sends or receives exist in the same process. Definition at line 399 of file vtkMultiProcessController.h. References Communicator, and vtkCommunicator::Send(). |
|
This method sends data to another process. Tag eliminates ambiguity when multiple sends or receives exist in the same process. Definition at line 412 of file vtkMultiProcessController.h. References Communicator, and vtkCommunicator::Send(). |
|
This method sends data to another process. Tag eliminates ambiguity when multiple sends or receives exist in the same process. Definition at line 425 of file vtkMultiProcessController.h. References Communicator, and vtkCommunicator::Send(). |
|
This method sends data to another process. Tag eliminates ambiguity when multiple sends or receives exist in the same process. Definition at line 438 of file vtkMultiProcessController.h. References Communicator, and vtkCommunicator::Send(). |
|
This method sends data to another process. Tag eliminates ambiguity when multiple sends or receives exist in the same process. Definition at line 346 of file vtkMultiProcessController.h. References Communicator, and vtkCommunicator::Send(). |
|
This method sends data to another process. Tag eliminates ambiguity when multiple sends or receives exist in the same process. Definition at line 359 of file vtkMultiProcessController.h. References Communicator, and vtkCommunicator::Send(). |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 492 of file vtkMultiProcessController.h. References Communicator, and vtkCommunicator::Receive(). |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 505 of file vtkMultiProcessController.h. References Communicator, and vtkCommunicator::Receive(). |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 519 of file vtkMultiProcessController.h. References Communicator, and vtkCommunicator::Receive(). |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 532 of file vtkMultiProcessController.h. References Communicator, and vtkCommunicator::Receive(). |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 545 of file vtkMultiProcessController.h. References Communicator, and vtkCommunicator::Receive(). |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 558 of file vtkMultiProcessController.h. References Communicator, and vtkCommunicator::Receive(). |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 466 of file vtkMultiProcessController.h. References Communicator, and vtkCommunicator::Receive(). |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 479 of file vtkMultiProcessController.h. References Communicator, and vtkCommunicator::Receive(). |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Reimplemented in vtkThreadedController. |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 297 of file vtkMultiProcessController.h. |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 298 of file vtkMultiProcessController.h. |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 300 of file vtkMultiProcessController.h. |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 302 of file vtkMultiProcessController.h. |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 303 of file vtkMultiProcessController.h. |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 304 of file vtkMultiProcessController.h. |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 305 of file vtkMultiProcessController.h. |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 307 of file vtkMultiProcessController.h. |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 311 of file vtkMultiProcessController.h. |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 321 of file vtkMultiProcessController.h. |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 323 of file vtkMultiProcessController.h. |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 328 of file vtkMultiProcessController.h. |
|
This method receives data from a corresponding send. It blocks until the receive is finished. It calls methods in "data" to communicate the sending data. Definition at line 338 of file vtkMultiProcessController.h. |