LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Madhuri (madhurisd_at_[hidden])
Date: 2010-03-02 04:14:19


Can somebody give an example of the use of MPI_MINLOC with MPI_Reduce.
In my program i have the following program:
#include
#include"mpi.h"
#include
int fun(int x[]);
int main(int argc,char* argv[])
 {
  int x[6],mr,np,i,best;
  MPI_Init(&argc,&argv);
  MPI_Comm_rank(MPI_COMM_WORLD,&mr);
  MPI_Comm_size(MPI_COMM_WORLD,&np);
  //MPI_Status stat;
  for(i=0;i