diff --git a/mpisppy/cylinders/cross_scen_spoke.py b/mpisppy/cylinders/cross_scen_spoke.py index fe9ad0c2..462bca57 100644 --- a/mpisppy/cylinders/cross_scen_spoke.py +++ b/mpisppy/cylinders/cross_scen_spoke.py @@ -6,6 +6,10 @@ # All rights reserved. Please see the files COPYRIGHT.md and LICENSE.md for # full copyright and license information. ############################################################################### + +# TODO Remove after this program no longer support Python 3.8 +from __future__ import annotations + from mpisppy.cylinders.spcommunicator import communicator_array from pyomo.repn.standard_repn import generate_standard_repn from mpisppy import MPI diff --git a/mpisppy/cylinders/hub.py b/mpisppy/cylinders/hub.py index cb81751b..135a1d6a 100644 --- a/mpisppy/cylinders/hub.py +++ b/mpisppy/cylinders/hub.py @@ -6,6 +6,10 @@ # All rights reserved. Please see the files COPYRIGHT.md and LICENSE.md for # full copyright and license information. ############################################################################### + +# TODO Remove after this program no longer support Python 3.8 +from __future__ import annotations + import numpy as np import abc import logging @@ -740,10 +744,7 @@ def send_nonants(self): nonant_send_buffer[ci] = nonant_to_root_var_map[xvar]._value ci += 1 logging.debug("hub is sending X nonants={}".format(nonant_send_buffer)) - self._populate_boundsout_cache(nonant_send_buffer) - # for idx in self.nonant_spoke_indices: - # self.hub_to_spoke(nonant_send_buffer, idx) my_nonants = self._sends[Field.NONANT] self.hub_to_spoke(nonant_send_buffer, Field.NONANT, my_nonants.next_write_id()) diff --git a/mpisppy/cylinders/lshaped_bounder.py b/mpisppy/cylinders/lshaped_bounder.py index b4bc9c40..550ea522 100644 --- a/mpisppy/cylinders/lshaped_bounder.py +++ b/mpisppy/cylinders/lshaped_bounder.py @@ -62,7 +62,7 @@ def main(self): while not self.got_kill_signal(): if self.new_nonants: - + self.opt._put_nonant_cache(self.localnonants) self.opt._restore_nonants() obj = self.opt.calculate_incumbent(fix_nonants=True) diff --git a/mpisppy/cylinders/spcommunicator.py b/mpisppy/cylinders/spcommunicator.py index 0681add2..ec175dd7 100644 --- a/mpisppy/cylinders/spcommunicator.py +++ b/mpisppy/cylinders/spcommunicator.py @@ -18,13 +18,16 @@ Separate hub and spoke classes for memory/window management? """ + +# TODO Remove after this program no longer support Python 3.8 +from __future__ import annotations + import numpy as np import abc import time from mpisppy.cylinders.spwindow import Field, SPWindow - def communicator_array(size): arr = np.empty(size+1) arr[:] = np.nan diff --git a/mpisppy/cylinders/spoke.py b/mpisppy/cylinders/spoke.py index 6931e482..f7763d4a 100644 --- a/mpisppy/cylinders/spoke.py +++ b/mpisppy/cylinders/spoke.py @@ -6,6 +6,10 @@ # All rights reserved. Please see the files COPYRIGHT.md and LICENSE.md for # full copyright and license information. ############################################################################### + +# TODO Remove after this program no longer support Python 3.8 +from __future__ import annotations + import numpy as np import abc import enum diff --git a/mpisppy/cylinders/spwindow.py b/mpisppy/cylinders/spwindow.py index 46d7b0b5..e0114b9f 100644 --- a/mpisppy/cylinders/spwindow.py +++ b/mpisppy/cylinders/spwindow.py @@ -70,8 +70,6 @@ def __init__(self, my_fields: dict, strata_comm: MPI.Comm, field_order=None): self.buff[offset + length - 1] = 0.0 ## End for - # print(self.buff) - self.strata_buffer_layouts = strata_comm.allgather(self.buffer_layout) self.window_constructed = True