Bamboost
bamboost/mpi/mock

bamboost.mpi.mock

Mock module for mpi4py.MPI to be used when MPI is not available or usage not desired. Not importing MPI increases launch speed significantly, which is important for CLI applications.

Attributes

  • SUM=lambda a, b: a + b
  • COMM_WORLD:Comm=Comm()

    Mock object for mpi4py.MPI.COMM_WORLD

  • COMM_SELF:Comm=bamboost.mpi.mock.COMM_WORLD

    Mock object for mpi4py.MPI.COMM_SELF

  • COMM_NULL:Comm=bamboost.mpi.mock.COMM_WORLD

    Mock object for mpi4py.MPI.COMM_NULL

Classes

Comm

Comm(self)
Attributes:
  • size=1
  • rank=0
  • comm=None
  • is_mpi=False
  • is_master=True
Comm.bcast(self, data, root=0)
Arguments:
  • data
  • root=0
Comm.scatter(self, data, root=0)
Arguments:
  • data
  • root=0
Comm.gather(self, data, root=0)
Arguments:
  • data
  • root=0
Comm.allgather(self, data)
Arguments:
  • data
Comm.allreduce(self, data, op)
Arguments:
  • data
  • op
Comm.reduce(self, data, op, root=0)
Arguments:
  • data
  • op
  • root=0
Comm.send(self, data, dest, tag=0)
Arguments:
  • data
  • dest
  • tag=0
Comm.recv(self, source, tag=0)
Arguments:
  • source
  • tag=0
Arguments:
  • tag=0
Comm.sendrecv(self, send_data, dest, tag=0)
Arguments:
  • send_data
  • dest
  • tag=0
Comm.sendrecv_replace(self, data, dest, tag=0)
Arguments:
  • data
  • dest
  • tag=0
Comm.get_error_string(self, errorcode)
Arguments:
  • errorcode
Comm.get_exception_string(self, errorcode)
Arguments:
  • errorcode
Comm.get_count(self, status, datatype)
Arguments:
  • status
  • datatype
Comm.get_status(self, request)
Arguments:
  • request
Comm.get_source(self, status)
Arguments:
  • status
Comm.get_tag(self, status)
Arguments:
  • status
Comm.get_elements(self, status)
Arguments:
  • status
Comm.get_bytes(self, status)
Arguments:
  • status
Comm.get_cancelled(self, status)
Arguments:
  • status