From: Jeff Squyres Date: January 23, 2008 12:26:55 PM CST To: mpi-21@XXXXXXXXXXXXX Subject: Re: [mpi-21] const MPI C++ handles Reply-To: mpi-21@XXXXXXXXXXXXX On Jan 23, 2008, at 12:55 PM, Erez Haba wrote: > What is I implement the C++ binding but I don't have an underlying > C implementation? The C++ objects will hold all the relevant > information and by defining MPI::COMM_WORLD const, you make it > immutable. You still have to supply handle-like semantics, so you can't put the state in the MPI handle (not even MPI::COMM_WORLD). E.g.: MPI::Intracomm a = b; b.Set_name("foo"); a.Get_name(name, sizeof(name)); The string put into the name variable *must* be "foo". This means that you can't store the name on the b handle, but rather on the underlying MPI communicator. You can easily construct nastier examples where the original handle would go out of scope (but the underlying MPI communicator must still exist), so elaborate reference schemes (where a simply references to b) won't work, either. -- Jeff Squyres Cisco Systems