[MPIWG Fortran] MPI_SIZEOF: Errata required (was: Another MPI_SIZEOF question)
Jeff Squyres (jsquyres)
jsquyres at cisco.com
Thu Jun 12 14:19:27 CDT 2014
On Jun 11, 2014, at 4:25 PM, Bill Long <longb at cray.com> wrote:
>> Actually, this doesn't work, either. If you have an mpif.h that contains an "INTERFACE MPI_Sizeof", the compiler will treat it differently depending on whether it is included from source.f or source.f90 (and probably other variants, too). Gaahhh!
>
> Not sure why you say this. Unless the lines get too long because of long names, you can write an include file so that it works for both fixed and free source forms. The assumed source form is the only distinction to the compiler between source files that end in .f and .f90.
Argh -- my Fortran ignorance rears its ugly head. Yes, indenting properly makes that problem go away.
It's a tight squeeze, but the longest interface I can find is with COMPLEX(REAL128) and DIMENSION for 15 ranks; it barely fits into 72 columns:
COMPLEX(REAL128),DIMENSION(1,1,1,1,1,1,1,1,1,1,1,1,1,1,*)::x
Quite ugly, of course. But with a perl script to generate all the possibilities (for maximum portability), it works. Yuck.
> As you might recall from earlier conference calls, I prefer that nothing be added to mpif.h that was not there before. None of the new functions or constants. It should be frozen at MPI 2.2 for compatibility with legacy codes. If programmers want to use new features, they have to modify their sources anyway, and should change to using a module at the same time.
There was unfortunately pushback from the Forum on this issue; we lost that battle.
--
Jeff Squyres
jsquyres at cisco.com
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
More information about the mpiwg-fortran
mailing list