Fix exceptions in parallel
The following discussion from !458 (merged) should be addressed:
@snuverink_j started a discussion: (+5 comments)
If I understand correctly the file is only read by node 0, so this check can be done by node 0 only (as it was before).
But to be honest, I don't understand why it was not working before in the parallel environment. Can you elaborate a bit?
I thought in the same way, but when OPAL is run in the parallel environment and the distribution file doesn't exist, OpalException is not thrown.
I think that checking if the file exists before opening it does not have to be done exclusively by node 0.
I can reproduce it: the simulation hangs.
But this seems something more fundamental to me, because I would also have expected that a throw by a single node would be enough to stop the simulation. @gsell: Should that not be the case?
In Main.cpp we catch the exception and then call MPI_Abort on MPI_COMM_WORLD. I thought that this should also stop the other nodes but this isn't the case. So we try to throw the exception on all nodes.