zfp icon indicating copy to clipboard operation
zfp copied to clipboard

Fortran test does not validate correctness

Open lindstro opened this issue 3 years ago • 0 comments

As identified in #163, the lone Fortran test does not actually ensure that the data is correctly compressed or decompressed. It also has other shortcomings:

  • The array being compressed is composed of 32-bit integers, but zFORp_stream_set_rate() is called with zFORp_type_float.
  • In spite of the small range and number of integers, the test will never losslessly compress the array, regardless of the rate set. This is because the integers are not properly normalized (shifted).
  • Even if validation were performed, no return code is provided to the OS to indicate whether the test passed. Given the difficulties of portably returning an exit code from Fortran, ctest's PASS_REGULAR_EXPRESSION may be preferable.
  • The source file extension should be .f90.

lindstro avatar Sep 07 '22 17:09 lindstro