Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] How to override MPI functions such as MPI_Init, MPI_Recv...
From: Durga Choudhury (dpchoudh_at_[hidden])
Date: 2009-05-13 13:26:47


You could use a separate namespace (if you are using C++) and define
your functions there...

Durga

On Wed, May 13, 2009 at 1:20 PM, Le Duy Khanh <khanhtn24_at_[hidden]> wrote:
> Dear,
>
>  I intend to override some MPI functions such as MPI_Init, MPI_Recv... but I
> don't want to dig into OpenMPI source code.Therefore, I am thinking of a way
> to create a lib called "mympi.h" in which I will #include "mpi.h" to
> override those functions. I will create a new interface with exactly the
> same signatures like MPI_Init (because users are familiar with those
> functions). However, the problem is that I don't know how to override those
> functions because as I know, C/C++ doesn't allow us to override functions
> (only overload them).
>
>  Could you please show me how to override OMPI functions but still keep the
> same function names and signatures?
>
>  Thank you so much for your time and consideration
>
> Le , Duy Khanh
> Cellphone: (+84)958521704
> Faculty of Computer Science and Engineering
> Ho Chi Minh city University of Technology , Viet Nam
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>