I trying to send variables of type mpfr_t
using MPI_Scatter
. For example:
mpfr_t *v1 = new mpfr_t[10];
mpfr_t *v2 = new mpfr_t[10];
MPI_Scatter(v1, 5, MPI_BYTE, v2, 5, MPI_BYTE, 0, MPI_COMM_WORLD );
for (int i = 0; i < 5; i++)
mpfr_printf("value rank %d - %RNf \n", ProcRank, v2[i]);
It prints:
value rank 0 - nan
value rank 0 - nan
value rank 0 - nan
.....
value rank 1 - nan
value rank 0 - nan
But it's work of MPI_Bcast. What I do wrong. Code C/C++, MPI lib is OpenMPI-1.6.