editeodoro / Bbarolo

Bbarolo is a 3D fitting tool to derive the kinematics of galaxies from emission-line observations.
http://editeodoro.github.io/Bbarolo/
GNU General Public License v2.0
30 stars 8 forks source link

SIGSEGV handling in MPI mode #11

Closed kyleaoman closed 5 years ago

kyleaoman commented 5 years ago

A segmentation fault seems to sometimes occur in the final output stage. When running in MPI mode, this kills ALL processes. Instead, intercept and handle the SIGSEGV by printing an error to stderr and the the log, then killing the offending process gracefully. I think this still prevents other files that would have been handled by the same MPI process from being handled, but I'm not sure how to avoid this, yet.

The handling can be tested by adding a raise(SIGSEGV) somewhere in the code (probably for just one process rank!), note #include is needed.

editeodoro commented 5 years ago

Thanks for this workaround, I will try to figure out why it randomly crashes in the final output stage.