home *** CD-ROM | disk | FTP | other *** search
- The subdirectories in this directory contain sample and test programs
- that exercise HDF calls.
-
- This is NOT a test suite. I.e. it does not systematically test all
- of the HDF routines. But it exercises many of the most common
- routines that are used with HDF, and should give a pretty good
- indication of what works and what doesn'tl
-
- Another purpose for these programs is to serve as examples of how
- to make HDF calls.
-
- If you have a program that you think might be a useful addition to
- these, please let us know.
-
- These programs have only been tested on the CRAY and Sun
- systems at NCSA, so please let us know if they reveal any
- bugs on your system.
-
-
- ** Makefile
-
- Each subdirectory has its own copy of the Makefile, altered for compiling
- those programs that are in the subdirectory.
-
- You should be able to compile all programs in the subdirectory by
- entering "make all".
-
- After running the programs, you can clean up the directory by
- entering "make cleanup".
-
- You will need to alter the following (and perhaps some others) to
- conform to your own system:
-
- INCDIR - directory with the hdf include files
- DFLIB - path to your hdf library
- CFLAGS - flags to set for your C compiler
- FFLAGS - flags to set for your FORTRAN compiler
- FC - command that invokes your FORTRAN compiler
-
-
- ** General
-
- When running the tests, name the output files o1, o2, etc. Then
- when you enter "make cleanup", these files will be deleted for you.
-
-
- ** err
-
- This simply makes sure that DFerror gets set and is accessible.
- Run err and errF. They will report success or failure.
-
- ** ris8
-
- The programs here store and retreive 8-bit images, so it is a good
- idea to look at at least some of the images to make sure they
- are coming out right. The README files gives details on what they
- do.
-
- putim and putimF are the simplest, so run them first. To verify
- their output, you need to view the images they create.
-
- run manyRIS next. It generates many images of different sizes and
- shapes, writes them, then reads them back and checks against the
- originals. If this test works, then the basic RIS8 routines are
- probably OK.
-
- ** sds
-
- There are several subdirectories, plus some programs at the top
- level.
-
- At the top level, run sdsampl1F, since it checks the most basic
- SDS operations. sdsampl1F tells you if it worked or not.
-
- A thorough test would involve running the other program, buildsds,
- with many variations, but if you're short of time it's good enough
- to just run it with something simple like "buildsds o1 100 100".
- You'll want to look at the result by downloading it and looking
- at the corresponding image.
-
- At the lower levels, the main directories to go to are multi_test
- and slices. In multi_test, run the one program multi_test, and
- it will tell you if it worked or not. NOTE: on the Cray, multi_test
- doesn't work because the raw data file doesn't have 64-bit
- floats.
-
- In "slices", run putslices first. It writes data out a slice at
- a time, then reads it back in all at once. It will tell you
- if the writing of slices was successful. Getslices reads data
- in a slice at a time. It does not (yet) check the data. Here is
- what should be printed on the screen:
-
- =========== start here ===================
-
- rank=2, dimsizes=10 & 12
-
-
- Reads in two slices from a scientific dataset.
-
- First slice: 4x6 array starting at (3,4):
- winst=3 & 4
- windims=4 & 6
-
- 27 28 29 30 31 32
- 39 40 41 42 43 44
- 51 52 53 54 55 56
- 63 64 65 66 67 68
-
-
-
- Second slice: 10x2 array starting at (1,10):
- winst=1 & 10
- windims=10 & 2
-
- 9 10
- 21 22
- 33 34
- 45 46
- 57 58
- 69 70
- 81 82
- 93 94
- 105 106
- 117 118
-
- ================ stop here ===================
-
-
- ** ann
-
- Run the shell program ann.test. Compare what is printed on the screen
- with the contents of ann_test_results.
-
-
- ** utils
-
- Currently there are only two utilities here, each with its own
- subdirectory. In each is a makefile that will get the files and
- the routine itself.
-
- hdf24to8. Run hdf24to8.test.
- Look at the images. (corn.r8 is rather large, so you may want
- to skip it.)
-
- r8tohdf. Run r8tohdf.test.
- Output files can be examined with hdfls to see if basic
- contents are there. Display the images using any HDF
- 8-bit raster display tool.
-
-