Skip to content

Conversation

@brownbaerchen
Copy link
Contributor

When the code crashes, i.e. does not orderly finish, messages in the log that have not yet been flushed may not get flushed at all. Therefore, I was still using print statements a lot of the time which I removed when I was done.
The better approach is to flush all output immediately when running with debug output. Then, rather than adding temporary print statements during debugging, we can add meaningful messages and leave them in.

Now immediate flushing adds some overhead, I imagine, but presumably you don't care so much about performance when using debug output.

So this PR adds a handler for the loggers that immediately flushes if we use debug output, but it also gives a warning that this degrades performance.

Sadly, I don't know how to test this. If anyone has an idea, let me know!

@pancetta pancetta merged commit f5597f1 into Parallel-in-Time:master Aug 10, 2025
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants