I am broadcasting a pointer to an array
MPI_Bcast(&xd_sim_send, Nooflines_Sim, MPI_FLOAT, root, MPI_COMM_WORLD);
from process 0 and receiving this broadcast from processes other than 0
MPI_Bcast(&xd_sim_recv, Nooflines_Sim, MPI_FLOAT, root, MPI_COMM_WORLD);
I get segmentation fault 11 when I try to read the received value. Like this
for(i=0; i<Numlines_Sim; i++)
printf("%f\n",xd_sim_recv[i]);fflush(stdout);
What is wrong here, Could you please help me fix it?
xd_sim_recv
in the processes other than root? – Nicolás Ozimica&
. See my answer below. – Nicolás Ozimica