> ... Now we are looking for Benchmarks to test the system ...
John mentioned the desirabililty of benchmarking with something
relevant to your workload - and I'll second that. Also it is nice to
start with something relatively small and simple to make it easier to
work with and to analyze the results.
My interest is in scientific computation, and I wanted to compare a
number of systems for "typical" floating point computation. (Yes, I
know that this isn't the strong point of most of the systems we discuss
here.) I talked with a expert, and came up with a very simple C program
which does a bunch of matrix multiplications - and which has data in
them so the compiler can't reduce ("optimize out") the computation.
Also the different sizes used may show if system limitations are
reached. I've run it on a variety of Linux and Solaris systems.
--
--henry schaffer
#include <stdio.h>
#include <time.h>
#define SIZE 1000
double a[SIZE][SIZE], b[SIZE][SIZE], c[SIZE][SIZE], tmp;
float secs;
int i, j, k, t, part;
clock_t clock(void);
int
main (void)
{
/*initialize matrices with anything */
for (i=0; i<part; i++) {
for (j=0; j<part; j++) {
a[i][j] = i + j;
b[i][j] = i - j;
}
}
printf(" mat nom\n dim secs\n");
for (part = 100; part<SIZE + 1; part += 50) {
t = clock();
/* double precision matrix multiply C = A B */
for (i=0; i<part; i++) {
for (j=0; j<part; j++) {
tmp = 0;
for (k=0; k<part; k++) {
tmp += a[i][k] * b[k][j];
}
c[i][j] = tmp;
}
}
secs = clock() - t;
secs /= 1000000; /* 1 mill ticks per second - in theory */
printf("%4d %8.2f \n", part, secs);
}
return 0;
}