Subsections


IV. User Manual : FlowVR Utilities


18. Flowvr-glgraph: Interactive Network Graph Visualization

18.1 Introduction

FlowVR provides an interactive graph visualizer called flowvr-glgraph to help users develop and debug their applications. It computes a 2D graphical visualization displaying all the primitives components of an application. Vertices corespond to modules, filters or synchronizers. Edges corespond to full connections (full line) or stamps connections (dashed line). These data are extracted from the .net.xml generated by flowvr.

Figure: The flowvr-glgraph interface.
Image flowvr-glgraph

18.2 Launching

Flowvr-glgraph is based on OpenGL, QT and QGLViewer, libxml2 and graphviz. these libraries are required when compiling FlowVR to have flowvr-glgraph correctly compiled. Optionally, if CG and glew are installed on your machine, flowvr-glgraph provides some extra features (fisheye view).

To launch flowvr-glgraph:



flowvr-glgraph [network.net.xml]


18.3 Clustered Layout

Use the c key to toogle the clustered layout that improves the layout by taking benefit of the component hierarchies. This layout is very helpfull, but crashes may occur (layout algorithm not totally stable).


18.4 The toolbar

Image open Open a .net.xml FlowVR file.
The layout is computed before loading, so this operation can take a few seconds with
large graphs. You can also load a file from command prompt by running flowvr-graph
with the file name in argument.

Image refresh

Reload the current file.

Image export

Export the current view in a graphical file format.
Available formats are: jpg, png, eps, ps, ppm, bmp and fig.

Image distant If this button is toggled, only the connections between two
different host are made visible.

Image select

By toggling this button, you enter in selection mode.

Image minus

Decrement visualization depth.

Image plus

Increment visualization depth.

Image all

Set visualization depth to the max depth.

Image in

Visualize only the upstream elements.

Image out

Visualize only the downstream elements.

Image in-out

Visualize both upstream and downstream elements.

Image color1 Use one color for one node type (green for modules,
blue for filters, red for synchronizers and gray for routing nodes)

Image color2

Use one color for one host.

Image color3

Use the colors defined in the file.

Image pot

Replace the clicked color by the current color.

Image color

Change the current color.

Image help

Open the help dialog.


18.5 The view

18.5.1 Normal Mode

All the graph nodes are visible. A click on a node or a connection magnifies it.

18.5.2 Selection Mode

The visualization is depth-limited. i.e. only the nodes not farther from the selected element than the depth limit will be set visible. A click on a node or a connection will select it.


18.6 The lists

Four trees are filled during loading.
id: nodes id.
host: nodes id, grouped by host.
connections: connections id.
XML: the whole xml tree.

18.6.1 Normal Mode

In the normal mode, a click on a list element will simply center the view on it.

18.6.2 Selection Mode

In the selection mode, the clicked element is centered and selected. If it is a branch, all its leaves will be selected.


18.7 Searching by Regular Expressions

This text field allows to make advanced research in the nodes id list. The syntax used is fully described on the QT's web site: http://doc.trolltech.com/3.3/qregexp.html. The 'Search' button makes the matching nodes visible and hide the rest. The 'Reset' button allows to come back to the normal visualization.

19. Other Utilities


19.1 Generate a Network Image with flowvr-graph

To generate graphical representations of FlowVR networks flowvr-graph uses two external tools: xsltproc (a XSLT parser) and dot (Graphviz).

xsltproc is the XSLT parser associated with libxslt. On Debian it can be installed using apt-get install libxslt1-dev

dot is a graph layout tool from the Graphviz package available at http://www.graphviz.org/. On Debian you can use apt-get install graphviz to install it.

Once these tools are installed you can use the provided script flowvr-graph. It takes as input the .net.xml file. If no argument is given it will print a .dot graph description. This graph can be customized and then displayed using dot. You can also directly specify arguments to flowvr-graph which will invoke dot using these arguments.

For example to compute the image of the Primes application:



cd share/flowvr/examples/fluid
# Compile the application 
make-app.sh
# Process he application:
flowvr  Fluid
# and this command will create a graphical representation
flowvr-graph -Tps -o ./primes.net.ps < ./primes.net.xml


You can generate different types of files (PS,PNG,FIG) using the -T argument. You can also pass some graph attributes using -G (such as -Grankdir=LR to have an horizontal layout.

If you have chosen to install it, you can also use the graph visualizer flowvr-glgraph.

19.2 flowvr-shmdump: Dump Shared Memory Content

flowvr-shmdump is a useful utility to know the state of the shared memory created by a FlowVR daemon. It takes two arguments : the SHM ID (0 by defaults), to specify which shared memory area to explore if several FlowVR daemon are launched on the node ; and a position given in hexadecimal, to have a look on the data stored at this position.

There is the result of the command flowvr-shmdump, when there is just the daemon launched and no application.



flowvr-shmdump 0
FlowVR Shared Memory Dump version CVS
Opened shared memory area with ID=51337: internal id=3014667 size=10000000 attached 1 time(s)
Mapped shared memory area with ID=51337 at 0x402a0000
Shared memory area mapped at 0x402a0000
Daemon header at 0x40
Head bloc at 0x1e0
  Buffer pos=0x1f0 length=0x18 nbref=1
  Buffer pos=0x208 length=0x10 nbref=1
Bloc pos=0x218 length=0x989468 prevDP=-0x38 nextDP=0x989468
Free memory 9999456, found 9999456 (99


This utility can be very useful for debugging some memory lack or to find a better size for the shared memory area.


19.3 flowvr-run-ssh: a Simple Module Launcher

flowvr-run-ssh (bin/flowvr-run-ssh) is a useful tool for launching FlowVR modules through ssh. It alleviates the difficulty of handling environnment variables with ssh and automatically propagates the FlowVR variables (FLOWVR_DAEMON, FLOWVR_PARENT, FLOWVR_MODNAME).

flowvr-run-ssh is intentionally kept simple. If it does not fit your needs look at more advanced launchers like TakTuk or mpirun.

The MetaModuleFlowvrRunSSH metamodule class (include/flowvr/app/components/metamoduleflowvr-run-ssh.comp.h) eases the use of flowvr-run-ssh. You just need to provide the executable name of you module and customize some options if required (include/flowvr/app/core/run.h). You will be able to start several instances of your module on distant machines.



flowvr-run-ssh [-v] [-d path] [-m] [-l login] [-e VAR VALUE] [-x VAR] [-s] [-p] hostlist command


-x VAR : propagates the variable VAR through ssh.
-e VAR VALUE : sets the variable VAR to VALUE.
-s : sequential mode (does not set FLOWVR_RANK nor FLOWVR_NBPROC). This is the default behaviour if only one host is used.
-p : parallel mode (sets FLOWVR_RANK and FLOWVR_NBPROC). This is the default behaviour if several hosts ares used.
-l login : runs ssh with a different login.
-path path : path is changed to path before launching command. By default the program is launched from the Home directory of the user.
-v : Verbose mode.
-m : multi-platform mode. All occurences in the path of the value contained in $PLATFORM will be set to the correspondant value of PLATFORM on the distant host.

flowvr-run-ssh needs a valid bash account with flowvr environment variables set at login.

19.4 Utility Modules

19.4.1 flowvr-fread and flowvr-fwrite

FlowVR provides modules for writing messages to a file and for reading them.

flowvr-fwrite: writes all messages on its input port to a file.
flowvr-fread: reads messages from a message and sends them on its output port.

19.4.2 flowvr-joypad

FlowVR also provides a module for retrieving events from a joypad. It opens two ports per button and axes: one for the event itself and one for the accumulated value on this axe (or state of the button). Note that the desc files should be modified according to your device for the number of buttons and axes.

2009-04-06