On Nov 10, 2014, at 8:27 AM, Dave Love <d.l...@liverpool.ac.uk> wrote:
>> https://github.com/open-mpi/ompi/commit/d7eaca83fac0d9783d40cac17e71c2b090437a8c > > I don't have time to follow this properly, but am I reading right that > that says mpi_sizeof will now _not_ work with gcc < 4.9, i.e. the system > compiler of the vast majority of HPC GNU/Linux systems, whereas it did > before (at least in simple cases)? You raise a very good point, which raises another unfortunately good related point. 1. No, the goal is to enable MPI_SIZEOF in *more* cases, and still preserve all the old cases. Your mail made me go back and test all the old cases this morning, and I discovered a bug which I need to fix before 1.8.4 is released (details unimportant, unless someone wants to gory details). 2. I did not think about the implications of the v1.7/1.8 series ABI guarantees to the MPI_SIZEOF fixes we applied. Unfortunately, it looks like we effectively changed the gfortran>=4.9 "use mpi" ABI in 1.8.2 without fully realizing it. Essentially: "use mpi" ABI in: 1.8 1.8.1 1.8.2 1.8.3 1.8.4(upcoming) gfortran < 4.9 A A A A A(*) gfortran >= 4.9 A A B B ? (*) = Buggy; needs to be fixed before release Meaning: gfortran<4.9 has had ABI "A" throughout 1.8. But we changed it to "B" for gfortran>=4.9 in 1.8.2. So the question is: what's the Right Thing to do for 1.8.4? Assume we'll have something like a "--enable|disable-new-fortran-goodness-for-gfortran-ge-4.9" configure switch (where the --enable form will be ABI B, the --disable form will be ABI A). The question is: what should be the default? 1. Have ABI A as the default 2. Have ABI B as the default I'm leaning towards #1 because it keeps ABI with a longer series of releases (1.7.x and 1.8-1.8.1). Opinions? >> IIRC, it only affected certain configure situations (e.g., only >> certain fortran compilers). I'm failing to remember the exact >> scenario offhand that was problematic right now, but it led to the >> larger question of: "hey, wait, don't we have to support MPI_SIZEOF in >> mpif.h, too?" > > I'd have said the answer was a clear "no", without knowing what the > standard says about mpif.h, The answer actually turned out to be "yes". :-\ Specifically: the spec just says it's available in the Fortran interfaces. It doesn't say "the Fortran interfaces, except MPI_SIZEOF." Indeed, the spec doesn't prohibit explicit interfaces in mpif.h (it never has). It's just that most (all?) MPI implementations have not provided explicit interfaces in mpif.h. But for MPI_SIZEOF to work, explicit interfaces are *required*. In OMPI, this has translated to: if your compiler supports enough features, MPI_SIZEOF will now have explicit interfaces in mpif.h (modulo ABI issues with the v1.8 series). I predict that the Forum will deprecate MPI_SIZEOF in MPI-4. But MPI_SIZEOF unfortunately will still have to live in OMPI for quite a long time. :-( > but I'd expect that to be deprecated anyhow. > (The man pages generally don't mention USE, only INCLUDE, which seems > wrong.) Mmm. Yes, true. Any chance I could convince you to submit a patch? :-) >> According to discussion in the Forum Fortran working group, it is >> required that MPI_SIZEOF must be supported in *all* MPI Fortran >> interfaces, including mpif.h. > > Well that's generally impossible if it's meant to include Fortran77 > compilers (which I must say doesn't seem worth it at this stage). Fortran 77 compilers haven't existed for *many, many years*. And I'll say it again: MPI has *never* supported Fortran 77 (it's a common misconception that it ever did). The MPI spec is targeting the current version of Fortran (which has supported what is needed for MPI_SIZEOF for quite some time.. since F2003? F95? I'm not sure offhand). > If it's any consolation, it doesn't work in the other MPIs here > (mp(va)pich and intel), as I'd expect. Right. I don't know what MPICH's plans are in this area, but the Forum's conclusions (very recently, I might add) were quite clear. >> Keep in mind that MPI does not prohibit having prototypes in mpif.h -- >> it's just that most (all?) MPI implementations don't tend to provide >> them. However, in the case of MPI_SIZEOF, it is *required* that >> prototypes are available because the implementation needs the type >> information to return the size properly (in mpif.h., mpi module, and >> mpi_f08 module). > > Fortran has interfaces, not prototypes! Yes, sorry -- I'm a C programmer and I dabble in Fortran (read: I'm the guy who keeps the Fortran stuff maintained in OMPI), so I sometimes use the wrong terminology. Mea culpa! -- Jeff Squyres jsquy...@cisco.com For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/