> I generally like using the call-back functions attached to MPI_COMM_WORLD
> to cause exit code to be invoked in MPI_Finalize. There are a few
> flaws I think we can clean up with a few sentences.
> 1) Does this apply only to MPI_COMM_WORLD? I think that is the intent.
I changed to text to cause finalize to "free" all communicators. The
last one is MPI_COMM_WORLD, next to last MPI_COMM_SELF and the rest
are in implementation dependent order. I see both advantages and
problems with this way. The pluses are it is more general, the
negatives are it can lead to problems (see below).
> 2) Is MPI_COMM_SELF better? Maybe, maybe not.
> 3) When do the call-backs get executed?
> I think we need to make this painfully clear. We need to say
> that the call-backs are called in reverse order (which is already
> said). We also need to say that it is AS THOUGH they were
> called immediately before MPI_Finalize. We also need to say
> that MPI_COMM_WORLD is not yet freed (maybe we need to rephrase
> the part that indicates that the call-backs are invoked by
> something a free of MPI_COMM_WORLD).
Right now an implementation may not need to make MPI_Finalize
collective. If we inforse that MPI_COMM_WORLD is still valid on all
processes then it will likely have to be. I also raised the issue of
whether one can call MPI functions inside the callbacks. Users may
want this but it may have unexpected results are the system begins to