-
Notifications
You must be signed in to change notification settings - Fork 45
Autogapper #518
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
Autogapper #518
Changes from 6 commits
a26e38b
45a35b8
b3cb027
81128c3
8dde00d
338beca
663a953
4969232
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -11,6 +11,7 @@ | |||
| extension. | ||||
| """ | ||||
|
|
||||
| from mpisppy import global_toc | ||||
| import mpisppy.extensions.extension | ||||
|
|
||||
| class Gapper(mpisppy.extensions.extension.Extension): | ||||
|
|
@@ -19,36 +20,68 @@ def __init__(self, ph): | |||
| self.ph = ph | ||||
| self.cylinder_rank = self.ph.cylinder_rank | ||||
| self.gapperoptions = self.ph.options["gapperoptions"] # required | ||||
| self.mipgapdict = self.gapperoptions["mipgapdict"] | ||||
| self.mipgapdict = self.gapperoptions.get("mipgapdict", None) | ||||
| self.starting_mipgap = self.gapperoptions.get("starting_mipgap", None) | ||||
| self.mipgap_ratio = self.gapperoptions.get("mipgap_ratio", None) | ||||
| self.verbose = self.ph.options["verbose"] \ | ||||
| or self.gapperoptions["verbose"] | ||||
|
|
||||
| def _vb(self, str): | ||||
| if self.verbose and self.cylinder_rank == 0: | ||||
| print ("(rank0) mipgapper:" + str) | ||||
| or self.gapperoptions.get("verbose", True) | ||||
| self.verbose = True | ||||
|
||||
| self.verbose = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to eliminate the verbose flag for the extension and unconditionally print the gap change
Uh oh!
There was an error while loading. Please reload this page.