AGOCG logo
Graphics Multimedia VR Visualisation Contents
Training Reports Workshops Briefings Index
This report is also available as an Acrobat file.
Next Back [Top]

Review of Visualisation Systems

6.3 IBM Data Explorer


6.3.1 - Programming language
6.3.2 - Overview of modules
6.3.3 - Automatic generation
6.3.4 - Further examples

6.3.1 Programming language


C is the main language but using C wrappers both Fortran and C++ code can be incorporated into modules.

6.3.2 Overview of modules


There are two specific types of modules that can be implemented:

The API that is made available to users of DX is the same one used by the IBM DX development team.

On SGI & SUN Symmetric Multi Processor (SMP) machines such as Onyx DX modules will run in parallel within a module. Using data decomposition the DX executive spawns tasks on each of the available processors to execute the module function against a sub-area of the dataset. The sub-areas are grown into each other to cater for boundary conditions.

This is an important area for DX as it was originally written to run on a parallel machine.

6.3.3 Automatic generation


DX has a module building tool that will automatically generate most of the C code, along with the modules description file and makefile. To run this the user needs to type:

dx -builder

This is an easy to use tool, for example Figure 14 shows how the builder was used to outline a transformation module that takes 1 input and 1 output.

Apart from describing the data types so DX can set up the appropriate data, the user also includes comments to describe what the module does and what the input and output data are.



A text version of this description can be saved for future use:

MODULE_NAME = add1
CATEGORY = Transformation
MODULE_DESCRIPTION = To add 1 to each data value
OUTBOARD_EXECUTABLE = add1
OUTBOARD_PERSISTENT = FALSE
ASYNCHRONOUS = FALSE
PINNED = FALSE
SIDE_EFFECT = FALSE

INPUT = in_value
DESCRIPTION = Original data, needs 1 to be added
REQUIRED = TRUE
STRUCTURE = Field/Group
DATA_TYPE = float
DATA_SHAPE = Scalar
POSITIONS = Not required
CONNECTIONS = Not required
ELEMENT_TYPE = Not required
DEPENDENCY = Positions or connections

OUTPUT = out_val
DESCRIPTION = in_value with 1 added
STRUCTURE = Field/Group
DATA_TYPE = float
DATA_SHAPE = Scalar
POSITIONS = Not required
CONNECTIONS = Not required
ELEMENT_TYPE = Not required
DEPENDENCY = Positions or connections

The Module Description file generated is as follows:

MODULE add1
CATEGORY Transformation
DESCRIPTION To add 1 to each data value
OUTBOARD add1;
INPUT in_value; group; (none); Original data, needs 1 to be added
OUTPUT out_val; group; in_value with 1 added

The Makefile:

FILES_add1 = add1.o
BASE = /usr/lpp/dx
CFLAGS = -Dindigo -O -I$(BASE)/include LDFLAGS= -L$(BASE)/lib_indigo
LIBS = -lDX -lsun -lgl_s -ly -ll -lX11 -lm -lmpc
OLIBS = -lDXlite -lm

add1: $(FILES_add1) outboard.o
$(CC) $(LDFLAGS) $(FILES_add1) outboard.o $(OLIBS) -o add1

# how to make the outboard main routine

outboard.o: $(BASE)/lib/outboard.c
$(CC) $(CFLAGS) -DUSERMODULE=m_add1 -c $(BASE)/lib/outboard.c

# make the user files

useradd1.c: add1.mdf
mdf-c add1.mdf > useradd1.c

The C code generated was over 500 lines and so too long to list here. This may appear to be very long, but this is well commented code and the user is only required to modify the tail end of the code:

int add1_worker
(
int in_value_knt,
float *in_value_data,
int out_val_knt,
float *out_val_data
)
{
/*
* The arguments to this routine are:
*
*
* The following are inputs and therefore are read-only.The default
* values are given and should be used if the knt is 0.
*
* in_value_knt, in_value_data: count and pointer
* for input"in_value"
* no default value given.
*
* The following are outputs and therefore are writable.
*
* out_val_knt, out_val_data: count and pointer
* for output "out_val"
*/

/*
* User's code goes here
*/
}

When 2 inputs were used the number of lines of code increased to over 650 lines but again the user is only required to insert code into the worker routine.

6.3.4 Further examples


There are further examples which can be found in the IBM Data Explorer Programmer's Reference Manual. There is also an FTP site of public domain modules available
ftp.tc.cornell.eduunder pub/Data.Explorer.


Review of Visualisation Systems
Next Back [Top]

Generated with CERN WebMaker

Graphics     Multimedia      Virtual Environments      Visualisation      Contents