Skip to content

Commit

Permalink
fix args
Browse files Browse the repository at this point in the history
  • Loading branch information
JBlaschke committed Oct 8, 2021
1 parent ab600d8 commit 0d8346c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions mpi_channels/remote_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ class RemoteChannel(object):

def __init__(self,
n_buf, n_mes, dtype=np.float64, host=0,
s_threashold=4, t_wait=0, r_rwait=1):
s_threashold=128, t_wait=0, r_wait=1):
"""
RemoteChannel(n_buf, n_mes, dtype=np.float64, host=0,
s_threashold=4, t_wait=0, r_rwait=1)
s_threashold=128, t_wait=0, r_rwait=1)
Create a RemoteChannel containing at most `n_buf` messages (with
maximum message size `n_mes`). Messages are arrays of type `dtype`. The
Expand All @@ -34,6 +34,10 @@ def __init__(self,
we choose a size of 1. Future objects resulting from calls to `putf`
are stored in `put_futures`, and Future instances resulting from calles
to `takef` are stored in `take_futures`.
To avoid flooding the MPI RMP lock, we schedule random delays every
`s_threashold` many fialed peeks. The delays have a min `t_wait` with a
random weight of `r_wait`.
"""
self.comm = MPI.COMM_WORLD
self.rank = self.comm.Get_rank()
Expand All @@ -46,7 +50,9 @@ def __init__(self,
self.put_futures = list()
self.take_futures = list()

self.schedule = Schedule(threshold=128)
self.schedule = Schedule(
threshold=s_threashold, t_wait=t_wait, r_wait=r_wait
)


def put(self, src):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setuptools.setup(
name="mpi-channels",
version="0.1.2",
version="0.1.4",
author="Johannes Blaschke",
author_email="[email protected]",
description="A RemoteChannel implementation built on top of MPI RMA",
Expand Down

0 comments on commit 0d8346c

Please sign in to comment.