Skip to content

caching_comm

T = TypeVar('T') module-attribute

CachingRequestWriter

Bases: Request

__init__(req, buffer, buffer_list)

wait()

CachingRequestReader

Bases: Request

__init__(recvbuf, data)

wait()

NullRequest

Bases: Request

wait()

CachingCommData dataclass

Data required to restore a CachingCommReader.

Usually you will not want to initialize this class directly, but instead use the CachingCommReader.load method.

rank instance-attribute

size instance-attribute

bcast_objects = dataclasses.field(default_factory=list) class-attribute instance-attribute

received_buffers = dataclasses.field(default_factory=list) class-attribute instance-attribute

generic_obj_buffers = dataclasses.field(default_factory=list) class-attribute instance-attribute

split_data = dataclasses.field(default_factory=list) class-attribute instance-attribute

__init__(rank, size, bcast_objects=list(), received_buffers=list(), generic_obj_buffers=list(), split_data=list())

get_bcast()

get_buffer()

get_generic_obj()

get_split()

dump(file)

load(file) classmethod

CachingCommReader

Bases: Comm[T]

mpi4py Comm-like object which replays stored communications.

__init__(data)

Initialize a CachingCommReader.

Usually you will not want to initialize this class directly, but instead use the CachingCommReader.load method.

Parameters:

Name Type Description Default
data CachingCommData

contains all data needed for mocked communication

required

Get_rank()

Get_size()

bcast(value, root=0)

barrier()

Barrier()

Scatter(sendbuf, recvbuf, root=0, **kwargs)

Gather(sendbuf, recvbuf, root=0, **kwargs)

allgather(sendobj)

Send(sendbuf, dest, tag=0, **kwargs)

Isend(sendbuf, dest, tag=0, **kwargs)

Recv(recvbuf, source, tag=0, **kwargs)

Irecv(recvbuf, source, tag=0, **kwargs)

sendrecv(sendbuf, dest, **kwargs)

Split(color, key)

allreduce(sendobj, op=ReductionOperator.NO_OP)

Allreduce(sendobj, recvobj, op)

Allreduce_inplace(obj, op)

load(file) classmethod

CachingCommWriter

Bases: Comm[T]

Wrapper around a mpi4py Comm object which can be serialized and then loaded as a CachingCommReader.

__init__(comm)

Parameters:

Name Type Description Default
comm Comm[T]

underlying mpi4py comm-like object

required

Get_rank()

Get_size()

bcast(value, root=0)

barrier()

Barrier()

Scatter(sendbuf, recvbuf, root=0, **kwargs)

Gather(sendbuf, recvbuf, root=0, **kwargs)

allgather(sendobj)

Send(sendbuf, dest, tag=0, **kwargs)

Isend(sendbuf, dest, tag=0, **kwargs)

Recv(recvbuf, source, tag=0, **kwargs)

Irecv(recvbuf, source, tag=0, **kwargs)

sendrecv(sendbuf, dest, **kwargs)

Split(color, key)

dump(file)

allreduce(sendobj, op=ReductionOperator.NO_OP)

Allreduce(sendobj, recvobj, op)

Allreduce_inplace(obj, op)