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

Freeze Configuration to Avoid Timing Errors for Configurations #1268

Open
michael-schwarz opened this issue Nov 22, 2023 · 3 comments
Open

Comments

@michael-schwarz
Copy link
Member

michael-schwarz commented Nov 22, 2023

To prevent issues where the autotuner is run too late etc (c.f. #1265), we should devide the modification of the config into two phase: Config building and analysis:

  • Functions during building (get_build, set_build: The implementer needs to ensure correct order)
  • freeze
  • Functions during analysis (get_analysis)

If a call happens in the wrong phase, the analyzer should crash, making it easier to hunt-down such issues instead of having to deal with cases where settings seemingly are not applied.

@sim642
Copy link
Member

sim642 commented Nov 22, 2023

This duplicates #944, which already introduced such mechanism. Unless that has been broken since.

@michael-schwarz
Copy link
Member Author

It seems #944 does not cover all usecases (it is only concerned with not changing things while the solver runs).
One can already get values before freezing and use them for the analysis. An example of this are the privatization modules which are constructed before the autotuner runs.
The stricter mechanism proposed here should prevent this type of bug, by separating looking up options to potentially change other options from lookups that will be used during analysis.

@sim642
Copy link
Member

sim642 commented Nov 22, 2023

The freezing point would just have to be moved earlier then. Maybe immediately before AfterConfig runs because those callbacks are supposed to run after configuration has been loaded and should be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants