Closed pbartholomew08 closed 1 year ago
Good point, but there should be perhaps some print statement to for the standard output before bcasting it.
This might be implementation-dependent behaviour, but testing a deliberately wrong MPI collective call with an error message printed by all ranks I only received an error from rank 1, with all other ranks becoming deadlocked. This does depend on the setting of the MPI error handler, by default MPI (in my test) raises an internal error - but in the case that someone changed this I think it is better to fail noisily.
If you would prefer only rank 0 to print any MPI error I am happy to change this. The main thing is having only rank 0 perform the file inquiry.
Avoids all ranks querying the filesystem at scale.