use fatal_error to cleanly finalize MPI in case of SPI errors

It seems to compile fine but I haven't tested the case of failure yet.