~ubuntu-branches/ubuntu/raring/simgrid/raring

« back to all changes in this revision

Viewing changes to teshsuite/smpi/mpich-test/coll/allredmany.c

  • Committer: Package Import Robot
  • Author(s): Martin Quinson
  • Date: 2013-01-31 00:24:51 UTC
  • mfrom: (10.1.6 sid)
  • Revision ID: package-import@ubuntu.com-20130131002451-krejhf7w7h24lpsc
Tags: 3.9~rc1-1
* New upstream release: the "Grasgory" release. Major changes:
  - Gras was completely removed from this version.
  - Documentation reorganization to ease browsing it.
  - New default value for the TCP_gamma parameter: 4MiB

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdio.h>
 
2
#include "mpi.h"
 
3
#include "test.h"
 
4
 
 
5
/*
 
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.
 
8
 */
 
9
 
 
10
int main( int argc, char **argv )
 
11
{
 
12
  double wscale = 10.0, scale;
 
13
  int numprocs, myid,i,namelen;
 
14
  char processor_name[MPI_MAX_PROCESSOR_NAME];
 
15
 
 
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);
 
20
 
 
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);
 
25
  }
 
26
  MPI_Finalize();
 
27
  return 0;
 
28
}