[Paraview] low level C++ example how to communicate with pvserver
Biddiscombe, John A.
biddisco at cscs.ch
Thu Dec 16 04:58:41 EST 2010
>What do you mean by "I manually instantiate the pvserver manager stuff"? Please mention, where
Did you look in the InitServerManager function? you can see how we manually start up a server manager. We tell it that we are a PVBATCH (ie no connection required from a client). All you need to do is poke around with this code and set the application type to a CLIENT, then instantiate a connection.
Once you've done that, the proxy related stuff is all business as usual.
>The only relation to server manager classes (vtkSMProxies) I find in your code is in the files
try ... almost everywhere in DemoCPPipeline. Proxies are used for everything. You must need glasses if you didn't see any of it!
(and yes SMAdapator is just there for me to copy and paste stuff from. Most of the convenience functions in the paraview source code are in pqSMadaptor, but make use of Qt classes which I'm not interested in).
int DemoCPPipeline::InitServerManager(vtkCPDataDescription* DataDescription)
if (this->ServerManagerInitialized) return 1;
int argc = 0;
char** argv = new char*;
argv = new char;
string CWD = vtksys::SystemTools::GetCurrentWorkingDirectory();
strcpy_s(argv, strlen(CWD.c_str())+1, CWD.c_str());
// create the correct options for this process
vtkPVServerOptions* options = vtkPVServerOptions::New();
// Let pv built in code do all the intialization
vtkInitializationHelper::Initialize(argc, argv, options);
this->ServerManagerInitialized = 1;
// To operate on multiblock data we must use the composite pipeline executive
vtkSmartPointer<vtkCompositeDataPipeline> exec = vtkSmartPointer<vtkCompositeDataPipeline>::New();
From: Thomas Kipling [mailto:kipling_t at yahoo.com]
Sent: 16 December 2010 10:18
To: Biddiscombe, John A.; paraview at paraview.org
Subject: AW: [Paraview] low level C++ example how to communicate with pvserver
thank you very much for sharing the example. However, I don't see how I can make
use of it in relation to my original question. I am not sure whether the reason
is that I am not enough familiar with the Paraview concepts or because the
actual server manager usage examples that I am looking for are left out in your
>I manually instantiate the pvserver manager stuff and then access it via
>proxies (whereas you want to communicate with an existing pvserver).
What do you mean by "I manually instantiate the pvserver manager stuff"? Please
mention, where this takes place in your code. Can you roughly describe how
"instantiating the pvserver manager stuff" can be replaced by connecting to a
running pvserver? Because this was my actual problem.
The only relation to server manager classes (vtkSMProxies) I find in your code
is in the files SMAdaptor.h and SMAdaptor.cxx, but these are included or linked
I am sure your example may give some answers to my initial question, but due to
my limited knowledge I only see a MPI VTK application without obvious connection
to pvserver communication. Would you help with further explanations?
More information about the ParaView