1
1

- As Sylvain Jeaugey noted optional Fortran ddt ids are not properly taken

care of, see:
   http://www.open-mpi.org/community/lists/devel/2009/12/7193.php

   Assign them to proper ids:
   1. Proper Fortran type, if size matches, otherwise
   2. assign id of size-matching C-type.

   Refs trac:2133

   As stated in CMR #2133, this should move to v1.5, but '''not''' to v1.4.

This commit was SVN r22287.

The following Trac tickets were found above:
  Ticket 2133 --> https://svn.open-mpi.org/trac/ompi/ticket/2133
Этот коммит содержится в:
Rainer Keller 2009-12-08 22:26:04 +00:00
родитель fe5577d231
Коммит 499834bc6e

Просмотреть файл

@ -86,21 +86,188 @@
#define OMPI_DATATYPE_MPI_MAX_PREDEFINED 0x2B
/*
* Optional Fortran datatypes, previously no fixed id
* Optional Fortran datatypes, these map to representable types
* in the lower layer, aka as other Fortran types have to map to C types,
* additionally, if the type has the same size as the mandatory
* Fortran type, map to this one.
*/
#define OMPI_DATATYPE_MPI_LOGICAL1 0x2B
#define OMPI_DATATYPE_MPI_LOGICAL2 0x2C
#define OMPI_DATATYPE_MPI_LOGICAL4 0x2D
#define OMPI_DATATYPE_MPI_LOGICAL8 0x2E
#define OMPI_DATATYPE_MPI_INTEGER1 0x2F
#define OMPI_DATATYPE_MPI_INTEGER2 0x30
#define OMPI_DATATYPE_MPI_INTEGER4 0x31
#define OMPI_DATATYPE_MPI_INTEGER8 0x32
#define OMPI_DATATYPE_MPI_INTEGER16 0x33
#define OMPI_DATATYPE_MPI_REAL2 0x34
#define OMPI_DATATYPE_MPI_REAL4 0x35
#define OMPI_DATATYPE_MPI_REAL8 0x36
#define OMPI_DATATYPE_MPI_REAL16 0x37
/* LOGICAL */
#if OMPI_SIZEOF_FORTRAN_LOGICAL1 == OMPI_SIZEOF_FORTRAN_LOGICAL
# define OMPI_DATATYPE_MPI_LOGICAL1 OMPI_DATATYPE_MPI_LOGICAL
#elif OMPI_SIZEOF_FORTRAN_LOGICAL1 == SIZEOF_CHAR
# define OMPI_DATATYPE_MPI_LOGICAL1 OMPI_DATATYPE_MPI_CHAR
#elif OMPI_SIZEOF_FORTRAN_LOGICAL1 == SIZEOF_SHORT
# define OMPI_DATATYPE_MPI_LOGICAL1 OMPI_DATATYPE_MPI_SHORT
#elif OMPI_SIZEOF_FORTRAN_LOGICAL1 == SIZEOF_INT
# define OMPI_DATATYPE_MPI_LOGICAL1 OMPI_DATATYPE_MPI_INT
#elif OMPI_SIZEOF_FORTRAN_LOGICAL1 == SIZEOF_LONG
# define OMPI_DATATYPE_MPI_LOGICAL1 OMPI_DATATYPE_MPI_LONG
#else
# define OMPI_DATATYPE_MPI_LOGICAL1 OMPI_DATATYPE_MPI_UNAVAILABLE
#endif
#if OMPI_SIZEOF_FORTRAN_LOGICAL2 == OMPI_SIZEOF_FORTRAN_LOGICAL
# define OMPI_DATATYPE_MPI_LOGICAL2 OMPI_DATATYPE_MPI_LOGICAL
#elif OMPI_SIZEOF_FORTRAN_LOGICAL2 == SIZEOF_CHAR
# define OMPI_DATATYPE_MPI_LOGICAL2 OMPI_DATATYPE_MPI_CHAR
#elif OMPI_SIZEOF_FORTRAN_LOGICAL2 == SIZEOF_SHORT
# define OMPI_DATATYPE_MPI_LOGICAL2 OMPI_DATATYPE_MPI_SHORT
#elif OMPI_SIZEOF_FORTRAN_LOGICAL2 == SIZEOF_INT
# define OMPI_DATATYPE_MPI_LOGICAL2 OMPI_DATATYPE_MPI_INT
#elif OMPI_SIZEOF_FORTRAN_LOGICAL2 == SIZEOF_LONG
# define OMPI_DATATYPE_MPI_LOGICAL2 OMPI_DATATYPE_MPI_LONG
#else
# define OMPI_DATATYPE_MPI_LOGICAL2 OMPI_DATATYPE_MPI_UNAVAILABLE
#endif
#if OMPI_SIZEOF_FORTRAN_LOGICAL4 == OMPI_SIZEOF_FORTRAN_LOGICAL
# define OMPI_DATATYPE_MPI_LOGICAL4 OMPI_DATATYPE_MPI_LOGICAL
#elif OMPI_SIZEOF_FORTRAN_LOGICAL4 == SIZEOF_CHAR
# define OMPI_DATATYPE_MPI_LOGICAL4 OMPI_DATATYPE_MPI_CHAR
#elif OMPI_SIZEOF_FORTRAN_LOGICAL4 == SIZEOF_SHORT
# define OMPI_DATATYPE_MPI_LOGICAL4 OMPI_DATATYPE_MPI_SHORT
#elif OMPI_SIZEOF_FORTRAN_LOGICAL4 == SIZEOF_INT
# define OMPI_DATATYPE_MPI_LOGICAL4 OMPI_DATATYPE_MPI_INT
#elif OMPI_SIZEOF_FORTRAN_LOGICAL4 == SIZEOF_LONG
# define OMPI_DATATYPE_MPI_LOGICAL4 OMPI_DATATYPE_MPI_LONG
#else
# define OMPI_DATATYPE_MPI_LOGICAL4 OMPI_DATATYPE_MPI_UNAVAILABLE
#endif
#if OMPI_SIZEOF_FORTRAN_LOGICAL8 == OMPI_SIZEOF_FORTRAN_LOGICAL
# define OMPI_DATATYPE_MPI_LOGICAL8 OMPI_DATATYPE_MPI_LOGICAL
#elif OMPI_SIZEOF_FORTRAN_LOGICAL8 == SIZEOF_CHAR
# define OMPI_DATATYPE_MPI_LOGICAL8 OMPI_DATATYPE_MPI_CHAR
#elif OMPI_SIZEOF_FORTRAN_LOGICAL8 == SIZEOF_SHORT
# define OMPI_DATATYPE_MPI_LOGICAL8 OMPI_DATATYPE_MPI_SHORT
#elif OMPI_SIZEOF_FORTRAN_LOGICAL8 == SIZEOF_INT
# define OMPI_DATATYPE_MPI_LOGICAL8 OMPI_DATATYPE_MPI_INT
#elif OMPI_SIZEOF_FORTRAN_LOGICAL8 == SIZEOF_LONG
# define OMPI_DATATYPE_MPI_LOGICAL8 OMPI_DATATYPE_MPI_LONG
#else
# define OMPI_DATATYPE_MPI_LOGICAL8 OMPI_DATATYPE_MPI_UNAVAILABLE
#endif
/* INTEGER */
#if OMPI_SIZEOF_FORTRAN_INTEGER1 == OMPI_SIZEOF_FORTRAN_INTEGER
# define OMPI_DATATYPE_MPI_INTEGER1 OMPI_DATATYPE_MPI_INTEGER
#elif OMPI_SIZEOF_FORTRAN_INTEGER1 == SIZEOF_CHAR
# define OMPI_DATATYPE_MPI_INTEGER1 OMPI_DATATYPE_MPI_CHAR
#elif OMPI_SIZEOF_FORTRAN_INTEGER1 == SIZEOF_SHORT
# define OMPI_DATATYPE_MPI_INTEGER1 OMPI_DATATYPE_MPI_SHORT
#elif OMPI_SIZEOF_FORTRAN_INTEGER1 == SIZEOF_INT
# define OMPI_DATATYPE_MPI_INTEGER1 OMPI_DATATYPE_MPI_INT
#elif OMPI_SIZEOF_FORTRAN_INTEGER1 == SIZEOF_LONG
# define OMPI_DATATYPE_MPI_INTEGER1 OMPI_DATATYPE_MPI_LONG
#else
# define OMPI_DATATYPE_MPI_INTEGER1 OMPI_DATATYPE_MPI_UNAVAILABLE
#endif
#if OMPI_SIZEOF_FORTRAN_INTEGER2 == OMPI_SIZEOF_FORTRAN_INTEGER
# define OMPI_DATATYPE_MPI_INTEGER2 OMPI_DATATYPE_MPI_INTEGER
#elif OMPI_SIZEOF_FORTRAN_INTEGER2 == SIZEOF_CHAR
# define OMPI_DATATYPE_MPI_INTEGER2 OMPI_DATATYPE_MPI_CHAR
#elif OMPI_SIZEOF_FORTRAN_INTEGER2 == SIZEOF_SHORT
# define OMPI_DATATYPE_MPI_INTEGER2 OMPI_DATATYPE_MPI_SHORT
#elif OMPI_SIZEOF_FORTRAN_INTEGER2 == SIZEOF_INT
# define OMPI_DATATYPE_MPI_INTEGER2 OMPI_DATATYPE_MPI_INT
#elif OMPI_SIZEOF_FORTRAN_INTEGER2 == SIZEOF_LONG
# define OMPI_DATATYPE_MPI_INTEGER2 OMPI_DATATYPE_MPI_LONG
#else
# define OMPI_DATATYPE_MPI_INTEGER2 OMPI_DATATYPE_MPI_UNAVAILABLE
#endif
#if OMPI_SIZEOF_FORTRAN_INTEGER4 == OMPI_SIZEOF_FORTRAN_INTEGER
# define OMPI_DATATYPE_MPI_INTEGER4 OMPI_DATATYPE_MPI_INTEGER
#elif OMPI_SIZEOF_FORTRAN_INTEGER4 == SIZEOF_CHAR
# define OMPI_DATATYPE_MPI_INTEGER4 OMPI_DATATYPE_MPI_CHAR
#elif OMPI_SIZEOF_FORTRAN_INTEGER4 == SIZEOF_SHORT
# define OMPI_DATATYPE_MPI_INTEGER4 OMPI_DATATYPE_MPI_SHORT
#elif OMPI_SIZEOF_FORTRAN_INTEGER4 == SIZEOF_INT
# define OMPI_DATATYPE_MPI_INTEGER4 OMPI_DATATYPE_MPI_INT
#elif OMPI_SIZEOF_FORTRAN_INTEGER4 == SIZEOF_LONG
# define OMPI_DATATYPE_MPI_INTEGER4 OMPI_DATATYPE_MPI_LONG
#else
# define OMPI_DATATYPE_MPI_INTEGER4 OMPI_DATATYPE_MPI_UNAVAILABLE
#endif
#if OMPI_SIZEOF_FORTRAN_INTEGER8 == OMPI_SIZEOF_FORTRAN_INTEGER
# define OMPI_DATATYPE_MPI_INTEGER8 OMPI_DATATYPE_MPI_INTEGER
#elif OMPI_SIZEOF_FORTRAN_INTEGER8 == SIZEOF_CHAR
# define OMPI_DATATYPE_MPI_INTEGER8 OMPI_DATATYPE_MPI_CHAR
#elif OMPI_SIZEOF_FORTRAN_INTEGER8 == SIZEOF_SHORT
# define OMPI_DATATYPE_MPI_INTEGER8 OMPI_DATATYPE_MPI_SHORT
#elif OMPI_SIZEOF_FORTRAN_INTEGER8 == SIZEOF_INT
# define OMPI_DATATYPE_MPI_INTEGER8 OMPI_DATATYPE_MPI_INT
#elif OMPI_SIZEOF_FORTRAN_INTEGER8 == SIZEOF_LONG
# define OMPI_DATATYPE_MPI_INTEGER8 OMPI_DATATYPE_MPI_LONG
#else
# define OMPI_DATATYPE_MPI_INTEGER8 OMPI_DATATYPE_MPI_UNAVAILABLE
#endif
#if OMPI_SIZEOF_FORTRAN_INTEGER16 == OMPI_SIZEOF_FORTRAN_INTEGER
# define OMPI_DATATYPE_MPI_INTEGER16 OMPI_DATATYPE_MPI_INTEGER
#elif OMPI_SIZEOF_FORTRAN_INTEGER16 == SIZEOF_CHAR
# define OMPI_DATATYPE_MPI_INTEGER16 OMPI_DATATYPE_MPI_CHAR
#elif OMPI_SIZEOF_FORTRAN_INTEGER16 == SIZEOF_SHORT
# define OMPI_DATATYPE_MPI_INTEGER16 OMPI_DATATYPE_MPI_SHORT
#elif OMPI_SIZEOF_FORTRAN_INTEGER16 == SIZEOF_INT
# define OMPI_DATATYPE_MPI_INTEGER16 OMPI_DATATYPE_MPI_INT
#elif OMPI_SIZEOF_FORTRAN_INTEGER16 == SIZEOF_LONG
# define OMPI_DATATYPE_MPI_INTEGER16 OMPI_DATATYPE_MPI_LONG
#else
# define OMPI_DATATYPE_MPI_INTEGER16 OMPI_DATATYPE_MPI_UNAVAILABLE
#endif
/* REAL */
#if OMPI_SIZEOF_FORTRAN_REAL2 == OMPI_SIZEOF_FORTRAN_REAL
# define OMPI_DATATYPE_MPI_REAL2 OMPI_DATATYPE_MPI_REAL
#elif OMPI_SIZEOF_FORTRAN_REAL2 == SIZEOF_FLOAT
# define OMPI_DATATYPE_MPI_REAL2 OMPI_DATATYPE_MPI_FLOAT
#elif OMPI_SIZEOF_FORTRAN_REAL2 == SIZEOF_DOUBLE
# define OMPI_DATATYPE_MPI_REAL2 OMPI_DATATYPE_MPI_DOUBLE
#elif OMPI_SIZEOF_FORTRAN_REAL2 == SIZEOF_LONG_DOUBLE
# define OMPI_DATATYPE_MPI_REAL2 OMPI_DATATYPE_MPI_LONG_DOUBLE
#else
# define OMPI_DATATYPE_MPI_REAL2 OMPI_DATATYPE_MPI_UNAVAILABLE
#endif
#if OMPI_SIZEOF_FORTRAN_REAL4 == OMPI_SIZEOF_FORTRAN_REAL
# define OMPI_DATATYPE_MPI_REAL4 OMPI_DATATYPE_MPI_REAL
#elif OMPI_SIZEOF_FORTRAN_REAL4 == SIZEOF_FLOAT
# define OMPI_DATATYPE_MPI_REAL4 OMPI_DATATYPE_MPI_FLOAT
#elif OMPI_SIZEOF_FORTRAN_REAL4 == SIZEOF_DOUBLE
# define OMPI_DATATYPE_MPI_REAL4 OMPI_DATATYPE_MPI_DOUBLE
#elif OMPI_SIZEOF_FORTRAN_REAL4 == SIZEOF_LONG_DOUBLE
# define OMPI_DATATYPE_MPI_REAL4 OMPI_DATATYPE_MPI_LONG_DOUBLE
#else
# define OMPI_DATATYPE_MPI_REAL4 OMPI_DATATYPE_MPI_UNAVAILABLE
#endif
#if OMPI_SIZEOF_FORTRAN_REAL8 == OMPI_SIZEOF_FORTRAN_REAL
# define OMPI_DATATYPE_MPI_REAL8 OMPI_DATATYPE_MPI_REAL
#elif OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_FLOAT
# define OMPI_DATATYPE_MPI_REAL8 OMPI_DATATYPE_MPI_FLOAT
#elif OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_DOUBLE
# define OMPI_DATATYPE_MPI_REAL8 OMPI_DATATYPE_MPI_DOUBLE
#elif OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_LONG_DOUBLE
# define OMPI_DATATYPE_MPI_REAL8 OMPI_DATATYPE_MPI_LONG_DOUBLE
#else
# define OMPI_DATATYPE_MPI_REAL8 OMPI_DATATYPE_MPI_UNAVAILABLE
#endif
#if OMPI_SIZEOF_FORTRAN_REAL16 == OMPI_SIZEOF_FORTRAN_REAL
# define OMPI_DATATYPE_MPI_REAL16 OMPI_DATATYPE_MPI_REAL
#elif OMPI_SIZEOF_FORTRAN_REAL16 == SIZEOF_FLOAT
# define OMPI_DATATYPE_MPI_REAL16 OMPI_DATATYPE_MPI_FLOAT
#elif OMPI_SIZEOF_FORTRAN_REAL16 == SIZEOF_DOUBLE
# define OMPI_DATATYPE_MPI_REAL16 OMPI_DATATYPE_MPI_DOUBLE
#elif OMPI_SIZEOF_FORTRAN_REAL16 == SIZEOF_LONG_DOUBLE
# define OMPI_DATATYPE_MPI_REAL16 OMPI_DATATYPE_MPI_LONG_DOUBLE
#else
# define OMPI_DATATYPE_MPI_REAL16 OMPI_DATATYPE_MPI_UNAVAILABLE
#endif
OMPI_DECLSPEC extern union dt_elem_desc ompi_datatype_predefined_elem_desc[2 * OMPI_DATATYPE_MPI_MAX_PREDEFINED];
extern const ompi_datatype_t* ompi_datatype_basicDatatypes[OMPI_DATATYPE_MPI_MAX_PREDEFINED];