On Aug 27, 2014, at 10:05 AM, Orion Poplawski <or...@cora.nwra.com> wrote:
> Can someone give me a quick overview of the tkr/ignore-tkr split in the > fortran bindings? Heh. How much do you want to know? How far down the Fortran rabbit hole do you want to go? :-) > In the process of updating the Fedora openmpi packages from 1.8.1 in Fedora > 21/22 to 1.8.2 we seem to have gone from libmpi_usempi.so to > libmpi_usempi_ignore_tkr.so and I'm not sure why. Did you upgrade gcc/gfortran to 4.9[.x]? If so, that's likely why. In short: - pre gcc/gfortran-4.9: uses the TKR interface - gcc/gfortran >= 4.9: uses the ignore-TKR interface TKR = Fortran-eese for "type, kind, rank". "Type" is what you would expect: INTEGER, DOUBLE PRECISION, ...etc. "Kind", as I understand it, is a variant of the type: e.g., there are different kinds of INTEGERs. I'm sure that a Fortran expert will disagree with me here, but for a software engineer, it comes down to INTEGERs of different sizes: 2 byte integer values, 4 byte integer values, etc. "Rank" is the array dimension of the variable (which is a little confusing in an MPI context, where "rank" has an entirely different meaning). Before Fortran 08, there was no Fortran equivalent of C's (void*). Hence, it was actually impossible -- using pure Fortran -- to have Fortran prototypes for MPI subroutines that take a choice buffer (e.g., MPI_Send, which takes a (void*) buffer argument in C). Most Fortran compilers have long-since had various pragmas that tell the compiler to ignore the TKR of a given subroutine parameter -- effectively making it like a C (void*). Gfortran tends to be quite pure in its Fortran implementation and did not support this kind of ignore-TKR pragma until the 4.9 series. Hence, gfortran <v4.9 uses the old OMPI "TKR"-based implementation (which is old, crotchety, and has various shortcomings). Gfortran >=4.9 uses the shiny new "ignore TKR"-based implementation, which is significantly simpler, has more features, and is OMPI's defined path fortran for Fortran support. Keep in mind that all of this is based one *one* of the 3 defined Fortran interfaces in MPI: 1. mpif.h 2. "mpi" module 3. "mpi_f08" module Specificially, this conversation is about #2. Many of the aspects also apply to #3, but the issues are (related but) a little different there. -- Jeff Squyres jsquy...@cisco.com For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/