The INTEGER*n, LOGICAL*n, REAL*n, etc., syntax has never been legal Fortran. Fortran originally had only INTEGER, REAL, DOUBLE PRECISION, and COMPLEX numeric types. Fortran 90 added the notion of a KIND of numeric, but left unspecified the mapping of numeric KINDs to processor-specific storage. KIND can be thought of as an opaque identifier. There is no requirement, for example that KIND n means a variable occupies n bytes of storage, though this is commonly done. (As is the association of KIND=1 to REAL and KIND=2 to DOUBLE PRECISION.) Instead, the language provides portable means of specifying the desired behavior of an available KIND, such as digits of precision. Unfortunately, when marshalling data for interchange, bits matter—the number and their meaning. High-level languages don't support such concepts very well. Starting with C99 (Section 7.18.1), C forces the compiler implementation to define macros for supported integer widths (in bits). However, like Fortran, there is no requirement that any exact number of bits be supported (Section 7.18.1.1); the standard only requires integer types with a minimum of 8, 16, 32, and 64 bits (Section 7.18.1.2). Nothing is said at all about floating-point data types and the correspondence with the integer types. This is what APIs like OpenMPI have to struggle with in the real world.
Larry Baker US Geological Survey 650-329-5608 ba...@usgs.gov On 14 Oct 2015, at 3:38 PM, Jeff Squyres (jsquyres) wrote: > On Oct 14, 2015, at 5:53 PM, Vladimír Fuka <vladimir.f...@gmail.com> wrote: >> >>> As that ticket notes if REAL*16 <> long double Open MPI should be >>> disabling redutions on MPI_REAL16. I can take a look and see if I can >>> determine why that is not working as expected. >> >> Does it really need to be just disabled when the `real(real128)` is >> actually equivalent to c_long_double? Wouldn't making the explicit >> interfaces to MPI_Send and others to accept `real(real128)` make more >> sense? As I wrote in the stackoverflow post, the MPI standard (3.1, >> pages 628 and 674) is not very clear if MPI_REAL16 corresponds to >> real*16 or real(real128) if these differ, but making it correspond to >> real(real128) might be reasonable. > > As I understand it, real*16 is not a real type -- it's a commonly-used type > and supported by many (all?) compilers, but it's not actually defined in the > Fortran spec. > > -- > Jeff Squyres > jsquy...@cisco.com > For corporate legal information go to: > http://www.cisco.com/web/about/doing_business/legal/cri/ > > _______________________________________________ > devel mailing list > de...@open-mpi.org > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel > Link to this post: > http://www.open-mpi.org/community/lists/devel/2015/10/18170.php