*Fix negative zero maximum CFL #231
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SIS2 reports the global maximum CFL in the seaice.stats files, but in the first timestep when all velocities are zero, it is reporting a maximum CFL of -0.000 with the gnu and Nvidia compilers. This single-line commit replaces any negative zero maximum CFL returned by
max_across_PEs()with its absolute value so that only non-negative maximum CFL values are returned. All solutions are bitwise identical, but this does change the entries in the seaice.stats files so it may appear to fail automated regression testing in some cases.This commit addresses the problem in SIS2 that is noted in #230, but it does not address the underlying question of why this bizarre behavior is happening in the first place.