You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.3 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. ReLAPACK Test Suite
  2. ===================
  3. This test suite compares ReLAPACK's recursive routines with LAPACK's compute
  4. routines in terms of accuracy: For each test-case, we execute both ReLAPACK's
  5. and LAPACK's routine on the same data and consider the numerical difference
  6. between the two solutions.
  7. This difference is computed as the maximum error across all elements of the
  8. routine's outputs, where the error for each element is the minimum of the
  9. absolute error and the relative error (with LAPACK as the reference). If the
  10. error is below the error bound configured in `config.h` (default: 1e-5 for
  11. single precision and 1e-14 for double precision) the test-case is considered as
  12. passed.
  13. For each routine the test-cases cover a variety of input argument combinations
  14. to ensure that ReLAPACK's routines match the functionality of LAPACK for all use
  15. cases.
  16. The matrix size for all experiments (default: 100) can also be specified in
  17. `config.h`.
  18. Implementation
  19. --------------
  20. `test.h` provides the framework for our tests: It provides macros that allow to
  21. generalize the tests for each operation in one file covering all data-types.
  22. Such a file is structured as follows:
  23. * All matrices required by the test-cases are declared globally. For each
  24. matrix, an array of two pointers is declared; one for the matrix copy passed
  25. to ReLAPACK and one passed to LAPACK.
  26. * `tests()` contains the main control flow: it allocates (and later frees) the
  27. copies of the globally declared matrices. It then defines the macro
  28. `ROUTINE` to contain the name of the currently tested routine.
  29. It then uses the macro `TEST` to perform the test-cases.
  30. It receives the arguments of the routine, where matrices of which ReLAPACK
  31. and LAPACK receive a copy are index with `i`. (Example: `TEST("L", &n, A[i],
  32. &n, info);`)
  33. * The macro `TEST` first calls `pre()`, which initializes all relevant
  34. matrices, then executes the ReLAPACK algorithm on the matrices with `i` = `0`
  35. and then the LAPACK counter part with `i` = `1`. It then calls `post()`,
  36. which computes the difference between the results, storing it in `error`.
  37. Finally, the error is printed out and compared to the error bound.
  38. If all test-cases pass the error bound test, the program will have a `0` return
  39. value, otherwise it is `1`, indicating an error.