I'm adding together a load of array elements from each process:
double rho[1024];
//Some operation to calculate rho for each process;
MPI_Allreduce(rho,rho,1024,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
Will having rho as both the sendbuf and recvbuf work?