[MPI3 Fortran] [Mpi-comments] MPI 3.0: Fortran 2008 interface - issue with the LOGICAL kind
Bill Long
longb at cray.com
Tue Mar 26 18:03:27 CDT 2013
On 3/26/13 11:26 AM, Jeff Squyres (jsquyres) wrote:
> On Mar 26, 2013, at 12:16 PM, Bill Long <longb at cray.com> wrote:
>
>> I don't think there is a problem. To accommodate -i8 you have to recompile the MPI module with the -i8 flag set. We've been shipping two mpi modules as long as I can remember; the compiler scripts pick the right one based on how the user code is compiled. Same as how we select the right version of other libraries that also have Fortran default type arguments. Within the MPI module source the values of MPI_INTEGER and the similar data types for other Fortran default types are set based on detection of the actual sizes of the default types (which change with the compiler options). If you are using the module compiled with -i8, MPI_INTEGER will encode the information for an 8-byte integer.
>
>
> But not all Fortran types have corresponding C types (from a standards/strict perspective), right? (e.g., logical -- and I'm not sure about the various complex types...?) So the MPI implementation needs to know that it has to create some synthetic / "good enough" MPI datatypes based on actual Fortran types.
>
> ...at least, that's what OMPI does...
What I did was less sophisticated (at least in terms of mpich
internals). The values for the various handles at page 666 (how
appropriate) lines 5-10, and 34, and page 667 lines 15-17 are not new.
I took the values out of the mpich mpif.h files generated for 32-bit
defaults and 64-bit defaults. Those values are assigned to internal
constants in the module. The definition of MPI_INTEGER selects between
the two options depending on KIND(0), and similarly for the others. The
goal is to produce the same values in the module as in the mpif.h files,
only automatically selected based on the default type size specified by
the compiler options used to compile the module.
Cheers,
Bill
>
--
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101
More information about the mpiwg-fortran
mailing list