cholla-hydro / cholla

A GPU-based hydro code
https://github.com/cholla-hydro/cholla/wiki
MIT License
60 stars 32 forks source link

`OUTPUT_ALWAYS` flag makes Cholla end at the wrong time #301

Closed bcaddy closed 9 months ago

bcaddy commented 1 year ago

If the OUTPUT_ALWAYS macro is set then instead of Cholla ending at tout it outputs at the end of the first time step where t > tout. This is probably only an issue for debug builds and should be an easy fix, especially if OUTPUT_ALWAYS becomes a runtime argument instead of a compile time flag

bcaddy commented 1 year ago

Upon further inspection it looks like this issue is tied to the fact that the timestep shortening for output is only tied to P.outstep and not at all to tout which requires that tout be an integer multiple of outstep if we actually want to output after the last time step

evaneschneider commented 9 months ago

Fixed in PR #345