mpi4py.MPI.Win — MPI for Python 3.1.4 documentation

# mpi4py.MPI.Win

class mpi4py.MPI.Win(win=None)

  Bases: `object`

  Window handle

  Parameters:

    win (Optional[Win]) –

  Return type:

    Win

  static __new__(cls, win=None)
    Parameters:

      win (Optional[Win]) –

    Return type:

      Win

  Methods Summary

  `Accumulate`(origin, target_rank[, target, op]) | Accumulate data into the target process
  `Allocate`(size[, disp_unit, info, comm]) | Create an window object for one-sided communication
  `Allocate_shared`(size[, disp_unit, info, comm]) | Create an window object for one-sided communication
  `Attach`(memory) | Attach a local memory region
  `Call_errhandler`(errorcode) | Call the error handler installed on a window
  `Compare_and_swap`(origin, compare, result, ...) | Perform one-sided atomic compare-and-swap
  `Complete`() | Completes an RMA operations begun after an `Win.Start()`
  `Create`(memory[, disp_unit, info, comm]) | Create an window object for one-sided communication
  `Create_dynamic`([info, comm]) | Create an window object for one-sided communication
  `Create_keyval`([copy_fn, delete_fn, nopython]) | Create a new attribute key for windows
  `Delete_attr`(keyval) | Delete attribute value associated with a key
  `Detach`(memory) | Detach a local memory region
  `Fence`([assertion]) | Perform an MPI fence synchronization on a window
  `Fetch_and_op`(origin, result, target_rank[, ...]) | Perform one-sided read-modify-write
  `Flush`(rank) | Complete all outstanding RMA operations at the given target
  `Flush_all`() | Complete all outstanding RMA operations at all targets
  `Flush_local`(rank) | Complete locally all outstanding RMA operations at the given target
  `Flush_local_all`() | Complete locally all outstanding RMA opera- tions at all targets
  `Free`() | Free a window
  `Free_keyval`(keyval) | Free an attribute key for windows
  `Get`(origin, target_rank[, target]) | Get data from a memory window on a remote process.
  `Get_accumulate`(origin, result, target_rank) | Fetch-and-accumulate data into the target process
  `Get_attr`(keyval) | Retrieve attribute value by key
  `Get_errhandler`() | Get the error handler for a window
  `Get_group`() | Return a duplicate of the group of the communicator used to create the window
  `Get_info`() | Return the hints for a windows that are currently in use
  `Get_name`() | Get the print name associated with the window
  `Lock`(rank[, lock_type, assertion]) | Begin an RMA access epoch at the target process
  `Lock_all`([assertion]) | Begin an RMA access epoch at all processes
  `Post`(group[, assertion]) | Start an RMA exposure epoch
  `Put`(origin, target_rank[, target]) | Put data into a memory window on a remote process.
  `Raccumulate`(origin, target_rank[, target, op]) | Fetch-and-accumulate data into the target process
  `Rget`(origin, target_rank[, target]) | Get data from a memory window on a remote process.
  `Rget_accumulate`(origin, result, target_rank) | Accumulate data into the target process using remote memory access.
  `Rput`(origin, target_rank[, target]) | Put data into a memory window on a remote process.
  `Set_attr`(keyval, attrval) | Store attribute value associated with a key
  `Set_errhandler`(errhandler) | Set the error handler for a window
  `Set_info`(info) | Set new values for the hints associated with a window
  `Set_name`(name) | Set the print name associated with the window
  `Shared_query`(rank) | Query the process-local address for remote memory segments created with `Win.Allocate_shared()`
  `Start`(group[, assertion]) | Start an RMA access epoch for MPI
  `Sync`() | Synchronize public and private copies of the given window
  `Test`() | Test whether an RMA exposure epoch has completed
  `Unlock`(rank) | Complete an RMA access epoch at the target process
  `Unlock_all`() | Complete an RMA access epoch at all processes
  `Wait`() | Complete an RMA exposure epoch begun with `Win.Post()`
  `f2py`(arg) |
  `py2f`() |
  `tomemory`() | Return window memory buffer

  Attributes Summary

  `attrs` | window attributes
  `flavor` | window create flavor
  `group` | window group
  `info` | window info
  `model` | window memory model
  `name` | window name

  Methods Documentation

  Accumulate(origin, target_rank, target=None, op=SUM)

    Accumulate data into the target process

    Parameters:

      - origin (BufSpec) –

      - target_rank (int) –

      - target (Optional[TargetSpec]) –

      - op (Op) –

    Return type:

      None

  classmethod Allocate(size, disp_unit=1, info=INFO_NULL, comm=COMM_SELF)

    Create an window object for one-sided communication

    Parameters:

      - size (int) –

      - disp_unit (int) –

      - info (Info) –

      - comm (Intracomm) –

    Return type:

      Win

  classmethod Allocate_shared(size, disp_unit=1, info=INFO_NULL, comm=COMM_SELF)

    Create an window object for one-sided communication

    Parameters:

      - size (int) –

      - disp_unit (int) –

      - info (Info) –

      - comm (Intracomm) –

    Return type:

      Win

  Attach(memory)

    Attach a local memory region

    Parameters:

      memory (Buffer) –

    Return type:

      None

  Call_errhandler(errorcode)

    Call the error handler installed on a window

    Parameters:

      errorcode (int) –

    Return type:

      None

  Compare_and_swap(origin, compare, result, target_rank, target_disp=0)

    Perform one-sided atomic compare-and-swap

    Parameters:

      - origin (BufSpec) –

      - compare (BufSpec) –

      - result (BufSpec) –

      - target_rank (int) –

      - target_disp (int) –

    Return type:

      None

  Complete()

    Completes an RMA operations begun after an `Win.Start()`

    Return type:

      None

  classmethod Create(memory, disp_unit=1, info=INFO_NULL, comm=COMM_SELF)

    Create an window object for one-sided communication

    Parameters:

      - memory (Union[Buffer, Bottom, None]) –

      - disp_unit (int) –

      - info (Info) –

      - comm (Intracomm) –

    Return type:

      Win

  classmethod Create_dynamic(info=INFO_NULL, comm=COMM_SELF)

    Create an window object for one-sided communication

    Parameters:

      - info (Info) –

      - comm (Intracomm) –

    Return type:

      Win

  classmethod Create_keyval(copy_fn=None, delete_fn=None, nopython=False)

    Create a new attribute key for windows

    Parameters:

      - copy_fn (Optional[Callable[[Win, int, Any], Any]]) –

      - delete_fn (Optional[Callable[[Win, int, Any], None]]) –

      - nopython (bool) –

    Return type:

      int

  Delete_attr(keyval)

    Delete attribute value associated with a key

    Parameters:

      keyval (int) –

    Return type:

      None

  Detach(memory)

    Detach a local memory region

    Parameters:

      memory (Buffer) –

    Return type:

      None

  Fence(assertion=0)

    Perform an MPI fence synchronization on a window

    Parameters:

      assertion (int) –

    Return type:

      None

  Fetch_and_op(origin, result, target_rank, target_disp=0, op=SUM)

    Perform one-sided read-modify-write

    Parameters:

      - origin (BufSpec) –

      - result (BufSpec) –

      - target_rank (int) –

      - target_disp (int) –

      - op (Op) –

    Return type:

      None

  Flush(rank)

    Complete all outstanding RMA operations at the given target

    Parameters:

      rank (int) –

    Return type:

      None

  Flush_all()

    Complete all outstanding RMA operations at all targets

    Return type:

      None

  Flush_local(rank)

    Complete locally all outstanding RMA operations at the given target

    Parameters:

      rank (int) –

    Return type:

      None

  Flush_local_all()

    Complete locally all outstanding RMA opera- tions at all targets

    Return type:

      None

  Free()

    Free a window

    Return type:

      None

  classmethod Free_keyval(keyval)

    Free an attribute key for windows

    Parameters:

      keyval (int) –

    Return type:

      int

  Get(origin, target_rank, target=None)

    Get data from a memory window on a remote process.

    Parameters:

      - origin (BufSpec) –

      - target_rank (int) –

      - target (Optional[TargetSpec]) –

    Return type:

      None

  Get_accumulate(origin, result, target_rank, target=None, op=SUM)

    Fetch-and-accumulate data into the target process

    Parameters:

      - origin (BufSpec) –

      - result (BufSpec) –

      - target_rank (int) –

      - target (Optional[TargetSpec]) –

      - op (Op) –

    Return type:

      None

  Get_attr(keyval)

    Retrieve attribute value by key

    Parameters:

      keyval (int) –

    Return type:

      Optional[Union[int, Any]]

  Get_errhandler()

    Get the error handler for a window

    Return type:

      Errhandler

  Get_group()

    Return a duplicate of the group of the communicator used to create the window

    Return type:

      Group

  Get_info()

    Return the hints for a windows that are currently in use

    Return type:

      Info

  Get_name()

    Get the print name associated with the window

    Return type:

      str

  Lock(rank, lock_type=LOCK_EXCLUSIVE, assertion=0)

    Begin an RMA access epoch at the target process

    Parameters:

      - rank (int) –

      - lock_type (int) –

      - assertion (int) –

    Return type:

      None

  Lock_all(assertion=0)

    Begin an RMA access epoch at all processes

    Parameters:

      assertion (int) –

    Return type:

      None

  Post(group, assertion=0)

    Start an RMA exposure epoch

    Parameters:

      - group (Group) –

      - assertion (int) –

    Return type:

      None

  Put(origin, target_rank, target=None)

    Put data into a memory window on a remote process.

    Parameters:

      - origin (BufSpec) –

      - target_rank (int) –

      - target (Optional[TargetSpec]) –

    Return type:

      None

  Raccumulate(origin, target_rank, target=None, op=SUM)

    Fetch-and-accumulate data into the target process

    Parameters:

      - origin (BufSpec) –

      - target_rank (int) –

      - target (Optional[TargetSpec]) –

      - op (Op) –

    Return type:

      Request

  Rget(origin, target_rank, target=None)

    Get data from a memory window on a remote process.

    Parameters:

      - origin (BufSpec) –

      - target_rank (int) –

      - target (Optional[TargetSpec]) –

    Return type:

      Request

  Rget_accumulate(origin, result, target_rank, target=None, op=SUM)

    Accumulate data into the target process using remote memory access.

    Parameters:

      - origin (BufSpec) –

      - result (BufSpec) –

      - target_rank (int) –

      - target (Optional[TargetSpec]) –

      - op (Op) –

    Return type:

      Request

  Rput(origin, target_rank, target=None)

    Put data into a memory window on a remote process.

    Parameters:

      - origin (BufSpec) –

      - target_rank (int) –

      - target (Optional[TargetSpec]) –

    Return type:

      Request

  Set_attr(keyval, attrval)

    Store attribute value associated with a key

    Parameters:

      - keyval (int) –

      - attrval (Any) –

    Return type:

      None

  Set_errhandler(errhandler)

    Set the error handler for a window

    Parameters:

      errhandler (Errhandler) –

    Return type:

      None

  Set_info(info)

    Set new values for the hints associated with a window

    Parameters:

      info (Info) –

    Return type:

      None

  Set_name(name)

    Set the print name associated with the window

    Parameters:

      name (str) –

    Return type:

      None

  Shared_query(rank)

    Query the process-local address for remote memory segments created with `Win.Allocate_shared()`

    Parameters:

      rank (int) –

    Return type:

      Tuple[memory, int]

  Start(group, assertion=0)

    Start an RMA access epoch for MPI

    Parameters:

      - group (Group) –

      - assertion (int) –

    Return type:

      None

  Sync()

    Synchronize public and private copies of the given window

    Return type:

      None

  Test()

    Test whether an RMA exposure epoch has completed

    Return type:

      bool

  Unlock(rank)

    Complete an RMA access epoch at the target process

    Parameters:

      rank (int) –

    Return type:

      None

  Unlock_all()

    Complete an RMA access epoch at all processes

    Return type:

      None

  Wait()

    Complete an RMA exposure epoch begun with `Win.Post()`

    Return type:

      Literal[True]

  classmethod f2py(arg)
    Parameters:

      arg (int) –

    Return type:

      Win

  py2f()
    Return type:

      int

  tomemory()

    Return window memory buffer

    Return type:

      memory

  Attributes Documentation

  attrs

    window attributes

  flavor

    window create flavor

  group

    window group

  info

    window info

  model

    window memory model

  name

    window name