for him. The library again would like to register its own error-handler to generate the duplicate of the subcommunicator. By doing this, the library however replaces the error-handler instantiated by the application.
An improved version of error-handlers would allow to register a sequence of functions, which are called according to the order how they have been registered. Since neither MPI-1 nor MPI-2 are providing such a mechanism, the current FT-MPI specification suggests the following model.
As the last step of the recovery procedure, the MPI library will call all attribute delete functions attached to MPI COMM WORLD. Since the deletion of this communicator is erroneous, there is no danger that these functions are accidentally called when freeing the communicator.
Rationale A similar mechanism is provided in MPI-2 to allow user defined functions to be executed in MPI Finalize (similarly to the UNIX atexit() command). In contrary to this specification MPI-2 uses however MPI COMM SELF. The attribute copy func- tions can not be used for the discussed purpose, since duplicating MPI COMM WORLD is allowed.
Advice to implementors Although not clearly specified in MPI-1 and MPI-2, the sequence of calling the attribute delete functions should match the order of how they have been registered.