Skip to content

Add delay on error#3068

Merged
ZedThree merged 4 commits intonextfrom
delay-error
Feb 26, 2026
Merged

Add delay on error#3068
ZedThree merged 4 commits intonextfrom
delay-error

Conversation

@dschwoerer
Copy link
Contributor

Sometimes the backtrace is not printed. I think it might be a race between flushing stdout and mpi_abort.

As this is racy, I am not sure how to test this, but think a delay of 0.1 seconds should not matter, and might help (at least sometimes).

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@ZedThree
Copy link
Member

ZedThree commented Jan 7, 2026

I'm sure I've seen this behaviour too, but it's difficult to reproduce. From reading around, MPI implementations do seem to mess about with stdout's buffering, mostly to prevent interleaving output from ranks, and flushing might not be effective.

There are some options for OpenMPI's mpirun:

But this workaround is probably fine -- do you know if it's possible to make the delay even smaller?

@dschwoerer
Copy link
Contributor Author

I am not even sure the delay is sufficient. I mostly see this when other people complain that they see no backtrace.

ZedThree
ZedThree previously approved these changes Feb 16, 2026
@ZedThree ZedThree merged commit bc7f01f into next Feb 26, 2026
27 checks passed
@ZedThree ZedThree deleted the delay-error branch February 26, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants