JASPA is a benchmark contains F90, C and Java codes for testing the I/O and compute performance of sparse matrix multiplication kernals appear frequently in large scale scientific and engineering applications. It can be used to compare the performance of Java with F90 and C on you chosen platform.

You can find benchmarking results on the Pentium II, the Sun Ultra 80, the IBM PowerPC and Power3 in the report: "Comparing the performance of JAVA with Fortran and C for numerical computing"

Performance Comparison of Java with F90/C

The following is a quick comparison of Java with F90 and C on a sparse matrix "memplus" which comes with the benchmark suite. Here the floating point performance (in Mflops/s) is measured. Note however that floating point operation is only part of the overall computing effort in the benchmark, so the Mflops/s rate is only meaningful in a relative sense when comparing the three languages across the platforms. For more details see here.

F90 C Java
Pentium II 9.22 9.74 8.14
Sun Ultra 80 14.55 16.73 8.68
IBM Power3 49.18 42.05 17.99

Down Load

JASPA is freely available. Click JASPA to download.


JASPA comes as a gzipped tar file, JASPA.tar.gz, you need to unpack it by

%gunzip JASPA.tar.gz

%tar xvf JASPA.tar.gz

This will create a JASPA directory, which contains a number of subdirectories.


Edit common.make in the SPARSE_BENCH directory to give the correct F90, C and JAVA compiler flags, you can find some sample in the MAKE.sample directory, e.g., LINUX.make. Once you have selected the correct flags, you do

% make

to compile the F90, C and Java codes.


You need to have test sparse matrices in the MatrixMarket coordinate format, but with entry values removed. There are some sample matries in the directory SPARSE_BENCH/matrices, they are in the MatrixMarket coordinate format, with the entry values removed. If you want to test on other matrices from MatrixMarket, you need to down load the matrices into the SPARSE_BENCH/matrices directory, and remove the entry values by

% MatrixMarket2bench "matrix file" > "new matrix file"


To run F90, C and JAVA benchmark on a matrix "memplus.mtx" in the SPARSE_BENCH/matrices directory, you need to cd to that directory and do

% bench_f90 memplus.mtx

% bench_c memplus.mtx

% java Spmatmul2 memplus.mtx

The outcomes of running, say, the Java benchmark on a Pentium II under Linux is:

=========== JAVA benchmark for sparse multiplication ==========
 case name = memplus.mtx
 problem size = 17758
 nz = 126150
 time_IO = 1.424 averaged over 2 runs
 nz1 = 5121784
 time_COMP = 2.969 averaged over 1 runs
 Mflops/s = 8.137172111822162
 flops/run = 24159264
 average entry value = 1.858481341657516

Here the timing is measures over a number of runs so that the total time over all runs exceed a preset minimum (set to 2.0 second in the current version). The Mflops/s measures the floating point performance, although it is only meaningful for relative comparison across the platforms, since a lot of the computing is spent not in floating point type operations.


In the SPARSE_BENCH/matrices directory, there is a perl script "run.perl" in the SPARSE_BENCH/util directory which will automatically run the F90, C and Java codes on all the matrices of the form "*.mtx" in that directory. You need to make sure that the path for perl is correct at line one of this script. Then in this directory, do

% run.perl

The output will be in "out.f90", "out.c" and "out.java".