etmc/tmLQCD — Issue #50: Graceful exit
Author: deuzeman
Created: 2012-01-26 13:06:34+00:00
State: open
Labels: Wishlist

Is there already some centralised way to force a graceful exit in case of a fatal error such as a failure to malloc? If not, shouldn't we add one? Doesn't have to be complicated, but it would be nice to be able to write something like `if (result == very_bad) fatal_error( "Error_message_goes_here"); ` and have the system take care of dumping the error message, flush buffers and finalizing MPI before quitting. I think this would encourage error checking and result in better code, as well as remove ugly preprocessor checks for MPI in the middle of random functions.