From 84083a089bce8c3a64dbafc6e986bad65b059850 Mon Sep 17 00:00:00 2001 From: nchristensen <11543181+nchristensen@users.noreply.github.com> Date: Thu, 28 Oct 2021 04:03:54 +0000 Subject: [PATCH] Call super().__init__() in PoolScheduler __init__ Subclasses of `PoolScheduler` can't work with the Pool because a missing attribute `__local_free_head` causes `__addLocal__` to raise an AttributeError. Calling `super().__init__()` in the `PoolScheduler` `__init__` method seems to fix this since the `Chare` class sets this attribute in its `__init__()`. --- charm4py/pool.py | 1 + 1 file changed, 1 insertion(+) diff --git a/charm4py/pool.py b/charm4py/pool.py index 91c9a1db..adbe57e1 100644 --- a/charm4py/pool.py +++ b/charm4py/pool.py @@ -89,6 +89,7 @@ def taskDone(self): class PoolScheduler(Chare): def __init__(self): + super().__init__() self.workers = None self.idle_workers = set(range(1, charm.numPes())) self.num_workers = len(self.idle_workers)