tree: d994d9d0d4c4122628fb3f892f732cecb559c1f8 [path history] [tgz]
  1. dcopy.f
  2. disnan.f
  3. dlaisnan.f
  4. dlamch.f
  5. dlas2.f
  6. dlascl.f
  7. dlasq1.f
  8. dlasq2.f
  9. dlasq3.f
  10. dlasq4.f
  11. dlasq5.f
  12. dlasq6.f
  13. dlasrt.f
  14. ieeeck.f
  15. ilaenv.f
  16. iparmq.f
  17. lsame.f
  18. Makefile
  19. Readme.md
  20. testdlasq1.f90
  21. testdlasq2.f90
  22. testdlasq3.f90
  23. testdlasq4.f90
  24. xerbla.f
lapack/internal/testdata/dlasqtest/Readme.md

This set of codes generates tests for the dlasq* routines.

The high level routines are testdlasq*.f90. The testdlasq*.f90 routines are intended in combination with the routines in gonum/lapack/testlapack. During execution, these high-level routines record the inputs and outputs to the executed subroutines. For example, testdlasq3, when executed, generates files gen4tests.txt and gen5tests.txt that record the inputs and outputs to the evaluation of dlasq4 and dlasq5 respectively. The output format in gentests.txt is the struct literal that matches the respective test in gonum/lapack/testlapack/dlasq.go. Thus, these generated tests can be copied into the testing routine to test the native implementation.

The testing routines in testlapack have code for generating inputs for these fortran routines. Typically, one would isolate the particular failing test, and modify the testlapack routine to print it to the terminal, for example in testlapack/dlasq3.go one might add

printDlasq3FortranInput(test)
os.Exit(1)

This prints variable initialization for dlasq3 routine to the terminal, which can be copied and pasted into testdlasq3.f90. Please note that this process is not completely automated. Some of the other initialization may need to change, particularly the size allocation of the data array(s).