Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] MPI and C++
From: Dorian Krause (doriankrause_at_[hidden])
Date: 2009-07-03 19:42:00


Luis Vitorio Cargnini wrote:
> Hi,
> Please I'm writing a C++ applications that will use MPI. My problem
> is, I want to use the C++ bindings and then come my doubts. All the
> examples that I found people is using almost like C, except for the
> fact of adding the namespace MPI:: before the procedure calls.

That's how the bindings are defined in the Standard.

> For example I want to apply MPI for a OO code, like inside my object,
> for example, call the MPI::Init() inside the constructor ...

MPI has itself an object-oriented design, so this should be no problem.
I would discourage you to use the C++ bindings, since (to my knowledge)
they might be removed from MPI 3.0 (there is such a proposal).

You might also want to take a look at Python.MPI which is a popular
wrapper library.

Hope this helps,

> Please if someone could advice me on this thanks.
> ------------------------------------------------------------------------
> _______________________________________________
> users mailing list
> users_at_[hidden]