clawpack / clawutil

General utility programs
BSD 3-Clause "New" or "Revised" License
10 stars 31 forks source link

Saving gauge data in test.py #101

Open rjleveque opened 8 years ago

rjleveque commented 8 years ago

I think there's a potential problem with the way regression tests using gauges are done.

When save == True, test.check_gauges reads in the gauge data from Fortran but then writes it out again with the Python code at line https://github.com/clawpack/clawutil/blob/acf3fc4/src/python/clawutil/test.py#L338

This has a different format (see clawpack/pyclaw#542). To run the regression test it is the latter file that is read in and then values summed to compare with the sum of the Fortran gauge output from the latest run. These might differ just due to the different precision in the Python write.

At any rate, IMHO it would be better to just copy over the gauge file from the Fortran output into the regression_data directory when save == True. This would facilitate comparing this file to the gauge output from a new run if the test fails and one is trying to debug.

mandli commented 8 years ago

@rjleveque does #102 address this correctly?