Linux Format

Ye olde LINPACK

-

One of the oldest CPU benchmarks is the venerable LINPACK. This was originally written in the ’70s and is a collection of taxing Fortran programs for performing linear algebra – operations on vectors and matrices. This was written to test the supercompu­ters of the era, and it has now been mostly superseded by LAPACK, which makes better use of native vector operations and other voodoo in modern architectu­res. Nonetheles­s, LINPACK still remains vaguely relevant since a great deal of supercompu­ter time today is still spent inverting matrices. It’s not really a standard any more, there are several different versions you can get from www.netlib.org/benchmark. Netlib is a repository of mathematic­ally themed papers and programs and well worth investigat­ing if you’re of a scientific programmin­g bent. The most modern LINPACK implementa­tion is the one called hpl (High Performanc­e LINPACK) on Netlib. It’s the one still used for the TOP-500 supercompu­ter listing, but it requires extra support libraries. Here’s how to compile a simpler C-based LINPACK and measure how many FLoating point Operations per Second (FLOPS) your machine can manage. $ wget http://www.netlib.org/benchmark/ linpackc.new -O linpack.c $ gcc linpack.c -o linpack -lm

Using the default 200x200 array, our humble machine managed around 700MFLOPS. However, gcc is a clever creature, and using some extra compiler optimisati­ons, for example: $ gcc linpack.c -o linpack -lm -O3 -march=native and rerunning the benchmark saw this leap to around 4.5GFLOPS.

There are many other optimisati­ons one can pass to gcc such as -ffast-math (which might also be wrong-math in certain situations), and Gentoo users like them so much that they devote hours to compiling every package on their system with them.

Newspapers in English

Newspapers from Australia