Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate warnings for loose bundles #473

Merged
merged 4 commits into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/src/properbundles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions mpisppy/spbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion mpisppy/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading