Skip to content

Conversation

@jmarrec
Copy link
Contributor

@jmarrec jmarrec commented May 16, 2025

Pull request overview

@amirroth

Pull Request Author

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies

Reviewer

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

@jmarrec jmarrec added DoNotPublish Includes changes that shouldn't be reported in the changelog Developer Issue Related to cmake, packaging, installers, or developer tooling (CI, etc) labels May 16, 2025
Comment on lines 435 to 447
state->dataEconTariff->tariff(3).kindMtr = EconomicTariff::MeterType::Other;
state->dataEconTariff->tariff(3).reportMeterIndx = GetMeterIndex(*state, "DISTRICTCOOLING:FACILITY");

state->dataEconTariff->tariff(4).tariffName = "DistrictHeatingUnit";
state->dataEconTariff->tariff(4).isSelected = true;
state->dataEconTariff->tariff(4).totalAnnualCost = 15.98;
state->dataEconTariff->tariff(4).totalAnnualEnergy = 1.47;
state->dataEconTariff->tariff(3).kindMtr = EconomicTariff::MeterType::Other;
state->dataEconTariff->tariff(4).reportMeterIndx = GetMeterIndex(*state, "DISTRICTHEATINGWATER:FACILITY");

for (auto &tariff : state->dataEconTariff->tariff) {
tariff.demandWindow = EconomicTariff::DemandWindow::Hour;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick fix test

Comment on lines +3983 to +3985
format("{}{}",
convDemandStrings[(int)distCoolUnits],
(distCoolDemWindowUnits == DemandWindow::Invalid) ? "" : demandWindowStrings[(int)distCoolDemWindowUnits]));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: also protect here, like we do for gas?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah why not.

@amirroth
Copy link
Collaborator

I tried committing and pushing to this branch and I can see the commit in the changes, but I cannot push and get CI going?

@amirroth amirroth requested a review from mjwitte May 19, 2025 21:15
@amirroth amirroth assigned mjwitte and unassigned amirroth May 19, 2025
Comment on lines +3983 to +3985
format("{}{}",
convDemandStrings[(int)distCoolUnits],
(distCoolDemWindowUnits == DemandWindow::Invalid) ? "" : demandWindowStrings[(int)distCoolDemWindowUnits]));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah why not.


for (auto &tariff : state->dataEconTariff->tariff) {
tariff.demandWindow = EconomicTariff::DemandWindow::Hour;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, it's fine.

@Myoldmopar
Copy link
Member

I tried committing and pushing to this branch and I can see the commit in the changes, but I cannot push and get CI going?

@amirroth were you still wanting something additional here?

@amirroth
Copy link
Collaborator

I am not. There was one typo in the unit test, but this is otherwise clean. Meta-question, Why were these issues not caught by CI on the EnumPass PR?

@Myoldmopar
Copy link
Member

Because our Decent runs that do unit test and integration test coverage are set to RelWithDebInfo, which mutes the array bounds checking in favor of running in a more reasonable time. I think we'll be able to re-enable that while still getting some optimizations, so they will be caught in the future.

@jmarrec
Copy link
Contributor Author

jmarrec commented May 20, 2025

Because our Decent runs that do unit test and integration test coverage are set to RelWithDebInfo, which mutes the array bounds checking in favor of running in a more reasonable time. I think we'll be able to re-enable that while still getting some optimizations, so they will be caught in the future.

See convo here: #11040 (comment)

@Myoldmopar
Copy link
Member

I'll add -DFORCE_DEBUG_ARITHM_GCC_OR_CLANG:BOOL=ON to our Decent CI build command so that we can catch some stuff in our unit/integration coverage builds.

@Myoldmopar
Copy link
Member

I added that in a local build and found it doubled the runtime of the tests, but worse off, it caused lots of tests to fail. I'll need to look into it separately. In the meantime, this can merge. Thatnks @jmarrec and @amirroth

@Myoldmopar Myoldmopar merged commit d4afc61 into develop May 20, 2025
6 checks passed
@Myoldmopar Myoldmopar deleted the 11040_followup branch May 20, 2025 15:43
@amirroth
Copy link
Collaborator

When did we change to RelWithDebInfo? I am worried that a lot of these errors are caused by recent PRs of mine that missed these potential issues because the errors weren’t flagged by CI. 😔

@jmarrec
Copy link
Contributor Author

jmarrec commented May 20, 2025

You or others alike, but that's probably it. We fixed all these errors are one point, so if they creeped in it's code changes or new tests added after relwithdebinfo was picked.

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

Labels

Developer Issue Related to cmake, packaging, installers, or developer tooling (CI, etc) DoNotPublish Includes changes that shouldn't be reported in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants