From b1288407bdcfc7eb027d4d3b4b616df2c0dedcb1 Mon Sep 17 00:00:00 2001 From: David L Woodruff Date: Fri, 20 Dec 2024 19:36:43 -0800 Subject: [PATCH 1/3] getting ready to deprecate loose bundles --- doc/src/properbundles.rst | 3 +++ mpisppy/spbase.py | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/doc/src/properbundles.rst b/doc/src/properbundles.rst index f5b3df5be..775b11eef 100644 --- a/doc/src/properbundles.rst +++ b/doc/src/properbundles.rst @@ -7,6 +7,9 @@ scenarios. We will refer to these as `loose bundles`. This bundling scheme is very flexible with respect to the numbers of scenarios in each bundle. There are various if-blocks in the mpisppy code to support this type of bundle. +.. Warning:: + In relase 1.0, loose bundles scheduled to be deprecated. + In 2024, `proper bundles` were supported. After the extensive form for a proper bundle is created, the original scenarios are more or less forgotten and all processing takes place for the bundle. At the time diff --git a/mpisppy/spbase.py b/mpisppy/spbase.py index 3516e83ea..7ce5b0f01 100644 --- a/mpisppy/spbase.py +++ b/mpisppy/spbase.py @@ -99,9 +99,15 @@ def __init__( raise RuntimeError("More ranks than scenarios") self._calculate_scenario_ranks() + # Put the deprecation message in the init so they should only see it once per rank if "bundles_per_rank" in self.options and self.options["bundles_per_rank"] > 0: self._assign_bundles() self.bundling = True + print("WARNING: The bundles-per-rank is now called `loose bundling' and\n" + "loose bundling will be deprecated in the next release\n. + "You should switch to the use of 'proper bundles'.\n" + " See the documentation and also misppy.generic_cylinders.py" + ) else: self.bundling = False self._create_scenarios(scenario_creator_kwargs) From c6d6410bc10618000407b37cba3153a29750f3ff Mon Sep 17 00:00:00 2001 From: David L Woodruff Date: Fri, 20 Dec 2024 19:45:45 -0800 Subject: [PATCH 2/3] give deprecation warning in config help text --- mpisppy/utils/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpisppy/utils/config.py b/mpisppy/utils/config.py index 3e1fa291d..f68bde8f8 100644 --- a/mpisppy/utils/config.py +++ b/mpisppy/utils/config.py @@ -195,7 +195,7 @@ def popular_args(self): default=None) self.add_to_config("bundles_per_rank", - description="Loose bundles per rank (default 0 (no bundles))", + description="Loose bundles per rank (default 0 (no bundles)) WILL BE DEPRECATED", domain=int, default=0) From 1728ce3bff987933936768a3adfac0d9e09a3b2c Mon Sep 17 00:00:00 2001 From: David L Woodruff Date: Fri, 20 Dec 2024 19:49:06 -0800 Subject: [PATCH 3/3] forgot a closing quote --- mpisppy/spbase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpisppy/spbase.py b/mpisppy/spbase.py index 7ce5b0f01..c801addba 100644 --- a/mpisppy/spbase.py +++ b/mpisppy/spbase.py @@ -104,7 +104,7 @@ def __init__( self._assign_bundles() self.bundling = True print("WARNING: The bundles-per-rank is now called `loose bundling' and\n" - "loose bundling will be deprecated in the next release\n. + "loose bundling will be deprecated in the next release\n." "You should switch to the use of 'proper bundles'.\n" " See the documentation and also misppy.generic_cylinders.py" )