Create and debug tester

The first step in adding a new routine to ATLAS is to create a tester (and timer) which can be used to verify the correctness of your code. More than half of the challenge is getting the tester right; with a good tester/timer, the code usually comes fairly easily.

Your tester will go in ATLAS/bin when extracted; you can examine some of the testers available there to get an idea of what you should do (eg., look at ATLAS/bin/[lu/llt/slv/trtri/uum]tst.c). All of these routines come from the basefile AtlasBase/Clint/atlas-tlp.base, which is what you should submit your patch against, unless you want to create your own, separate basefile.

After your tester is written, its column-major components can be tested against LAPACK by using the make <rout>tstF target in ATLAS/bin/<arch>. You can even test the row-major components by having the F77 interface transpose the matrices on input, and back on output. See ATLAS/bin/uumtst.c for an example of this for square matrices.

As part of your debugging of the tester, be sure that it not only agrees that LAPACK produces the right answer, but truly detects errors as well. For instance, manually overwrite an entry, both in the matrix and in the padding (in separate tests), and make sure it is caught by the tester.

Clint Whaley 2012-07-10