Open nbren12 opened 3 years ago
There's a possibility this is due to fv3gfs.wrapper.cleanup calling MPI's Finalize, which then causes mpi4py to crash when it also calls Finalize. This would short-circuit any cleanup routines which happened to be scheduled for after mpi4py's cleanup.
I wonder whether this issue still happens when using mpirun python3 -m mpi4py <script>
instead of mpirun python3 <script>
.
I think we would need to develop a short test since there is too much going on in the fv3net runfile to narrow it down.
I think calling
fv3gfs.wrapper.cleanup
short-circuits python's cleanup routines. For example, I think it can skip the__del__
of non-garbage-collected python objects (see e.g. https://github.com/VulcanClimateModeling/fv3net/pull/907).