Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move flushes in display_statistics #6472

Merged
merged 1 commit into from
Dec 2, 2022
Merged

Conversation

yizhou7
Copy link
Contributor

@yizhou7 yizhou7 commented Dec 2, 2022

We encountered issues with Z3 commandline stats display. Specifically in the case where the output is redirected to a file, the results are cutoff upon timeout. For example: z3 test.smt2 -T:3 -st > out_st
Assuming the query timeout after 3 seconds, out_st would only contain the timeout error, but without the rlimit-count, :total-time etc.

Such behavior does not happen when the output is just printed to stdout. The difference might be due to that stdout flushed on newline, but a redirected file doesn't.

This change moves the force flush a bit later, so that the complete output will also get written to a file.

@NikolajBjorner NikolajBjorner merged commit 54a8d65 into Z3Prover:master Dec 2, 2022
hgvk94 pushed a commit to hgvk94/z3 that referenced this pull request Mar 27, 2023
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