Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > b96b0d782c858619536ab397b702cc7e > files > 72

mpich2-doc-1.0.8-2mdv2010.0.i586.rpm

/*
   (C) 2004 by Argonne National Laboratory.
       See COPYRIGHT in top-level directory.
*/
#include <stdio.h>
#include "mpi.h"

int main( int argc, char *argv[] )
{
    int rank;
    int ibuff = 0x0;

    MPI_Init( &argc, &argv );
    MPI_Comm_rank( MPI_COMM_WORLD, &rank );

    /* root is changing with rank */
    MPI_Bcast( &ibuff, 1, MPI_INT, rank, MPI_COMM_WORLD );

    MPI_Finalize();
    return 0;
}