Q:

How to write own MPI_Bcast and MPI_reduce

Is it possible to write own Mpi_Bcast and Mpi_reduce called it like MyMpi_Bcast and MyMpi_Reduce?
And have the same arguments like it has the real Mpi_Bcast and Reduce.
1.int myMPI_Bcast( void *buffer, int count, MPI_Datatype datatype,int root, MPI_Comm comm);
2.int myMPI_Reduce( const void *sendbuf, void *recvbuf, int count,int root, MPI_Comm comm);
My purpose is comparing the real Mpi_Bcast and own implementation? For example:
-— int test —-
My_MPI_Bcast: 50ms
MPI_Bcast: 34ms

Truthfully, I have searched some information for implementations of own mpi_communicators, and I can't find examples. Can you ,please, help?

A:

This tutorial does exactly that. 
The linked tutorial is much more helpful, but for simplest bcast basically just have the originiating process send to all other processes.
For the most simple reduce have all processes send to one and the reciever combines the input in whatever method is specified.

