#20 Modify behavior of comm_create

closed-accepted
None
3
2005-02-23
2004-11-19
No

mpi.comm_create currently handles only sequences, and
raises an exception on a single value. For instance:

On a machine with a single processor, the following
works, because the slicing notation creates a
list(sequence).

OK: mpi.comm_create( mpi.WORLD[O:1] )

FAILS: mpi.comm_create( mpi.WORLD[0] )
TypeError: unindexable object

I'm going to modify mpi.comm_create so that it accepts
single elements and handles them correctly as well
handling sequences as it currently does.

If you do want to make single processor communicators
you can still do it by just adding [] brackets, i.e.:

mpi.comm_create( [ mpi.WORLD[0] ] )

However that introduces special cases and is
inconsistent.

Discussion

  • Patrick Miller
    Patrick Miller
    2005-02-23

    • status: open --> closed-accepted
     
  • Patrick Miller
    Patrick Miller
    2005-02-23

    Logged In: YES
    user_id=30074

    Accepted Mike's change and added to the unit
    test suite.