-#ifdef MPICH2_REDUCTION
- MPI_User_function *uop = MPIR_Op_table[op % 16 - 1];
-#else
- MPI_User_function *uop;
- struct MPIR_OP *op_ptr;
- op_ptr = (MPI_User_function *) MPIR_ToPointer(op);
- uop = op_ptr->op;
-#endif
-
- MPI_Comm_size(comm, &nprocs);
- MPI_Comm_rank(comm, &rank);
-
- MPI_Type_extent(dtype, &extent);
- tmp_buf = (void *) malloc(count * extent);
- if (!tmp_buf) {
- printf("Could not allocate memory for tmp_buf\n");
- return 1;
- }