FMS includes program DEMO, which may be used for the following functions:

Building Program DEMO

The distribution of FMS includes both FORTRAN and C versions of program DEMO, which are listed below:
        PROGRAM DEMO
        CALL FMSSUB
        STOP
        END

#include <stdio.h>
#include <stdlib.h>
extern void fmssub ();
main ()
{
   fmssub ();
}
This program is compiled and linked to the FMS library, which includes FMSSUB. For details on compiler options and linking procedures, consult the WEB page for downloading FMS at fmslib.com.

Running the Test Program

Program DEMO is designed to run interactively from a terminal. When you start DEMO, you will see a prompt soliciting input in the form

FMS>

The input you enter is in the form

FMS>name=value

where

name=the name of a test parameter,

value=the value assigned to the parameter.

The equal sign functions as a delimiter, separating the name parameter from the value parameter. The name parameter starts at the beginning of the input data line after the FMS> prompt.

You may set up loops to run several tests together by specifying up to five values as follows:

FMS>name=value1,value2,value3,value4,value5

For example, to test all modules you would specify

FMS>MODULE=RS,RN,CH,CS,CN

DEMO will automatically create nested loops when you specify multiple values for more than one parameter. You may also specify a random number for a test parameter as follows:

FMS>name=low:high

where low and high specify the range of random numbers to be selected.

You may examine and set any FMS Parameter using FMSSET. To call FMSSET, enter FMSSET on the command line for name:

FMS>FMSSET

To return to DEMO input, type the characters RETURN:

FMSSET>RETURN

When you no longer want to run demo, enter

FMS>QUIT

The following table contains a list of the test parameter names, their data types, and a description of the function performed. Only the first four characters of the name parameter must be specified.

DEMO Test Parameters
Name Data Type Description
STATUS N/A No data required. Displays a list of the test parameter names and the current values assigned. This is a useful command to list all these options.
MODIFY N/A Display test parameters which have been modified from default values.
FMSSET N/A Call subroutine FMSSET to examine or modify FMS parameters. While in FMSSET, you can list all the FMS Parameters with the
FMSSET>SHOW=PARAMETERS
command. When you want to return to the DEMO input prompt, enter the characters RETURN
FMSSET>RETURN
MODULE CHARACTER FMS module
=RS, Real symmetric
=RN, Real nonsymmetric
=CH, Complex Hermitian
=CS, Complex symmetric
=CN, Complex nonsymmetric.
Default value = RS
EQUATIONS INTEGER Number of equations.
Default value = 1000.
VECTORS INTEGER Number of vectors.
Default value = 1.
SPARSITY CHARACTER Type of matrix sparsity.
=FULL, Full matrix.
=BANDED, Banded matrix.
=RANDOM, Random profile.
=PROFILE, Profile vector read from unit 2.
=DIAGONAL, Random profile with ten percent diagonal-only equations.
Default value = BANDED
BANDWIDTH INTEGER Bandwidth to be used with SPARSITY=BANDED or RANDOM. For banded matrices, this is the constant half bandwidth. For random profile matrices, the bandwidth ranges from 1 to 2*BAND.
Default value = 100.
SUBMATRIX INTEGER Submatrix test code obtained by adding together the options listed below. Each submatrix option generates 2x2 submatrices that, when added together, produce the same global matrix as MTEST=1.
=0, None.
=1, Type 1 (Full stored by columns).
=2, Type 2 (Full sorted by rows).
=4, Type 3 (Lower triangle, numerical order, symmetric).
=8, Type 4 (Lower triangle, random order, symmetric).
=16, Type 5 (Row matrix, symmetric).
=64, Use variable-length record format.
Several submatrices may be tested together. For example, SUBM=3 builds the global matrix using submatrices of types 1 and 2.
Default value = 0.
MTEST INTEGER Test data generation option.
=0, No test data generated.
=1, Integer test data generated.
=2, Random number test data generated.
Default value = 1.
ISEED INTEGER Seed used to generate random numbers.
Default value = 0.
NUMAI INTEGER Number of initialization matrices.
Default value = 0.
REDUCE CHARACTER Reduce during factoring option.
=NO, Reduce during vector solution.
=YES, Reduce during factoring.
Default value = NO.
IOA INTEGER Location of matrices
=0, Use INCORE to determine location.
=1, Memory.
=2, Memory if it fits, disk otherwise.
Default value = 0
IOX INTEGER Location of solution and {X} vectors.
=0, Use INCORE to determine location.
=1, Memory.
=2, Memory if it fits, disk otherwise.
Default value = 0.
IOB INTEGER Location of right-hand side and {Y} vectors.
=0, Use INCORE to determine location.
=1, Memory.
=2, Memory if it fits, disk otherwise.
Default value = 0.
IPROF INTEGER Use Profile or Wavefront numbering
=0, use existing profile
=1, compute profile using subroutine FMSWF
=2, compute profile using subroutine FMSPF without renumbering
=3, compute profile using subroutine FMSPF with renumbering
Default value = 0.
FMSROW INTEGER Populate matrix using FMSROW, FMSCOL or FMSPUT.
= -2, use FMSCOL called with decreasing column numbers.
= -1, use FMSROW called with decreasing row numbers.
= 1, use FMSROW called with increasing row numbers.
= 2, use FMSCOL called with increasing column numbers.
= 3, use FMSPUT called with rows of data.
CAUTION: This can result in writing 1 word at a time to the disk.
= 4, use FMSPUT called with columns of data.
Default value = 0.
FMSIST INTEGER Call subroutine FMSIST. The forms of this command are
FMSIST/name=value
FMSIST/name=value1:value2
FMSIST/name=value1,value2,value3...
This is a alternative to entering
FMSIST
name=value
RETURN
It allows loops to be created over FMS Parameters by specifying a range to randomly generate values (value1:value2) or a list of values (value1,value2,...).
Default value = FMSIST not called.
PRINT INTEGER Print code obtained by adding together the options listed below:
=0, Nothing.
=1, Maximum error.
=2, Error norms.
=4, Right-hand side test vectors {B}.
=16, Files.
=32, Solution vectors {X}.
=256, Test matrix [AL], [D], [AU].
=512, Matrix factors [L], [l/D], [U].
In addition, the test program prints the output requested by the FMS parameters; IPRI, IPRA, IPRF, IPRS, IPRMV, IPRVV.
Default value = 1
FILE CHARACTER A one to 32-character name that specifies the input file for reading commands. When FMS encounters this command, input is switched from the terminal to the specified file. When FMS encounters an end-of-file, input is switched back to the terminal. This command is useful for running standard test programs. If the print parameter, PRINT, described above is specified greater than 1, data read from the file is echoed at the terminal.
IERTOL INTEGER Tolerance on solution error to print an error message. Value is expressed as 10value.
Default value = -8
LOOP INTEGER Number of times to repeat test.
=0, infinite looping.
Default = 1.
RANDOM INTEGER Number of times to repeat random test. When a range of test or FMS Parameters are specified as value1:value2, random values within this range are generated. This Parameter determines the number of times the tests are repeated, with new values being generated for each test. This feature is used to generate random test data for testing FMS prior to release.
Default = 0
RESET N/A Reset test parameters to default values.
WRITE N/A Causes FMS to write a file that contains all the current settings of any modified DEMO or FMS Parameter. This file can later be input with the FILE= command to repeat the test. FMS displays the name of the file it created.
COMMENT N/A Causes the test program to ignore the material that follows. Can be used to document test data files.
GO N/A Start the test program.
GOSTAT N/A Display modified test and FMS parameters and start the test program.
QUIT N/A End the test program.