Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add new performance precision tradeoffs modes, functionality, and reports, TeX document updates #8121

Merged
merged 88 commits into from
Jul 28, 2020

Conversation

jcyuan2020
Copy link
Contributor

@jcyuan2020 jcyuan2020 commented Jun 29, 2020

Added New PerformancePrecisionTradeoffs modes and expanded functionality for the PerformancePrecisionTradeoffs module:

  • Added two new PerformancePrecisionTradeoffs modes;
  • Expand functionality (include one more manually override variable) for the Advanced mode;
  • Added two new _perflog.csv output variables;
  • Updated the PerformancePrecisionTradeoffs modes in the Input-Output reference TeX document;
  • Fixed some typesetting problems in the original TeX document.

Pull Request Author

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • 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

This will not be exhaustively relevant to every PR.

  • 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

jcyuan2020 added 30 commits June 8, 2020 10:20
…sed temporary mode names to keep other parts intact. Compiles ok.
…allowed temperature differences. Compiles ok.
…d update the iniput file definition fields (4.1). Compiles ok.
…dvanced mode and also for easier code reading. Compiles ok.
…les ok. Tested ok and the new field shows up as expected in idfeditor.
… otherwise solution will not converge. Compiles ok.
… too large otherwise solution will not converge. Compiles ok.
…be too large otherwise solution will not converge. Compiles ok.
…be too large otherwise solution will not converge. Compiles ok.
…be too large otherwise solution will not converge. Compiles ok.
…be too large otherwise solution will not converge. Compiles ok.
…mode setup requirement. Results shuld be the same though. Compiles ok.
…pace for the PerformancePrecisionTradeoffs object. Compiles ok.
…nflict resolved. Need to compile again to see if it works ok."
…his version seems to be needed to be committed again. Need to compile again to see if it works.
@@ -6554,6 +6557,8 @@ namespace HeatBalanceSurfaceManager {
}
} // ...end of loop to check for convergence

MaxAllowedDelTemp = DataConvergParams::MaxAllowedDelTempOverrideValue;
Copy link
Contributor

Choose a reason for hiding this comment

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

@jcyuan2020 Let's not reset this every time CalcHeatBalanceInsideSurf2 is called. In my other branch, I'm going to move MaxAllowedDelTemp up into DataConvergParams so performance override can act on it directly. This will create a conflict depending on which PR merges first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mjwitte Thank you for the comments! We should definitely synchronize on this. I had originally considered a couple of options to make the variable MaxAllowedDelTemp global. One is to move it up to EnergyPlus::DataConvergParams as you indicated. Anyway, this called for a need to #include <EnergyPlus/DataConvergParams.hh> in HeatBalanceSurfaceManager.cc (as the current addition did in Line 130 in HeatBalanceSurfaceManager):

#include <EnergyPlus/DataConvergParams.hh>

The other neater way is to move MaxAllowedDelTemp into EnergyPlus::DataHeatBalance. This way could be much neater because: 1) it does not need the extra #include <EnergyPlus/DataConvergParams.hh> to be aded into HeatBalanceSurfaceManager.cc; 2) also, the EnergyPlus/DataHeatBalance.hh header file is already included in present SimulationManager.cc, so the Override mode can operate on this variable directly in SimulationManager.cc if MaxAllowedDelTem is in the DataHeatBalance namespace; 3) further, by putting MaxAllowedDelTemp into EnergyPlus::DataHeatBalance, it is actually then dealt by the same way as the MaxAllowedDelTempCondFD variable, which was already in DataHeatBalance prior to any changes (See the following code in Line 6562-6565 in HeatBalanceSurfaceManager.cc):

if (!DataHeatBalance::AnyCondFD) {
                if (MaxDelTemp <= MaxAllowedDelTemp) Converged = true;
            } else {
                if (MaxDelTemp <= MaxAllowedDelTempCondFD) Converged = true;

What do you think? If you think the latter way can also work in your branch, we can synchronize this part by trying this option out as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, I'll put it in DataHeatBalance.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mjwitte The latter method discussed above is now implemented and committed. New commits were pushed, with old test unit fixed as well.

…flog structure brought by output variable columns added. Compiles ok. Tested ok.
…m data convergence parameter namespace global to data heat balance namespace global. Compiles ok.
…s OutputChanges9-3-0-to-9-4-0.md to accommodate the additions and changes in the PerformancePrecisionTradeoffs input objects and _perflog.csv output files reporting items.
… in .eio reporting items update. Minor changes on the _perflog.cvs chagne description as well.
…0-07-01. Conflict in Rules9-3-0-to-9-4-0.md resolved. Taken revised contents from both.
…offs, resolved multiple conflicts. Need one further one-line revision to make both version work together.
… conflicts solved and now the code is revised to be ok for both version of changes.
@jcyuan2020
Copy link
Contributor Author

The few failed tests above are related to the .eio change in the PerformancePrecisionTradeoffs section brought by this pull request. They have nothing with code errors and a new format adoption should be able solve the problem.

Here is the related section in the eio.diff:

-! <Performance Precision Tradeoffs>, Use Coil Direct Simulation, Zone Radiant Exchange Algorithm, Override Mode, Number of Timestep In Hour, Force Euler Method, Minimum Number of Warmup Days, Force Suppress All Begin Environment Resets, MaxZoneTempDiff
- Performance Precision Tradeoffs, No, ScriptF, Normal, 6, No, 1, No, 0.300
+! <Performance Precision Tradeoffs>, Use Coil Direct Simulation, Zone Radiant Exchange Algorithm, Override Mode, Number of Timestep In Hour, Force Euler Method, Minimum Number of Warmup Days, Force Suppress All Begin Environment Resets, Minimum System Timestep, MaxZoneTempDiff, MaxAllowedDelTemp
+ Performance Precision Tradeoffs, No, ScriptF, Normal, 6, No, 1, No, 1.0, 0.300, 2.0000E-003

@JasonGlazer
Copy link
Contributor

@jcyuan2020 is this ready for final review and merging?

@jcyuan2020
Copy link
Contributor Author

@jcyuan2020 is this ready for final review and merging?

@JasonGlazer Yes, it is.

@mjwitte mjwitte added NewFeature Includes code to add a new feature to EnergyPlus IDDChange Code changes impact the IDD file (cannot be merged after IO freeze) labels Jul 7, 2020
@JasonGlazer
Copy link
Contributor

Everything looks ready to merge but I still have to update the Transition program because the field value meanings have changed.

@JasonGlazer JasonGlazer merged commit e884660 into NREL:develop Jul 28, 2020
@JasonGlazer
Copy link
Contributor

@jcyuan2020 I just merged the additional PerformancePrecision modes pull request into EnergyPlus. Thanks for your work.

@jcyuan2020
Copy link
Contributor Author

@JasonGlazer Thank you!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
IDDChange Code changes impact the IDD file (cannot be merged after IO freeze) NewFeature Includes code to add a new feature to EnergyPlus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants