Boost logo

Boost Users :

Subject: [Boost-users] Fwd: Boost.MPI --- boost::mpi::group class
From: Júlio Hoffimann (julio.hoffimann_at_[hidden])
Date: 2011-02-07 13:53:51


Oh my god, it's not implemented, right?

boost::mpi::group(const MPI_Group& in_group, bool adopt);

I will have to use OpenMPI C++ terrible bindings. :-(

Júlio.

---------- Forwarded message ----------
From: Júlio Hoffimann <julio.hoffimann_at_[hidden]>
Date: 2011/2/7
Subject: Boost.MPI --- boost::mpi::group class
To: boost-users_at_[hidden]

Hi,

It's my first time using Boost and is amazing. I'm trying to understand why
this simple example bellow don't works as expected:

#include <iostream>
#include <boost/mpi.hpp>

using namespace std;
namespace mpi = boost::mpi;

int main ( int argc, char *argv[] )
{
mpi::environment env( argc, argv );
mpi::communicator world;
mpi::group subgroup( MPI_Group( world.group() ), true );

cout << "I'm process " << world.rank() <<
endl;
cout << "But in subgroup i'm process " << subgroup.rank() << endl;
 cout << "And the subgroup size is... " << subgroup.size() << endl;

return 0;
} // ---------- end of function main ----------

*1. Why every process has rank 1 in subgroup? I trying to figure out what
happens, but without success.*

The mpi::boost::group class has no copy constructor explicitly defined. That
is true for many other classes in Boost.MPI...

*2. It's safe to use the copy constructor generated by the compiler as
follows?*
*
*
mpi::group subgroup = world.group().exclude( discardedRanks.begin(),
discardedRanks.end() );

Thanks in advance for any help.

Regards,
Júlio.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net