6
* This example should be run with 2 processes and tests the ability of the
7
* implementation to handle a flood of one-way messages.
10
int main( int argc, char **argv )
12
double wscale = 10.0, scale;
13
int numprocs, myid,i,namelen;
14
char processor_name[MPI_MAX_PROCESSOR_NAME];
16
MPI_Init(&argc,&argv);
17
MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
18
MPI_Comm_rank(MPI_COMM_WORLD,&myid);
19
MPI_Get_processor_name(processor_name,&namelen);
21
/* fprintf(stderr,"Process %d on %s\n",
22
myid, processor_name); */
23
for ( i=0; i<10000; i++) {
24
MPI_Allreduce(&wscale,&scale,1,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);