ParaView
|
process initialization and management core for ParaView processes. More...
#include <vtkProcessModule.h>
Inherits vtkObject.
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) |
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... | |
std::string | GetProgramPath () const |
The full path to the current executable that is running (or empty if unknown). More... | |
std::string | GetSelfDir () const |
The directory containing the current executable (or empty if unknown). 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 vtkPVOptions * | GetOptions () |
Set/Get the application command line options object. More... | |
void | SetOptions (vtkPVOptions *op) |
Set/Get the application command line options object. 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... | |
virtual bool | GetSymmetricMPIMode () |
Returns true if ParaView is to be run in symmetric mode. More... | |
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... | |
Protected Member Functions | |
vtkProcessModule () | |
~vtkProcessModule () | |
virtual void | SetSymmetricMPIMode (bool) |
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 Attributes | |
vtkNetworkAccessManager * | NetworkAccessManager |
vtkPVOptions * | Options |
vtkIdType | MaxSessionId |
Used to keep track of maximum session used. More... | |
vtkProcessModuleInternals * | Internals |
bool | ReportInterpreterErrors |
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 39 of file vtkProcessModule.h.
typedef vtkObject vtkProcessModule::Superclass |
Definition at line 43 of file vtkProcessModule.h.
Enumerator | |
---|---|
PROCESS_CLIENT | |
PROCESS_SERVER | |
PROCESS_DATA_SERVER | |
PROCESS_RENDER_SERVER | |
PROCESS_BATCH | |
PROCESS_INVALID |
Definition at line 46 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 65 of file vtkProcessModule.h.
|
protected |
|
protected |
|
static |
|
virtual |
|
static |
|
virtual |
|
static |
void vtkProcessModule::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
|
static |
|
inlinestatic |
Definition at line 77 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 |
Set/Get the application command line options object.
Note that this has to be explicitly set. vtkProcessModule::Initialize() does not initialize the vtkPVOptions.
void vtkProcessModule::SetOptions | ( | vtkPVOptions * | op | ) |
Set/Get the application command line options object.
Note that this has to be explicitly set. vtkProcessModule::Initialize() does not initialize the vtkPVOptions.
|
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.
|
virtual |
Returns true if ParaView is to be run in symmetric mode.
Symmetric mode implies that satellites process same code as the root node. This is applicable only for PROCESS_BATCH.
|
inline |
The full path to the current executable that is running (or empty if unknown).
Definition at line 260 of file vtkProcessModule.h.
|
inline |
The directory containing the current executable (or empty if unknown).
Definition at line 264 of file vtkProcessModule.h.
|
protectedvirtual |
|
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 284 of file vtkProcessModule.h.
|
friend |
Definition at line 306 of file vtkProcessModule.h.
|
protected |
Definition at line 286 of file vtkProcessModule.h.
|
protected |
Definition at line 287 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 293 of file vtkProcessModule.h.
|
protected |
Definition at line 302 of file vtkProcessModule.h.
|
protected |
Definition at line 308 of file vtkProcessModule.h.