- if (datatype==MPI_BYTE)
- return "";
- if(datatype==MPI_DOUBLE)
- return "0";
- if(datatype==MPI_INT)
- return "1";
- if(datatype==MPI_CHAR)
- return "2";
- if(datatype==MPI_SHORT)
- return "3";
- if(datatype==MPI_LONG)
- return "4";
- if(datatype==MPI_FLOAT)
- return "5";
- // default - not implemented.
- // do not warn here as we pass in this function even for other trace formats
- return "-1";
+ if (datatype == nullptr) /* this actually does seem to be possible, had this in the scatter2 test */
+ return "-1";
+
+ return datatype->encode();