Presentation is loading. Please wait.

Presentation is loading. Please wait.

NA-MIC National Alliance for Medical Image Computing ParaView Server Manager Berk Geveci Andy Cedilnik.

Similar presentations


Presentation on theme: "NA-MIC National Alliance for Medical Image Computing ParaView Server Manager Berk Geveci Andy Cedilnik."— Presentation transcript:

1 NA-MIC National Alliance for Medical Image Computing http://na-mic.org ParaView Server Manager Berk Geveci Andy Cedilnik

2 National Alliance for Medical Image Computing http://na-mic.org Outline Evolution of ParaView –Early ParaView –Server manager Server Manager –Design –Implementation

3 National Alliance for Medical Image Computing http://na-mic.org http://www.paraview.org Parallel visualization application for large data Open source, cross-platform Distributed data model

4 National Alliance for Medical Image Computing http://na-mic.org ParaView Basics Uses MPI for server inter-node communication Uses sockets for client-server communication Clients using KWWidgets, Qt as well as web browser Server manager: –C++ API –XML configuration –Tcl, Python or Java scripting (optional) KWWidgets client: –Tcl scripting of GUI –XML configuration of GUI

5 National Alliance for Medical Image Computing http://na-mic.org Early ParaView No client. First node of the server also hosts GUI All nodes, including client (first) node have all process objects (readers, filters, mappers…) and Tcl commands to access them First node translates GUI actions to VTK Tcl commands and all nodes process these commands The state of the pipeline is read back using VTK Tcl commands

6 National Alliance for Medical Image Computing http://na-mic.org Early ParaView MPI On accept: vtkSphereSource sphere0 sphere0 SetPhiResolution 256 On reset: this->Script(“sphere0 GetResolution”); int val = atoi(this->SetValue(this->GetLastResult)); vtkSphereSource sphere0 sphere0 SetPhiResolution 256 vtkSphereSource sphere0 sphere0 SetPhiResolution 256

7 National Alliance for Medical Image Computing http://na-mic.org Lessons Learned: Client-Server Separation It is not always possible to access the display of the first node of a supercomputer Separate client. Client connects to server through TCP/IP socket Client does not hold data, only GUI Client has a dummy, empty pipeline to store state Client sends VTK Tcl commands to server

8 National Alliance for Medical Image Computing http://na-mic.org Client-Server Separation MPI TCP/IP On accept: vtkSphereSource sphere0 sphere0 SetPhiResolution 256 On reset: this->Script(“sphere0 GetResolution”); this->SetValue(this->GetLastResult);

9 National Alliance for Medical Image Computing http://na-mic.org Lessons Learned: Issues Tcl based communication: –String based. Imprecise and inefficient. –Standard Tcl interpreter is not secure. Dummy pipeline on client: –VTK pipeline objects are not designed to only store state. Some objects misbehave when disconnected or empty. –Communication with server is still necessary to obtain information about distributed data. –Client must be linked to all VTK + VTK Tcl libs.

10 National Alliance for Medical Image Computing http://na-mic.org Server Manager Objectives: Binary communication with server where possible Replace empty pipeline on client with a proxy representation Separation of pipeline management from GUI to support multiple client types Provide default implementation of complicated, parallel pipeline and rendering architecture to make client development easy and to reuse code

11 National Alliance for Medical Image Computing http://na-mic.org Client-Server Streams Simple communication mechanism Binary (except method names) Only allows access to selected VTK objects (can be made secure) vtkClientServerStream stream; stream << vtkCSS::New << “vtkSphereSource” << id << vtkCSSEnd; stream << vtkCSS::Invoke << id << “SetResolution” << 256 << vtkCSS:End; interpreter->ProcessStream(stream); or communicator->Send(stream);

12 National Alliance for Medical Image Computing http://na-mic.org Server Manager - Proxies Based on proxy design pattern Proxies are responsible of –Creating server-side VTK objects –Maintaining references to server-side VTK objects using ids –Maintaining a copy of the state of the server-side objects using properties

13 National Alliance for Medical Image Computing http://na-mic.org Server Manager - Properties Maintain the state of the server-side objects Each property has a set of values and one or more commands to set or get them

14 National Alliance for Medical Image Computing http://na-mic.org Server Manager – Proxy Manager Responsible of maintaining proxies Configured through xml description files Provides API to create and initialize proxies Provides API to save state as xml

15 National Alliance for Medical Image Computing http://na-mic.org Server Manager - Example <IntVectorProperty name="PhiResolution" command="SetPhiResolution" number_of_elements="1" default_values="8" >

16 National Alliance for Medical Image Computing http://na-mic.org Server Manager Example vtkSMProxy* sphereProxy = vtkSMObject::GetProxyManager()->NewProxy(“sources”, “SphereSource”)); vtkSMIntVectorPropery* prop = sphereProxy->GetProperty(“PhiResolution”); int curVal = prop->GetElement(0); cout << “Current value: “ << curVal << endl; int val=256; int res = prop->SetElement(0, val); if (!res) { cerr << “Value “ << val << “ is not valid” << endl; return; } sphereProxy->UpdateVTKObjects();

17 National Alliance for Medical Image Computing http://na-mic.org Server Manager Example NewProxy(): Creates a proxy and associated properties based on xml, client side only UpdateVTKObjects(): –First time: Creates actual VTK objects on all associated server nodes –Pushes modified property values to all nodes

18 National Alliance for Medical Image Computing http://na-mic.org Server Manager - Summary Creates and maintains VTK objects on one or more server nodes Maintains state on the client side and synchronizes the state with server (push or pull) Provides domain checking Animation support Specially designed to work with parallel VTK Has default composite proxies designed for –parallel processing –rendering: sort-first, sort-list, large tiled display modules Helper classes to gather information from server (for example, total bounds or total number of points of a distributed data object) Configurable through xml (compile-time or run-time) Supports loading of modules in the form of dynamic libraries (libraries are loaded on server side)

19 National Alliance for Medical Image Computing http://na-mic.org Resources http://www.paraview.org ParaView mailing list ParaView Guide


Download ppt "NA-MIC National Alliance for Medical Image Computing ParaView Server Manager Berk Geveci Andy Cedilnik."

Similar presentations


Ads by Google