SendRecieveParallelizer

Parallelizer that implements scatter, gather, broadcast, and map based on just having a communicator that supports send and `receive methods

ReceivedError: ReceivedError
SendReceieveCommunicator: SendReceieveCommunicator

 

@property
comm(self): 

Returns the communicator used by the paralellizer

  • :returns: SendRecieveParallelizer.SendReceieveCommunicator

 

send(self, data, loc, **kwargs): 

Sends data to the process specified by loc

  • data: Any
  • kwargs: Any
  • :returns: _

 

receive(self, data, loc, **kwargs): 

Receives data from the process specified by loc

  • data: Any
  • kwargs: Any
  • :returns: _

 

broadcast(self, data, **kwargs): 

Sends the same data to all processes

  • data: Any
  • kwargs: Any
  • :returns: _

 

scatter(self, data, **kwargs): 

Performs a scatter of data to the different available parallelizer processes. NOTE: unlike in the MPI case, data does not need to be evenly divisible by the number of available processes

  • data: Any
  • kwargs: Any
  • :returns: _

 

gather(self, data, **kwargs): 

Performs a gather of data from the different available parallelizer processes

  • data: Any
  • kwargs: Any
  • :returns: _

 

map(self, func, data, extra_args=None, extra_kwargs=None, **kwargs): 

Performs a parallel map of function over the held data on different processes

  • function: Any
  • data: Any
  • kwargs: Any
  • :returns: _

 

starmap(self, func, data, extra_args=None, extra_kwargs=None, **kwargs): 

Performs a parallel map with unpacking of function over the held data on different processes

  • function: Any
  • data: Any
  • kwargs: Any
  • :returns: _

 

wait(self): 

Causes all processes to wait until they’ve met up at this point.

  • :returns: _

Feedback

Examples

Templates

Documentation