Skip to content
Snippets Groups Projects
Commit 5c357ef1 authored by Mark Allen's avatar Mark Allen Committed by Gilles Gouaillardet
Browse files

[mpich romio d97c4ee] romio: ensure config headers are included first

> Pulled in from mpich romio, branch "main".
> Their commit message is below.
>
> This is part of a batch of commits from the
> following set of PRs:
>  *  https://github.com/pmodels/mpich/pull/4943
>     -- darray fix which contains a flatten fix
>         73a3eba
>         c4b5762
>  *  https://github.com/pmodels/mpich/pull/4995
>     -- write strided fix
>         bbb5210
>  *  https://github.com/pmodels/mpich/pull/5100
>     -- build fix for -Wpedantic
>         ad0e435
>  *  https://github.com/pmodels/mpich/pull/5099
>     -- build fix, they had let file-system=...gpfs bit rot
>         e1d42af
>         313289a
>         83bbb82
>  *  https://github.com/pmodels/mpich/pull/5150
>     -- build fix, configure-related _GNU_SOURCE
>         a712b56
>         5a036e7
>  *  https://github.com/pmodels/mpich/pull/5184


>     -- build fix, continuation of _GNU_SOURCE fix
>         d97c4ee

There was a problem with romio's use of MPL and the include order
sometimes having system files before the config files generated
by configure.  So for example at configure time _GNU_SOURCE was
used and thus configure concluded that aligned_memory() was
already declared, but then later in romio sometimes stdlib.h or
similar sys includes were coming before mplconfig.h and maybe
even before romioconf.h.

My understanding of the design described by hzhou is that
universlaly putting the config files at the top is the best
solution to this ordering.

All over the romio code they seem to use adio.h as their top
level include, which has romioconf.h as its first include.
So in this PR I'm moved adio.h to the top of a few more files.

And I also made romioconf.h include mplconfig.h as its first
include.  Otherwise what we have for romio's use of MPL is

adio.h:
  includes romioconf.h  <-- we're relying on _GNU_SOURCE being here too
  includes many things including system files
  includes adioi.h
    includes mpl.h
      includes mplconfig.h with _GNU_SOURCE

so having _GNU_SOURCE down in mplconfig.h doesn't really
ensure it's in front of the system files unless we can
rely on it being there in romioconf.h (Maybe we can? I'm not
sure).  Anyway as long as the top level romioconf.h knows
it's consuming MPL it can put mplconfig.h at its top and then
all the rest of the romio code only needs to follow the rule
of putting adio.h first and then both romio and mpl will get
their config settings included at the top

Signed-off-by: default avatarMark Allen <markalle@us.ibm.com>
parent 1be3db88
Branches
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment