AVS on the ANUSF SGI Power Challenge

AVS is a general purpose visualization and data analysis tool. It is particularly suited for 3D visualizaton, but is also able to do image (2D) and graph (1D) visualization. It has a rich set of input data formats that are simple to output from C and fortran programs. The primitive data types used in AVS are byte, integer, single and double precision floating point and text strings. From these are built the aggregate data types - field, unstructured cell data, molecule, and colormap.

AVS is based around a visual programming interface. A user drags modules onto a desktop, then connects them together to form a network which describes an algorithm as a flow diagram. A large selection of modules are built into the system and new ones may be developed by users. A large selection of modules with source code are available from the International AVS Centre (IAC). The IAC also provides many other useful AVS materials including tutorials and examples.

It should be noted that the AVS referred to in this tutorial is known as AVS 5, which is distinct from the newer AVS/Express system which will one day replace AVS 5. AVS/Express is currently not s stable and mature as it's predecessor but any work done in AVS 5 should be easily ported across to AVS/Express.

Running AVS

To get access to the AVS system on pc simply add the following line to you .cshrc file (then source it or more simply just re-login).

setenv USE_AVS

AVS can be run remotely via X windows, simply set your DISPLAY environment variable and run with the command avs -nohw. Your workstation will need to have at least 8 bit (256 colors) graphics to use AVS, ideally you should try to work on a 24 bit (true) color graphics workstation. (The -nohw option is not neccessary if your machine is a Silicon Graphics workstation where the graphics will be handled via the DGL protocol).

Here is an example session assuming the user is on the workstation named bar.anu.edu.au.

On bar you would type -

bar> xhost + pc

Then on pc you would type

pc> setenv DISPLAY bar:0
pc> avs -nohw

A useful feature to keep in mind when using AVS via X windows is the bounding box button on the geometry viewer that lets you rotate, scale and translate the objects being viewed at interactive rates showing only the bounding box of the scene. After the user stops dragging the mouse the scene is redrawn fully which may take a few seconds or more depending on scene complexity.

Postrcript documentation for AVS (which may be printed out locally) can be obtained by contacting the system administrators of pc, . The first manual to read is the Users Guide which describes the basic usage of the system and gives details of the field file format. For more extensive description of data types including the unstructured cell data type (UCD), and how to develop and work with new modules you should consult the the Developers Guide.

A good way to explore AVS is via the AVS Applications/AVS Demo sub-sytem (selected from AVS's opening panel). It provides a large number of examples demonstrating most aspects of the AVS system.

AVS's field data format.

The field format is one of the main data formats used by AVS and is best thought of as an n-dimensional array which may be placed into a physical space with associated coordinate data. The data may be ascii or binary. Field files are composed of a header that describes the field and how the the data and coordinates are to be read. The data may be in the same file as the header or in a separate files. With the skip, stride and offset keywords data can often be inputted from legacy file formats by simply writing a header file to describe them.

A simple example is probably the best way to get an idea of the format. Note how the data is residing in another file and that the first three bytes in that file are skipped before the field data is read.

# AVS field file 
# this is a header file for a field to be 
# used in conjunction with the  build a field module of AVS
ndim = 3
dim1 = 64
dim2 = 64
dim3 = 64
nspace = 3
veclen = 1
data = byte
field = uniform
variable 1 file=../volume/hydrogen.dat filetype=binary skip=3

A more complex example, with an irregular field (all data points have a corresponding coordinate).

# AVS field file
# This is an example of how to use the AVS3 READ FIELD module to
# read the contents of plot3d files
ndim = 3
dim1 = 40
dim2 = 32
dim3 = 32
nspace = 3
veclen = 5
data = float
field = irregular
label = density x-momentum y-momentum z-momentum stagnation

variable 1 file=../plot3d/bluntfinq.bin filetype=binary skip=28
variable 2 file=../plot3d/bluntfinq.bin filetype=binary skip=163868
variable 3 file=../plot3d/bluntfinq.bin filetype=binary skip=327708
variable 4 file=../plot3d/bluntfinq.bin filetype=binary skip=491548
variable 5 file=../plot3d/bluntfinq.bin filetype=binary skip=655388

coord 1 file=../plot3d/bluntfinx.bin filetype=binary skip=12
coord 2 file=../plot3d/bluntfinx.bin filetype=binary skip=163852
coord 3 file=../plot3d/bluntfinx.bin filetype=binary skip=327692

Here are some simple C and Fortan programs that illustrate how to write an AVS field files.

This image illustrates a few of the visualization features of AVS - isosurfaces, slicers and hedgehog display of a vector field.

Author: Drew Whitehouse April 1997
Return to the ANUSF Vizlab home page.

ANU Supercomputer Facility - Home Page | Contact us
The Australian National University