mpi4py.MPI.Group — MPI for Python 3.1.4 documentation

# mpi4py.MPI.Group

class mpi4py.MPI.Group(group=None)

  Bases: `object`

  Group of processes

  Parameters:

    group (Optional[Group]) –

  Return type:

    Group

  static __new__(cls, group=None)
    Parameters:

      group (Optional[Group]) –

    Return type:

      Group

  Methods Summary

  `Compare`(group1, group2) | Compare two groups
  `Difference`(group1, group2) | Produce a group from the difference of two existing groups
  `Dup`() | Duplicate a group
  `Excl`(ranks) | Produce a group by reordering an existing group and taking only unlisted members
  `Free`() | Free a group
  `Get_rank`() | Return the rank of this process in a group
  `Get_size`() | Return the size of a group
  `Incl`(ranks) | Produce a group by reordering an existing group and taking only listed members
  `Intersection`(group1, group2) | Produce a group as the intersection of two existing groups
  `Range_excl`(ranks) | Create a new group by excluding ranges of processes from an existing group
  `Range_incl`(ranks) | Create a new group from ranges of of ranks in an existing group
  `Translate_ranks`(group1, ranks1[, group2]) | Translate the ranks of processes in one group to those in another group
  `Union`(group1, group2) | Produce a group by combining two existing groups
  `f2py`(arg) |
  `py2f`() |

  Attributes Summary

  `rank` | rank of this process in group
  `size` | number of processes in group

  Methods Documentation

  classmethod Compare(group1, group2)

    Compare two groups

    Parameters:

      - group1 (Group) –

      - group2 (Group) –

    Return type:

      int

  classmethod Difference(group1, group2)

    Produce a group from the difference of two existing groups

    Parameters:

      - group1 (Group) –

      - group2 (Group) –

    Return type:

      Group

  Dup()

    Duplicate a group

    Return type:

      Group

  Excl(ranks)

    Produce a group by reordering an existing group and taking only unlisted members

    Parameters:

      ranks (Sequence[int]) –

    Return type:

      Group

  Free()

    Free a group

    Return type:

      None

  Get_rank()

    Return the rank of this process in a group

    Return type:

      int

  Get_size()

    Return the size of a group

    Return type:

      int

  Incl(ranks)

    Produce a group by reordering an existing group and taking only listed members

    Parameters:

      ranks (Sequence[int]) –

    Return type:

      Group

  classmethod Intersection(group1, group2)

    Produce a group as the intersection of two existing groups

    Parameters:

      - group1 (Group) –

      - group2 (Group) –

    Return type:

      Group

  Range_excl(ranks)

    Create a new group by excluding ranges of processes from an existing group

    Parameters:

      ranks (Sequence[Tuple[int, int, int]]) –

    Return type:

      Group

  Range_incl(ranks)

    Create a new group from ranges of of ranks in an existing group

    Parameters:

      ranks (Sequence[Tuple[int, int, int]]) –

    Return type:

      Group

  classmethod Translate_ranks(group1, ranks1, group2=None)

    Translate the ranks of processes in one group to those in another group

    Parameters:

      - group1 (Group) –

      - ranks1 (Sequence[int]) –

      - group2 (Optional[Group]) –

    Return type:

      List[int]

  classmethod Union(group1, group2)

    Produce a group by combining two existing groups

    Parameters:

      - group1 (Group) –

      - group2 (Group) –

    Return type:

      Group

  classmethod f2py(arg)
    Parameters:

      arg (int) –

    Return type:

      Group

  py2f()
    Return type:

      int

  Attributes Documentation

  rank

    rank of this process in group

  size

    number of processes in group