#include "mpi.h" #include #include #define MAXSIZE 1024*1024*2 int main( int argc, char *argv[] ) { int myrank, size; int *sendbuf,*recvbuf; int i; int count; int block[3]; MPI_Aint disp[3]; MPI_Status *stat; MPI_Request *request; MPI_Datatype newtype; MPI_Datatype dtype[3]; MPI_Init( 0, 0 ); MPI_Comm_size( MPI_COMM_WORLD, &size ); MPI_Comm_rank( MPI_COMM_WORLD, &myrank ); sendbuf = (int*)malloc(MAXSIZE); recvbuf = (int*)malloc(MAXSIZE); stat = (MPI_Status*)malloc(sizeof(MPI_Status)*size); request = (MPI_Request*)malloc(sizeof(MPI_Request)*size); for(i=0;i