[Mpi-22] MPI_INIT assertions
treumann at [hidden]
Wed May 14 08:14:25 CDT 2008
MPI_Init time assertions must be few and each must be valuable or the
concept will fall like a house of cards.
There is nothing in my proposal for MPI_Init time assertions that rules out
providing other mechanisms in MPI 3 for giving guidance to the MPI
implementation. In MPI 3 we can consider more hints and we can add the
abiility to give stronger direction to MPI or provide it on a more granular
basis - If it makes sense. These extra mechanisms are far to complex to
consider as part of MPI 2.2.
I would not use the phrase that Dries does when he says "Assertions are bad
" but I agree with the the sentiment behind his statement. I think there
should be a very small number of assertions defined in the standard and for
each there should be a good rationale. For MPI 2.2 there should be a great
rationale because we can come back in MPI 3 and add more assertions if we
miss some important ones. It is much harder to remove one that turns out to
be real trouble.
Each assertion the the MPI Standard defines has the potential to break some
piece of code that is valid MPI but that depends on semantic the assertion
says is optional. The author of the routine that calls MPI_Init has the
power to declare assertions and the authors of other parts of an applicaton
must either live within the rules or explicitly shield against them.
For project teams that develop complete applications, the decision to use
an assertion belongs to the team, team leader or architect. If it is
decided that an application will use a specific assertion it is the team
lead who must make sure all developers understand the decision and write
appropriate code. All testing will be done with the assertion in place.
For third part libraries, the only option is to either forbid all
assertions or explicitly pick some to allow. If there are 4 potential
assertions, it is not very hard to decide for each one - "Will the library
tolerate it?". If there are 50 assertions, library authors will seldom
allow them all and will be more tempted to just say "No assertions allowed"
because making judgements about each of 50 is too difficult.
For Community developed code where people contribute source but are not
under direct control of an architect or team lead, reviewing each
submission for compliance with one or two assertions may be acceptable but
reviewing for 50 each time somebody contributes new code is not.
Dick Treumann - MPI Team/TCEM
IBM Systems & Technology Group
Dept 0lva / MS P963 -- 2455 South Road -- Poughkeepsie, NY 12601
Tele (845) 433-7846 Fax (845) 433-8363
mpi-22-bounces_at_[hidden] wrote on 05/14/2008 07:21:41 AM:
> * Terry Jones <trj_at_[hidden]> [2008-05-13 15:19:07]:
> > You can also imagine other possibilities to provide helpful context.
> > instance, perhaps the user could provide Assertions that would help MPI
> > with read-ahead prefetching or write-behind, or even meta-data
> > (e.g., later I will be creating one file per MPI task).
> Things like read-ahead or write-behind clearly shouldn't be assertions
> hints. (And, probably 'one file per MPI task' too -- if this is still
> be needed in 2 years)
> MPI already has hints that can capture some of the things mentioned
> access_style: (read_once, write_once, read_mostly, write_mostly,
> reverse_sequential, and random)
> sequential -> this can easily be used to turn on read-ahead
> IF THE MPI LIBRARY decides this is useful
> Assertions are bad -- they break compatibility -- and should only be
> tolerated if they provide real benefits and if the same cannot be
> through existing mechanisms (hints, ...).
> In the examples mentioned, this is not the case.
> [attachment "attia6gr.dat" deleted by Richard
> mpi-22 mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mpi-22