[vtk-developers] MPI_Comm_split

pat marion pat.marion at kitware.com
Fri Jun 11 18:18:40 EDT 2010


VTK wraps MPI_Comm_split with vtkMPIController::PartitionController(), which
calls vtkMPICommunicator::SplitInitialize().  Currently there is no support
for passing MPI_UNDEFINED as a color.  If you pass MPI_UNDEFINED as a color
you should get back a null communicator (MPI_COMM_NULL).

There is handling of null communicators in
vtkMPIController::CreateSubController() which wraps MPI_Comm_create.  So I
can follow the same pattern to make PartitionController support it too, no
problem.

But I do a lot of prototyping in python, and in python I can't easily use
MPI_UNDEFINED.  So I'm thinking about adding a static method called
vtkMPICommunicator::GetMPIUndefined() that returns MPI_UNDEFINED  (it's just
an int).  Objections?  My other thought was to have
vtkMPIController::PartitionController automatically convert negative color
values to MPI_UNDEFINED, but that behavior could cover up programming
errors, so I don't like that.

Pat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtk-developers/attachments/20100611/061b984b/attachment.htm>


More information about the vtk-developers mailing list