
#include<stdio.h>
#include<sys/time.h>
#include<reduce.h>
#include<mpl.h>

float TotalValue;
int k,l,dimen,n,iteration_num;
plural float value;
plural float x;
plural int i;

void main(void)
{  
   float send_result();
   char intvariable[5];
 
   TotalValue = 0.0;
   iteration_num=6;
   dimen=4;

   printf("\n deneme nproc=%d \n",nproc);

}/* end of main */

float send_result(lim) 
int lim;
{ int pstep;
  int step;
  int i;

  pstep=1;
  for(i=0;i<lim;i++)
  { step =  2 * pstep;
    if(!(ixproc%step)) value = xnetE[pstep].value + value;
    pstep = step;
  }/* end of for() */

  pstep=1;
  for(i=0;i<lim;i++)
  { step =  2 * pstep;
    if((iyproc==lim)&&(!(ixproc%step))) value = xnetE[pstep].value + value;
    pstep = step;
  }/* end of for() */
  return  proc[lim*lim].value;
}/* end of send_result() */

double when() /* time function */
{ struct timeval tp;
  struct timezone tzp;
  gettimeofday(&tp, &tzp);
  return( (double) tp.tv_sec + (double) tp.tv_usec * 1e-6 ) ;
}/* end of when() */


