Commit d71ee84f authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Add uint32_t to MPI-serializable types.

parent fefc5b77
......@@ -4,6 +4,8 @@
#ifdef USE_MPI
#include <inttypes.h>
#include <mpi.h>
#include "cdi.h"
......@@ -21,9 +23,11 @@ static struct
#define CDI_DT_MATCH_NEEDED 1
{ DATATYPE_INT8, MPI_SIGNED_CHAR },
{ DATATYPE_INT16, MPI_SHORT },
{ DATATYPE_UINT32, MPI_INT },
#else
{ DATATYPE_INT8, MPI_INT8_T },
{ DATATYPE_INT16, MPI_INT16_T },
{ DATATYPE_UINT32, MPI_UINT32_T },
#endif
{ DATATYPE_INT, MPI_INT },
{ DATATYPE_FLT64, MPI_DOUBLE },
......@@ -56,12 +60,14 @@ static inline void
}
static void
setupDtDict()
setupDtDict()
{
dtDictFixMPIType(lookupDt(DATATYPE_INT8), MPI_TYPECLASS_INTEGER,
(int)sizeof (int8_t));
dtDictFixMPIType(lookupDt(DATATYPE_INT16), MPI_TYPECLASS_INTEGER,
(int)sizeof (int16_t));
dtDictFixMPIType(lookupDt(DATATYPE_UINT32), MPI_TYPECLASS_INTEGER,
(int)sizeof (uint32_t));
dtDictMatchComplete = 1;
}
#endif
......
......@@ -49,6 +49,9 @@ serializeGetSizeInCore(int count, int datatype, void *context)
case DATATYPE_INT16:
elemSize = sizeof (int16_t);
break;
case DATATYPE_UINT32:
elemSize = sizeof (uint32_t);
break;
case DATATYPE_INT:
elemSize = sizeof (int);
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment