process initialization and management core for ParaView processes. More...
#include <vtkProcessModule.h>
Public Types | |
enum | ProcessTypes { PROCESS_CLIENT, PROCESS_SERVER, PROCESS_DATA_SERVER, PROCESS_RENDER_SERVER, PROCESS_BATCH, PROCESS_INVALID = -1 } |
enum | ServerFlags { DATA_SERVER = 0x01, DATA_SERVER_ROOT = 0x02, RENDER_SERVER = 0x04, RENDER_SERVER_ROOT = 0x08, SERVERS = DATA_SERVER | RENDER_SERVER, CLIENT = 0x10, CLIENT_AND_SERVERS = DATA_SERVER | CLIENT | RENDER_SERVER } |
These flags are used to specify destination servers for the SendStream function. More... | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) override |
void | UpdateProcessType (ProcessTypes newType, bool dontKnowWhatImDoing=true) |
This method has been added to support migration from one type to another but this method call if NOT RECOMMENDED. More... | |
vtkIdType | RegisterSession (vtkSession *) |
Registers a new session. More... | |
vtkSession * | GetSession (vtkIdType) |
Returns the session associated with a given ID. More... | |
vtkIdType | GetSessionID (vtkSession *) |
Returns the session id for the session, if any. More... | |
vtkSessionIterator * | NewSessionIterator () |
Returns a new session iterator that can be used to iterate over the registered sessions. More... | |
vtkSession * | GetActiveSession () |
Whenever any session is processing some message, it typically marks itself active with the process module. More... | |
vtkSession * | GetSession () |
This is a convenience method that either returns the active session, if present, otherwise the first session. More... | |
vtkMultiProcessController * | GetGlobalController () |
Provides access to the global MPI controller, if any. More... | |
int | GetNumberOfLocalPartitions () |
Returns the number of processes in this process group. More... | |
int | GetPartitionId () |
Returns the local process id. More... | |
bool | IsMPIInitialized () |
Return whether MPI is initialized in this process group. More... | |
const std::string & | GetProgramPath () const |
The full path to the current executable that is running (or empty if unknown). More... | |
const std::string & | GetSelfDir () const |
The directory containing the current executable (or empty if unknown). More... | |
vtkThreadedCallbackQueue * | GetCallbackQueue () |
Returns a callback queue in which one can defer tasks that can run asynchronously. More... | |
bool | UnRegisterSession (vtkIdType sessionID) |
Unregister a session given its ID. More... | |
bool | UnRegisterSession (vtkSession *session) |
Unregister a session given its ID. More... | |
virtual vtkIdType | GetEventCallDataSessionId () |
RegisterSession and UnRegisterSession fire events with SessionID in calldata. More... | |
virtual bool | GetMultipleSessionsSupport () |
Return true, if multiple sessions can be used simultanuously. More... | |
virtual void | SetMultipleSessionsSupport (bool) |
Return true, if multiple sessions can be used simultanuously. More... | |
virtual void | MultipleSessionsSupportOn () |
Return true, if multiple sessions can be used simultanuously. More... | |
virtual void | MultipleSessionsSupportOff () |
Return true, if multiple sessions can be used simultanuously. More... | |
virtual vtkNetworkAccessManager * | GetNetworkAccessManager () |
Get/Set the network access manager. More... | |
void | SetNetworkAccessManager (vtkNetworkAccessManager *) |
Get/Set the network access manager. More... | |
virtual bool | GetReportInterpreterErrors () |
Set/Get whether to report errors from the Interpreter. More... | |
virtual void | SetReportInterpreterErrors (bool) |
Set/Get whether to report errors from the Interpreter. More... | |
virtual void | ReportInterpreterErrorsOn () |
Set/Get whether to report errors from the Interpreter. More... | |
virtual void | ReportInterpreterErrorsOff () |
Set/Get whether to report errors from the Interpreter. More... | |
Public Member Functions inherited from vtkObject | |
vtkBaseTypeMacro (vtkObject, vtkObjectBase) | |
virtual void | DebugOn () |
virtual void | DebugOff () |
bool | GetDebug () |
void | SetDebug (bool debugFlag) |
virtual void | Modified () |
virtual vtkMTimeType | GetMTime () |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
void | PrintRevisions (ostream &) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
void | PrintRevisions (ostream &) |
Static Public Member Functions | |
static vtkProcessModule * | New () |
static int | IsTypeOf (const char *type) |
static vtkProcessModule * | SafeDownCast (vtkObject *o) |
static ProcessTypes | GetProcessType () |
static unsigned int | GetProcessTypeAsInt () |
static bool | Initialize (ProcessTypes type, int &argc, char **&argv) |
Initializes the process and the ProcessModule. More... | |
static bool | Finalize () |
Finalizes and cleans up the process. More... | |
static vtkProcessModule * | GetProcessModule () |
Provides access to the global ProcessModule. More... | |
static int | GetNumberOfGhostLevelsToRequest (vtkInformation *outInfo) |
This returns number of ghost level to request based on characteristics of the pipelines. More... | |
static bool | GetSymmetricMPIMode () |
static void | SetDefaultMinimumGhostLevelsToRequestForStructuredPipelines (int) |
This is temporary approach to control the number of ghost-levels to request by default for data pipelines. More... | |
static int | GetDefaultMinimumGhostLevelsToRequestForStructuredPipelines () |
This is temporary approach to control the number of ghost-levels to request by default for data pipelines. More... | |
static void | SetDefaultMinimumGhostLevelsToRequestForUnstructuredPipelines (int) |
This is temporary approach to control the number of ghost-levels to request by default for data pipelines. More... | |
static int | GetDefaultMinimumGhostLevelsToRequestForUnstructuredPipelines () |
This is temporary approach to control the number of ghost-levels to request by default for data pipelines. More... | |
Static Public Member Functions inherited from vtkObject | |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
Static Public Member Functions inherited from vtkObjectBase | |
static vtkTypeBool | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
static vtkObjectBase * | New () |
Protected Member Functions | |
vtkProcessModule () | |
~vtkProcessModule () override | |
void | SetExecutablePath (const std::string &path) |
Sets the executable path of the process so that ParaView can, e.g., set up paths for Python properly. More... | |
void | PushActiveSession (vtkSession *) |
Push/Pop the active session. More... | |
void | PopActiveSession (vtkSession *) |
Push/Pop the active session. More... | |
Protected Member Functions inherited from vtkObject | |
vtkObject () | |
virtual | ~vtkObject () |
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE |
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
Protected Member Functions inherited from vtkObjectBase | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
vtkNetworkAccessManager * | NetworkAccessManager |
vtkIdType | MaxSessionId |
Used to keep track of maximum session used. More... | |
vtkProcessModuleInternals * | Internals |
bool | ReportInterpreterErrors |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
Protected Attributes inherited from vtkObjectBase | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
Friends | |
class | vtkSession |
Marking vtkSession as friend since it needs access to PushActiveSession/PopActiveSession. More... | |
class | vtkSessionIterator |
process initialization and management core for ParaView processes.
vtkProcessModule is the process initialization and session management core for ParaView processes.
Definition at line 29 of file vtkProcessModule.h.
Definition at line 33 of file vtkProcessModule.h.
Enumerator | |
---|---|
PROCESS_CLIENT | |
PROCESS_SERVER | |
PROCESS_DATA_SERVER | |
PROCESS_RENDER_SERVER | |
PROCESS_BATCH | |
PROCESS_INVALID |
Definition at line 36 of file vtkProcessModule.h.
These flags are used to specify destination servers for the SendStream function.
FIXME: These flags should simply move to PVSession. They don't make sense in non-PVSessions since the processes may have different roles in that case.
Enumerator | |
---|---|
DATA_SERVER | |
DATA_SERVER_ROOT | |
RENDER_SERVER | |
RENDER_SERVER_ROOT | |
SERVERS | |
CLIENT | |
CLIENT_AND_SERVERS |
Definition at line 55 of file vtkProcessModule.h.
|
protected |
|
overrideprotected |
|
static |
|
virtual |
Reimplemented from vtkObjectBase.
|
static |
|
overridevirtual |
Reimplemented from vtkObject.
|
static |
|
inlinestatic |
Definition at line 67 of file vtkProcessModule.h.
void vtkProcessModule::UpdateProcessType | ( | ProcessTypes | newType, |
bool | dontKnowWhatImDoing = true |
||
) |
This method has been added to support migration from one type to another but this method call if NOT RECOMMENDED.
-> We use it to handle the Animation saving at disconnection time on the server side. We create a new session and migrate the sever process to a batch process.
|
static |
Initializes the process and the ProcessModule.
The function is to initialize MPI if applicable for the process and setup some environment e.g. DISPLAY. Initializes the ProcessModule. for the process and setup some environment e.g. DISPLAY.
|
static |
Finalizes and cleans up the process.
vtkIdType vtkProcessModule::RegisterSession | ( | vtkSession * | ) |
Registers a new session.
A new ID is assigned for the session and that ID is returned. The ID can be used in future to access this session. Fires vtkCommand::ConnectionCreatedEvent every time a session is registered. The event-data for this event is a vtkIdType whose value is the session id.
bool vtkProcessModule::UnRegisterSession | ( | vtkIdType | sessionID | ) |
Unregister a session given its ID.
This is the same ID that is returned when the session was registered. Returns true is the session was unregistered. Unregistering a session implies that the ProcessModule will no longer monitor communication on the sockets, if any, in the session. Fires vtkCommand::ConnectionClosedEvent every time a session is unregistered. The event-data for this event is a vtkIdType whose value is the session id.
bool vtkProcessModule::UnRegisterSession | ( | vtkSession * | session | ) |
Unregister a session given its ID.
This is the same ID that is returned when the session was registered. Returns true is the session was unregistered. Unregistering a session implies that the ProcessModule will no longer monitor communication on the sockets, if any, in the session. Fires vtkCommand::ConnectionClosedEvent every time a session is unregistered. The event-data for this event is a vtkIdType whose value is the session id.
|
virtual |
RegisterSession and UnRegisterSession fire events with SessionID in calldata.
To provide access to that in Python, we have this method. The value is valid only in vtkCommand::ConnectionCreatedEvent and vtkCommand::ConnectionClosedEvent callbacks and is set to 0 at other times.
vtkSession* vtkProcessModule::GetSession | ( | vtkIdType | ) |
Returns the session associated with a given ID.
vtkIdType vtkProcessModule::GetSessionID | ( | vtkSession * | ) |
Returns the session id for the session, if any.
Return 0 is the session has not been registered with the process module.
vtkSessionIterator* vtkProcessModule::NewSessionIterator | ( | ) |
Returns a new session iterator that can be used to iterate over the registered sessions.
vtkSession* vtkProcessModule::GetActiveSession | ( | ) |
Whenever any session is processing some message, it typically marks itself active with the process module.
The active session can be accessed using this method.
vtkSession* vtkProcessModule::GetSession | ( | ) |
This is a convenience method that either returns the active session, if present, otherwise the first session.
Don't use this for new API. This is provided for some old api.
|
virtual |
Return true, if multiple sessions can be used simultanuously.
We set the default to be FALSE.
|
virtual |
Return true, if multiple sessions can be used simultanuously.
We set the default to be FALSE.
|
virtual |
Return true, if multiple sessions can be used simultanuously.
We set the default to be FALSE.
|
virtual |
Return true, if multiple sessions can be used simultanuously.
We set the default to be FALSE.
|
static |
Provides access to the global ProcessModule.
This method can only be called after Initialize().
|
virtual |
Get/Set the network access manager.
vtkNetworkAccessManager encapsulates the setup of interprocess communication channels. By default a vtkTCPNetworkAccessManager is setup. If you want to change the network access manager, it should be done only when no sessions are present. Ideally, you want to do that during the initialization of the process itself.
void vtkProcessModule::SetNetworkAccessManager | ( | vtkNetworkAccessManager * | ) |
Get/Set the network access manager.
vtkNetworkAccessManager encapsulates the setup of interprocess communication channels. By default a vtkTCPNetworkAccessManager is setup. If you want to change the network access manager, it should be done only when no sessions are present. Ideally, you want to do that during the initialization of the process itself.
vtkMultiProcessController* vtkProcessModule::GetGlobalController | ( | ) |
Provides access to the global MPI controller, if any.
Same can be obtained using vtkMultiProcessController::GetGlobalController();
int vtkProcessModule::GetNumberOfLocalPartitions | ( | ) |
Returns the number of processes in this process group.
int vtkProcessModule::GetPartitionId | ( | ) |
Returns the local process id.
bool vtkProcessModule::IsMPIInitialized | ( | ) |
Return whether MPI is initialized in this process group.
|
virtual |
Set/Get whether to report errors from the Interpreter.
|
virtual |
Set/Get whether to report errors from the Interpreter.
|
virtual |
Set/Get whether to report errors from the Interpreter.
|
virtual |
Set/Get whether to report errors from the Interpreter.
|
static |
|
inline |
The full path to the current executable that is running (or empty if unknown).
Definition at line 235 of file vtkProcessModule.h.
|
inline |
The directory containing the current executable (or empty if unknown).
Definition at line 239 of file vtkProcessModule.h.
|
static |
This is temporary approach to control the number of ghost-levels to request by default for data pipelines.
Currently, change in ghost level request causes the pipeline to re-execute which can be expensive. In an ideal world, additional ghost levels can be automatically provided by data-exchange between ranks. Until we do that, this is only mechanism available to override the number of ghost levels requested by default.
The default is 0 for structured pipelines, and 1 for unstructured pipelines. When not running in parallel, however, these ghost-level requests don't make sense and hence are generally ignored.
Note, this is expected to change in the future, so use this with caution.
|
static |
This is temporary approach to control the number of ghost-levels to request by default for data pipelines.
Currently, change in ghost level request causes the pipeline to re-execute which can be expensive. In an ideal world, additional ghost levels can be automatically provided by data-exchange between ranks. Until we do that, this is only mechanism available to override the number of ghost levels requested by default.
The default is 0 for structured pipelines, and 1 for unstructured pipelines. When not running in parallel, however, these ghost-level requests don't make sense and hence are generally ignored.
Note, this is expected to change in the future, so use this with caution.
|
static |
This is temporary approach to control the number of ghost-levels to request by default for data pipelines.
Currently, change in ghost level request causes the pipeline to re-execute which can be expensive. In an ideal world, additional ghost levels can be automatically provided by data-exchange between ranks. Until we do that, this is only mechanism available to override the number of ghost levels requested by default.
The default is 0 for structured pipelines, and 1 for unstructured pipelines. When not running in parallel, however, these ghost-level requests don't make sense and hence are generally ignored.
Note, this is expected to change in the future, so use this with caution.
|
static |
This is temporary approach to control the number of ghost-levels to request by default for data pipelines.
Currently, change in ghost level request causes the pipeline to re-execute which can be expensive. In an ideal world, additional ghost levels can be automatically provided by data-exchange between ranks. Until we do that, this is only mechanism available to override the number of ghost levels requested by default.
The default is 0 for structured pipelines, and 1 for unstructured pipelines. When not running in parallel, however, these ghost-level requests don't make sense and hence are generally ignored.
Note, this is expected to change in the future, so use this with caution.
|
static |
This returns number of ghost level to request based on characteristics of the pipelines.
vtkThreadedCallbackQueue* vtkProcessModule::GetCallbackQueue | ( | ) |
Returns a callback queue in which one can defer tasks that can run asynchronously.
|
protected |
Push/Pop the active session.
|
protected |
Push/Pop the active session.
|
protected |
Sets the executable path of the process so that ParaView can, e.g., set up paths for Python properly.
|
friend |
Marking vtkSession as friend since it needs access to PushActiveSession/PopActiveSession.
Definition at line 290 of file vtkProcessModule.h.
|
friend |
Definition at line 310 of file vtkProcessModule.h.
|
protected |
Definition at line 292 of file vtkProcessModule.h.
|
protected |
Used to keep track of maximum session used.
Only used to ensure that no session id is ever repeated.
Definition at line 298 of file vtkProcessModule.h.
|
protected |
Definition at line 306 of file vtkProcessModule.h.
|
protected |
Definition at line 312 of file vtkProcessModule.h.