has been received.
*/
+#define STR_SIZE 200
+
/*
Add a predefined MPI type to the tests. _count instances of the
type will be sent.
outbufs[cnt] = (void *)malloc(sizeof(_ctype) * (_count)); \
a = (_ctype *)inbufs[cnt]; for (i=0; i<(_count); i++) a[i] = i; \
a = (_ctype *)outbufs[cnt]; for (i=0; i<(_count); i++) a[i] = 0; \
- myname = (char *)malloc(100);\
+ myname = (char *)malloc(STR_SIZE);\
MPI_Type_get_name(_mpitype, _basename, &_basenamelen); \
- snprintf(myname, 100, "Contig type %s", _basename); \
+ snprintf(myname, STR_SIZE, "Contig type %s", _basename); \
MPI_Type_set_name(types[cnt], myname); \
free(myname); \
counts[cnt] = 1; bytesize[cnt] = sizeof(_ctype) * (_count); cnt++; }
outbufs[cnt] = (void *)calloc(sizeof(_ctype) * (_count) * (_stride),1); \
a = (_ctype *)inbufs[cnt]; for (i=0; i<(_count); i++) a[i*(_stride)] = i; \
a = (_ctype *)outbufs[cnt]; for (i=0; i<(_count); i++) a[i*(_stride)] = 0; \
- myname = (char *)malloc(100);\
+ myname = (char *)malloc(STR_SIZE);\
MPI_Type_get_name(_mpitype, _basename, &_basenamelen); \
- snprintf(myname, 100, "Vector type %s", _basename); \
+ snprintf(myname, STR_SIZE, "Vector type %s", _basename); \
MPI_Type_set_name(types[cnt], myname); \
free(myname); \
counts[cnt] = 1; bytesize[cnt] = sizeof(_ctype) * (_count) * (_stride) ;\
outbufs[cnt] = (void *)malloc(sizeof(_ctype) * (_count)); \
a = (_ctype *)inbufs[cnt]; for (i=0; i<(_count); i++) a[i] = i; \
a = (_ctype *)outbufs[cnt]; for (i=0; i<(_count); i++) a[i] = 0; \
- myname = (char *)malloc(100);\
+ myname = (char *)malloc(STR_SIZE);\
MPI_Type_get_name(_mpitype, _basename, &_basenamelen); \
- snprintf(myname, 100, "Index type %s", _basename); \
+ snprintf(myname, STR_SIZE, "Index type %s", _basename); \
MPI_Type_set_name(types[cnt], myname); \
free(myname); \
counts[cnt] = 1; bytesize[cnt] = sizeof(_ctype) * (_count); cnt++; }
a[i].a2 = i; } \
a = (struct name *)outbufs[cnt]; for (i=0; i<(_count); i++) { a[i].a1 = 0; \
a[i].a2 = 0; } \
- myname = (char *)malloc(100); \
- snprintf(myname, 100, "Struct type %s", _tname); \
+ myname = (char *)malloc(STR_SIZE); \
+ snprintf(myname, STR_SIZE, "Struct type %s", _tname); \
MPI_Type_set_name(types[cnt], myname); \
free(myname); \
counts[cnt] = (_count); bytesize[cnt] = sizeof(struct name) * (_count);cnt++; }
outbufs[cnt] = (void *)calloc(sizeof(_ctype) * (_count) * (_stride),1);\
a = (_ctype *)inbufs[cnt]; for (i=0; i<(_count); i++) a[i*(_stride)] = i; \
a = (_ctype *)outbufs[cnt]; for (i=0; i<(_count); i++) a[i*(_stride)] = 0; \
- myname = (char *)malloc(100); \
+ myname = (char *)malloc(STR_SIZE); \
MPI_Type_get_name(_mpitype, _basename, &_basenamelen); \
- snprintf(myname, 100, "Struct (MPI_UB) type %s", _basename); \
+ snprintf(myname, STR_SIZE, "Struct (MPI_UB) type %s", _basename); \
MPI_Type_set_name(types[cnt], myname); \
free(myname); \
counts[cnt] = (_count); \