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

[pyenergyplus] EnergyPlus output not flushed to eplusout.err #8484

Closed
3 tasks
antoine-galataud opened this issue Jan 26, 2021 · 0 comments · Fixed by #8573
Closed
3 tasks

[pyenergyplus] EnergyPlus output not flushed to eplusout.err #8484

antoine-galataud opened this issue Jan 26, 2021 · 0 comments · Fixed by #8573
Assignees
Labels
Defect Includes code to repair a defect in EnergyPlus

Comments

@antoine-galataud
Copy link

antoine-galataud commented Jan 26, 2021

Issue overview

When error occurs early, eplusout.err doesn't get populated as it would be when called directly from command line.

Example:

import shlex

from pyenergyplus.api import EnergyPlusAPI

if __name__ == "__main__":
    api = EnergyPlusAPI()
    api.runtime.run_energyplus(
        api.state_manager.new_state(),
        shlex.split("-d /tmp/output -w weather.epw wrong_eplus_version.idf"))

After run, eplusout.err is present in /tmp/output but is empty.

Now if you run this from command line:

/usr/local/EnergyPlus-9-4-0/energyplus \
  -d /tmp/output2 \
  -w weather.epw \
  wrong_eplus_version.idf

You get expected output in eplusout.err:

Program Version,EnergyPlus, Version 9.4.0-998c4b761e, YMD=2021.01.25 16:55,
   ** Severe  ** <root>[LifeCycleCost:UsePriceEscalation][LifeCycleCost:UsePriceEscalation 2][resource] - "FuelOil#1" - Failed to match against any enum values.
   ** Warning ** Version: in IDF="9.2" not the same as expected="9.4"
   **  Fatal  ** Errors occurred on processing input file. Preceding condition(s) cause termination.
   ...

This seems to be a buffer flushing issue, since if simulation runs longer error file gets properly populated.

Details

  • Platform: Ubuntu 20.04 LTS
  • Version of EnergyPlus: v9.4.0

Checklist

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

  • Defect file added (list location of defect file here)
  • Ticket added to Pivotal for defect (development team task)
  • Pull request created (the pull request will have additional tasks related to reviewing changes that fix this defect)
@jmarrec jmarrec added the Defect Includes code to repair a defect in EnergyPlus label Feb 18, 2021
@Myoldmopar Myoldmopar self-assigned this Feb 22, 2021
jmarrec added a commit that referenced this issue Mar 1, 2021
jmarrec added a commit that referenced this issue Mar 1, 2021
jmarrec added a commit that referenced this issue Mar 1, 2021
jmarrec added a commit that referenced this issue Mar 1, 2021
Myoldmopar added a commit that referenced this issue Mar 1, 2021
Fix #8484 - Flush all files when Running via API before finish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Includes code to repair a defect in EnergyPlus
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants