Make sure that you use "%lf", not "%f" to read the double precision value.

Do not forget to commit your MPI datatype with MPI_Type_commit.