6 Test programs

pda_test.f is a program that calls all user-callable routines in the library. The command

     % f77 pda_test.f libpda.a -L/star/lib ‘ems_link‘

should succeed. The test consist of the successful linking, and an error message indicates that the library is incomplete or has inconsistent module names. The compiled program cannot be executed.

Erfplot.f can be compiled and linked against PDA and PGPLOT. It produced the title graph.

     % f77 Erftest.f libpda.a -L/star/lib ‘pgplot_link‘
     % ./a.out

For the FFT routines Ffttest.f can be compiled and linked. It has to be linked with PDA and NAG. Ffttest.f convolves two test arrays by multiplying their Fourier transforms. This is done using NAG routines, and then using FFTPACK routines, and the differences between the results (together with timings) are displayed. Timings are averaged over 2000 convolutions. The commands

     % f77 Ffttest.f -L/star/lib -lnag ‘pda_link‘
     % ./a.out > temp
     % diff temp Ffttest.out

should indicate whether the FFT routines work properly. The output will not be exactly as in the distributed file, since it depends on the platform, CPU load, etc.

There are various other test routines included in the PDA distribution:

These test programs can be compiled and linked as follows:

     % f77 -o <prog> <prog>.f -L/star/lib ‘pda_link‘

Some of these test programs write results to standard output. For such programs the PDA distribution includes a file with name <prog>.out containing a set of “standard” results with which your own results can be compared.