Re: comments on I/O chapter

John May (johnmay@llnl.gov)
Wed, 16 Apr 1997 17:39:06 -0700

Jean-Pierre Prost writes:
> John May wrote:
>
> What value should a filter return on error? Should it
> be predefined, or should the filter allocate error codes as
> needed? It would be nice if the filter knew enough not to
> allocate a new error code each time it encountered an error,
> but where can it cache exisiting error codes? In extra_state?
> Then presumably it needs to do locking. Alternatively, the
> implementor of a filter could allocate all the necessary error
> codes in advance and store them in extra_state for all the filters
> to use. The user would then have to call the filter initialization
> code. We should offer some guidance here.
>
> ***********************
> In the latter alternative, what are you suggesting exactly ? That there
> is a new user defined function, let us call it init_filter_fn, specified
> as an extra argument to the MPI_REGISTER_FILTER interface, and which would
> initialize extra_state. Extra_state would contain all possible error
> codes that could possibly be encountered when running any other filter
> function. This could work pretty nicely since extra_state is passed to all
> the user defined filter functions.

Yeah, that's that I meant ;-). Except that each filter would have
to manage its own set of error codes, since the init function
couldn't aniticpate what error codes other filters would need
and couldn't communicate those codes to other filters, since they
would different extra_state objects.

John