Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] r21096
From: Rainer Keller (keller_at_[hidden])
Date: 2009-04-29 09:16:50


Hi Jeff,
sure like to try to explain the matters.
The script check_unnecessary_headers.sh is not smart at all.
It checks whether a header, if known, is required due to some content.
It does not know about hierarchies of include files, or convenience headers
such as bindings.h and would delete the very headers mention below from
bindings.h.

Now, only if we switch to a more sophisticated method (ctags?, munching gcc's
preprocessed output?), this could be handled.

My personal opinion however is, that every header and every source file should
be self contained:
It should include all the headers with symbols it needs, no less, and
certainly not more ;-)

Hope, this is a satisfactory answer?

Thanks,
Rainer

On Wednesday 29 April 2009 06:31:13 am Jeff Squyres wrote:
> Rainer --
>
> Can you explain this a little more:
>
> In ompi/mpi/c/ header files are moved up into the actual c-file,
> where necessary (these are the only additional #include),
> otherwise it is only deletions of #include (apart from the above
> additions required due to notifier...)
>
> It looks like the addition of
>
> +#include "ompi/runtime/params.h"
> +#include "ompi/communicator/communicator.h"
> +#include "ompi/errhandler/errhandler.h"
>
> to lots of ompi/mpi/c/*.c files. I don't quite grok from your commit
> comment why that was a good thing...?
>
> Thanks!

-- 
------------------------------------------------------------------------
Rainer Keller, PhD                  Tel: +1 (865) 241-6293
Oak Ridge National Lab          Fax: +1 (865) 241-4811
PO Box 2008 MS 6164           Email: keller_at_[hidden]
Oak Ridge, TN 37831-2008    AIM/Skype: rusraink