You can use the Java demonstration programs, contained in
arraydemo.zip
(8KB) to test your installation
and to serve as examples in the use of the package.
Installing the demo programs:
- unzip the file arraydemo.zip
- this will generate 5 Java source files:
cfft.java cholesky.java cmatmul.java shallow.java testblas.java
- Set your CLASSPATH to include the file
array.zip
- compile each program using, for example:
javac X.java,
where X is one of cfft, cholesky,
cmatmul, shallow, or testblas
- run any of the demo programs: java X
- each program will report execution time and speed (in Mflops)
and will perform a verification test
The demonstration programs are:
- Cholesky factorization (cholesky.java).
This program compute the Cholesky factor U of
a symmetric positive definite matrix A such that
A = UTU. U is an upper triangular matrix.
The problem size is specified in the source file by the
parameter n.
- Shallow-water simulation (shallow.java).
This program is a kernel of a shallow-water simulation program.
The problem size is specified in the source file by the
parameter n. You can change n, but then the validation
parameter no longer applies.
- A test of some BLAS methods (testblas.java).
This program computes the matrix product C = A x B
using three different approaches: (i) a single call to the BLAS
dgemm method, (ii) one call to the BLAS dgemv
method for each column of the result matrix C, (iii) one call
to the BLAS ddot method for each element of the
result matrix C. The program computes performance and
checks correctness of each approach.
By default, all matrices are of size 128 x 128. This
can be controlled through command line arguments:
testblas -m m -n n -p p, where
A is m x n,
B is n x p,
and C is m x p.
- Complex matrix-multiply (cmatmul.java).
This program computes the matrix product C = A x B,
where A, B, and C are matrices of
complex numbers.
The default problem size is 100 x 100 and it is controlled
by the source code parameter n.
- FFT (cfft.java).
This program is another example of computations of complex numbers.
It computes the two-dimensional FFT of a two-dimensional complex function.
The problem size is controlled by the source code parameter
n, which must be a power of 2.
Instructions for AIX HPCJ users:
If you want to use the provided array.jll, you can compile
the demo programs with:
hpj -o X X.class -nofollow
The Array package executables will then be dynamically loaded from
your array.jll file (remember to add it to your CLASSPATH).
Refer to your HPCJ documentation for further details on jlls.
Copyright © IBM Corporation, 1999. All rights reserved.
[
IBM home page |
Search |
Contact IBM |
Help |
Legal |
Privacy
]