cctbx / cctbx_project

Computational Crystallography Toolbox
https://cci.lbl.gov/docs/cctbx
Other
218 stars 116 forks source link

mpi_abort_on_exception: do nothing if communicator size is 1 #939

Closed dwpaley closed 10 months ago

dwpaley commented 10 months ago

This prevents confusing error messages in some cases where the system has mpi4py but we are running single-process. One example is cctbx.xfel.merge -h, which currently prints:

Abort(1) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0

at the end of its output because it hits a SystemExit inside the wrapped function. With this PR, in the given case we won't attempt to clean up the nonexistent MPI communicator.

dwpaley commented 10 months ago

Thanks, will merge after the tests run.

dwpaley commented 10 months ago

/azp run

azure-pipelines[bot] commented 10 months ago
Azure Pipelines successfully started running 3 pipeline(s).
dwpaley commented 10 months ago

/azp run

azure-pipelines[bot] commented 10 months ago
Azure Pipelines successfully started running 3 pipeline(s).
dwpaley commented 10 months ago

/azp run

azure-pipelines[bot] commented 10 months ago
Azure Pipelines successfully started running 3 pipeline(s).