#include #include #include #include #define SIZE 4 int main (int argc, char *argv[]) { int numtasks, rank, sendcount, recvcount, source; float sendbuf[SIZE]; float recvbuf[SIZE * SIZE]; MPI_Init(&argc,&argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &numtasks); if (numtasks == SIZE) { source = 1; sendcount = SIZE; recvcount = SIZE; //init sendbuf for(int i=0; i