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

Error messages "already initialized constant" when running OSW workflow #5081

Open
macumber opened this issue Jan 22, 2024 · 3 comments
Open
Labels
component - logs and warnings severity - Normal Bug Triage Issue needs to be assessed and labeled, further information on reported might be needed

Comments

@macumber
Copy link
Contributor

Issue overview

When running a workflow with the TBD measure (https://github.com/rd2/tbd/releases/tag/v3.4.0) there are a bunch of error messages about "warning: already initialized constant" that occur when adding output reports. I think this might be because the runner re-loads the measure a second time so any constants are redefined. However, this second load is not something the measure writer can really control.

Current Behavior

The "warning: already initialized constant" messages might be confusing to users

Expected Behavior

There should be no "warning: already initialized constant" error messages.

Steps to Reproduce

  1. Create workflow with TBD measure (https://github.com/rd2/tbd/releases/tag/v3.4.0)
  2. Run workflow with openstudio.exe --verbose run --show-stdout -w workflow.osw
  3. Notice that "warning: already initialized constant" warnings occur after "Beginning to collect output requests from Reporting measures."

Possible Solution

Maybe it is possible to clear constants between running measures? Might be possible to list constants/globals before and after each measure run and clear those after each run?

Details

Environment

Some additional details about your environment for this issue (if relevant):

  • Platform (Operating system, version): Windows 11
  • Version of OpenStudio (if using an intermediate build, include SHA): 3.7.0

Context

Confusing to users, potentially makes users think there are issues with the measure

@macumber macumber added the Triage Issue needs to be assessed and labeled, further information on reported might be needed label Jan 22, 2024
@macumber
Copy link
Contributor Author

@brgix FYI

@brgix
Copy link

brgix commented Jan 22, 2024

EDIT: @macumber, these messages do pop up when running either the OSM or prototype test suites. Sorry for the confusion.

@DavidGoldwasser
Copy link
Collaborator

@shorowit and @joseph-robertson I think you may use global constants across measures? Just wanted to tag you on this so any changes made for this don't negativity impact those workflows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component - logs and warnings severity - Normal Bug Triage Issue needs to be assessed and labeled, further information on reported might be needed
Projects
None yet
Development

No branches or pull requests

3 participants