ippl
ippl copied to clipboard
Environment destructor causes error in cleanup
This was found in OPAX on Gwendolen
partial ==== backtrace (tid:2019130) ====
- ...
- 13 0x000000000022394b mca_pml_ucx_cleanup() ???:0
- 14 0x0000000000082a5f ompi_mpi_finalize() ???:0
- 15 0x0000000000d0cbcf ippl::mpi::Environment::~Environment() ???:0
- 16 0x000000000045033a std::default_deleteippl::mpi::Environment::operator()() ???:0
- 17 0x00000000004501f2 std::unique_ptr<ippl::mpi::Environment, std::default_deleteippl::mpi::Environment >::~unique_ptr() ???:0
It looks like mca_pml_ucx_cleanup( is triggering ompi_mpi_finalize() and subsequently in the Environment destructor
bool Environment::finalized() { int flag = 0; MPI_Finalized(&flag); return (flag != 0); }
In case I do not use Environment::finalized() the error goes away!
MPI_Finalized is only checking if the MPI environment got terminated with MPI_Finalize. I do not understand why the call to Environment::finalized in Environment::~Environment() causes the issue.