-
Notifications
You must be signed in to change notification settings - Fork 10
Fix bug in expMSSA control flags
#154
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
Conversation
…rflow while computing basis elements with large harmonic orders
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.
Pull Request Overview
This pull request fixes a bug in the expMSSA class where totVar and totPow were incorrectly declared as boolean types but used as double values for norm computations. The fix separates the control flags from the computed values and improves cache file handling.
- Converts
totVarandtotPowfrom boolean to double types for norm calculations - Introduces new boolean flags
varFlagandpowFlagto control the normalization behavior - Adds cache file support for the new flags and improves HDF5 attribute handling
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| include/SLGridMP2.H | Adds static member variables for grid construction heuristics |
| exputil/SLGridMP2.cc | Implements adaptive grid boundaries and enhanced diagnostic output |
| expui/expMSSA.cc | Fixes boolean/double type confusion and adds flag handling |
| expui/expMSSA.H | Updates class definition with separate flag and value variables |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
michael-petersen
left a comment
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.
I can confirm this is all behaving as expected; still surprised the compiler didn't catch this, but seems that we are good now.
The issue
The
expMSSAheader definestotVarandtotPowas boolean but uses them as doubles to compute the norm. Not sure how this is legal code? But that's how it appears.The fix
totVarandtotPowdoubles.varFlagandpowFlagas boolean class data set by thetotVarandtotPowYAM configuration flagNotes
While this is formally a big, I think, I'm basing the PR on
devel, anticipating an upcoming merge tomain