Hi Sayan, On Fri, Apr 25, 2025 at 2: 03 PM Ghosh, Sayan <sayan. ghosh@ pnnl. gov> wrote: Consider finalize-delete-callback (this is what Alfredo is alluding to perhaps w. r. t datatype-attached-to-environment) – that seems to rely on MPI_COMM_SELF
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd
Hi Sayan,

On Fri, Apr 25, 2025 at 2:03 PM Ghosh, Sayan <sayan.ghosh@pnnl.gov> wrote:
  • Consider finalize-delete-callback (this is what Alfredo is alluding to perhaps w.r.t datatype-attached-to-environment) – that seems to rely on MPI_COMM_SELF callback (freeing comm-self triggers callback)



That is a good point. At first glance, attaching things to MPI_COMM_WORLD or MPI_COMM_SELF would have a similar effect to attaching stuff to the environment.
I didn't think about this because I was reluctant to modify (in any way) either of these special communicators, in particular MPI_COMM_WORLD.
But MPI_COMM_SELF might still be a good candidate; others can point out if there is a catch.

Thanks,
Alfredo