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

spawn hangs if simulated past the RunPeriod in the idf file #1678

Closed
mwetter opened this issue Dec 12, 2019 · 4 comments
Closed

spawn hangs if simulated past the RunPeriod in the idf file #1678

mwetter opened this issue Dec 12, 2019 · 4 comments
Assignees
Labels
spawn Development for Spawn of EnergyPlus

Comments

@mwetter
Copy link
Member

mwetter commented Dec 12, 2019

Simulating OneZoneOneOutputVariable with

experiment(
      StopTime=1032000,
      ...

causes spawn to hang at 7 days, which is the end of the EnergyPlus run period in the idf file. However, EnergyPlus should ignore the RunPeriod and stop if when fmi2Terminate is called, see https://lbl-srg.github.io/soep/softwareArchitecture.html#time-synchronization

@mwetter mwetter added the spawn Development for Spawn of EnergyPlus label Dec 12, 2019
mwetter added a commit that referenced this issue Dec 12, 2019
@mwetter
Copy link
Member Author

mwetter commented Dec 12, 2019

The development branch issue1678_spawnIDFRunPeriodNotIgnored reproduces the behavior for Buildings/Experimental/EnergyPlus/Validation/OneZoneOneOutputVariable.mo

@kbenne : Please address this in the next build. Easiest is to verify with OpenModelica and look at the log file to see where it is stuck because JModelica and Dymola seems to buffer writing of the log file and you won't see the last output. Can you also avoid that EnergyPlus terminates, except when fmi2Terminate is called, because otherwise the simulation freezes and log files are not guaranteed to show when the last exchange happened which makes it very hard to debug.

kbenne added a commit to NREL/Spawn that referenced this issue Mar 17, 2020
Before this change if EnergyPlus came to the end of the run period,
threw an execption, or suffered a fatal error, then the control thread
would just hang due to a deadlock. This should address that issue. A
future change will make spawn/EnergyPlus ignore the run period
completely.

ref lbl-srg/modelica-buildings#1678
@kbenne
Copy link
Contributor

kbenne commented Mar 17, 2020

@mwetter I figured out how to reference issues across repositories. I'm hoping you are getting notifications about these changes I am making.

@mwetter
Copy link
Member Author

mwetter commented Mar 18, 2020

@kbenne I did not see notifications, other than what you wrote on this repo. Also, if you write things like "This should be fully addressed with NREL/Spawn@26fd4ac" is there a way to get notified when it is ready in a built for download? (Even if by manual email.)

@kbenne
Copy link
Contributor

kbenne commented Mar 25, 2020

I thought maybe my commit message would give you a notification as it did show up here since I tagged it with this issue number.

I'm using ref lbl-srg/modelica-buildings#1234 in my commit messages now to link to your issues in Modelica-buildings. I will and have used "close" instead of "ref" when I think the work is sufficient to close the issue. I don't think it would automatically close issues across repositories, but within a repository that syntax would automatically close the issue when the commit was merged into the main develop branch.

All of these commits are being built by CI now. I'll look into automatically linking the builds from the commit using a GitHub badge (we do this for EnergyPlus and OpenStudio). Separately, I have been manually triggering the CI to post to the drop location under "latest" at intervals we agree on, and I will do that again soon as I'm wrapping up a huge batch of work. I will include a curated log message for you so you can see that commits and changes that you are interested in.

kbenne added a commit to NREL/Spawn that referenced this issue Mar 25, 2020
This change means that it is *almost impossible to reach the end of the
simulation period. Instead, spawn client will need to explicitly stop
the simulation.

This change also removes any preexisting run periods, although a future
change might leave them and in turn create an api to select which
runperiod that fmu will simulate.

close lbl-srg/modelica-buildings#1678
@mwetter mwetter mentioned this issue May 12, 2020
2 tasks
@mwetter mwetter closed this as completed May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spawn Development for Spawn of EnergyPlus
Projects
None yet
Development

No branches or pull requests

2 participants