Re: [MPI3 Fortran] Serious problem/bug in MPI libraries with the alignment of MPI_DOUBLE_PRECISION
On 10/6/11 6:55 PM, Rolf Rabenseifner wrote:
________
mpi-report-F2008-2011-09-08-changeonlyplustickets.pdf p87:7-11 (=MPI-2.2 p79:7-11) read
Rationale. The definition of extent is motivated by the assumption that the amount of padding added at the end of each structure in an array of structures is the least needed to fulfill alignment constraints. More explicit control of the extent is provided in Section 4.1.6. Such explicit control is needed in cases where the assumption does not hold, for example, where union types are used. (End of rationale.)
but should read
Rationale. The definition of extent is motivated by the assumption that the amount of padding added at the end of each structure in an array of structures is the least needed to fulfill alignment constraints. More explicit control of the extent is provided in Section 4.1.6. Such explicit control is needed in cases where the assumption does not hold, for example, where union types are used. * In Fortran, structures can be expressed with several language features, e.g., * common blocks, SEQUENCE derived types, or BIND(C) derived types. The compiler may
or derived types that are neither SEQUENCE nor BIND(C) types (which is the most common case).
* use different alignments, and therefore, it is recommended to use MPI_TYPE_CREATE_RESIZED * for arrays of structures if an alignment may cause an alignment-gap at the end of * a structure as described in Section 4.1.6 on page 106 and in Section 16.2.15 on page 580. (End of rationale.)
________
mpi-report-F2008-2011-09-08-changeonlyplustickets.pdf p107:13-17 (=MPI-2.2 p96:42-45) read
If type_i requires alignment to a byte address that is a multiple of k_i, then epsilon is the least non-negative increment needed to round extent(Typemap) to the next multiple of max_i k_i. The formal definitions given for the various datatype constructors apply now, with the amended definition of extent.
but should read
If type_i requires alignment to a byte address that is a multiple of k_i, then epsilon is the least non-negative increment needed to round extent(Typemap) to the next multiple of max_i k_i. * In Fortran, whether the alignments k_i are computed according to the alignments * used by the compiler in common blocks, SEQUENCE derived types, or BIND(C) derived types,
again, or derived types that are neither SEQUENCE nor BIND(C).
* is implementation-dependent. The formal definitions given for the various datatype constructors apply now, with the amended definition of extent.
Cheers, Bill -- Bill Long [email protected] 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
participants (1)
-
Bill Long