uDALES / u-dales

uDALES: large-eddy-simulation software for urban flow, dispersion and microclimate modelling
https://udales.github.io/u-dales
GNU General Public License v3.0
47 stars 16 forks source link

Only rank 0 checks for exit file #151

Closed pbartholomew08 closed 1 year ago

pbartholomew08 commented 1 year ago

Avoids all ranks querying the filesystem at scale.

jchylik commented 1 year ago

Good point, but there should be perhaps some print statement to for the standard output before bcasting it.

pbartholomew08 commented 1 year ago

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.

pbartholomew08 commented 1 year ago

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.