[MPI3 Fortran] [Mpi3-tools] MPI 3.0: Fortran 2008 interface - issue with the LOGICAL kind
Tobias Burnus
burnus at net-b.de
Mon Apr 22 03:09:36 CDT 2013
Bill Long wrote:
>> 2) The Fortran implementation will take the performance penalty of using
>> a wrapper routine to perform the operation (discounting sophisticated
>> IPA/WPA (interprocedural analysis/whole program analysis)). Taking this
>> performance penalty is common but not universal.
>>
>
> I agree there will be call overhead for the user who accesses MPI
> through the include file mechanism, unless, as you say, there is a
> sophisticated IPA/WPA mode in the compiler. However, the compiler
> does not have to be all that sophisticated to inline a module
> routine. The compiler has to know how to find the module information
> at compile time, and could have access to all the information needed
> to inline the wrapper.
My possibly wrong impression is that only the Cray Fortran compiler does
so. I think most (all?) other compiler have a .mod file which contains
the interface of the procedures but not the procedure code itself.
Hence, they do not do any inlining at this stage. Those compilers will
presumably only do this kind of optimization with multi-file
interprocedural optimization (IPO)/link-time optimization (LTO).
That crayftn does this inlining earlier is probably also a consequence
of (by default) storing the module-interface information in the .o file
instead of using a separate .mod file. If one already has the .o file,
considering IPO is more obvious than if assembler code and module
information are separated into .mod and .o files.
* * *
Regarding the latest PDF, I also have two nits:
* [p.13,ll. 5-17] The example lists several directives to disable TKR
checks. It should add the following* to the list:
!GCC$ ATTRIBUTES NO_ARG_CHECK
which GCC/gfortran now supports.*
* [p.17] The TS29113 reference should be updated now that it is an
approved ISO Technical Specification. Additionally, the name has now an
"of Fortran" in the name: "Further Interoperability of Fortran with C"
and latest draft (FDTS) is N1942, which contains some minor changes. See
http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=45136
and ftp://ftp.nag.co.uk/sc22wg5/N1901-N1950/N1942.pdf
Tobias
* Cf. http://gcc.gnu.org/gcc-4.9/changes.html
More information about the mpiwg-fortran
mailing list