diff --git a/src/ampi.c b/src/ampi.c index b6e9888..10817ca 100644 --- a/src/ampi.c +++ b/src/ampi.c @@ -451,13 +451,10 @@ int AMPI_Allreduce_f(double *sendbuf, double *recvbuf, int count, MPI_Datatype d int AMPI_Allreduce_b(double *sendbuf, double *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { int i=0; - int j=0; int myid=0; int numprocs=0; int idx=0; - double **recvbuf_tmp = 0; double *minmaxbuf_tmp = 0; - MPI_Request *requests = 0; double *s = 0; double *s_d = 0; double *r = 0; @@ -470,31 +467,7 @@ int AMPI_Allreduce_b(double *sendbuf, double *recvbuf, int count, MPI_Datatype d } #endif if(op == MPI_PROD || op == MPI_SUM) { - if(myid==0) { - requests = (MPI_Request*) malloc(sizeof(MPI_Request)*(numprocs-1)); - recvbuf_tmp = (double**) malloc(sizeof(double*)*numprocs); - recvbuf_tmp[0] = recvbuf; - for(i=1;i