sw4 icon indicating copy to clipboard operation
sw4 copied to clipboard

BUG: sw4 fails to flush output on FATAL ERROR (hiding error message)

Open michaelkarlcoleman opened this issue 3 years ago • 0 comments

The cout stream needs to be flushed before calling MPI_Abort, otherwise the error message is not printed, at least in our case.

(Invoking with unbuffer sw4 is a workaround, but not a good one.)

https://github.com/geodynamics/sw4/blob/67ab458ccdb97763a04025b4bf840d7814d6d27f/src/parseInputFile.C#L5163-L5165

Probably the code should be examined for other such instances.

michaelkarlcoleman avatar Aug 13 '21 19:08 michaelkarlcoleman