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

Simulation crashes in SizeBaseboard because SetUpZoneSizingArrays was never called #10677

Closed
1 of 3 tasks
jmarrec opened this issue Aug 21, 2024 · 1 comment · Fixed by #10721
Closed
1 of 3 tasks

Simulation crashes in SizeBaseboard because SetUpZoneSizingArrays was never called #10677

jmarrec opened this issue Aug 21, 2024 · 1 comment · Fixed by #10721
Assignees
Labels
Defect Includes code to repair a defect in EnergyPlus

Comments

@jmarrec
Copy link
Contributor

jmarrec commented Aug 21, 2024

Issue overview

After getting the defect file from #10665 which does run in 24.1, I transitionned it to 24.2 (no real change in the idf format for that matter), but now it crashes due to an array being accessed while not allocated.

lldb $ep_build/Products/energyplus -- -w G3400350.epw -d out-ori in.idf
Process 2278848 exited with status = 9 (0x00000009) killed
Process 2279619 launched: '/home/julien/Software/Others/EnergyPlus-build/Products/energyplus' (x86_64)
EnergyPlus Starting
EnergyPlus, Version 24.2.0-f274ccbcef, YMD=2024.08.21 15:20
Adjusting Air System Sizing
Adjusting Standard 62.1 Ventilation Sizing
Initializing Simulation
terminate called after throwing an instance of 'std::out_of_range'
  what():  vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
Process 2279619 stopped
* thread #1, name = 'energyplus', stop reason = signal SIGABRT
    frame #0: 0x00007fffe63f800b libc.so.6`__GI_raise(sig=<unavailable>) at raise.c:51:1
(lldb) bt
* thread #1, name = 'energyplus', stop reason = signal SIGABRT
  * frame #0: 0x00007fffe63f800b libc.so.6`__GI_raise(sig=<unavailable>) at raise.c:51:1
    frame #1: 0x00007fffe63d7859 libc.so.6`__GI_abort at abort.c:79:7
    frame #2: 0x00007fffe6693ee6 libstdc++.so.6`___lldb_unnamed_symbol7360 + 96
    frame #3: 0x00007fffe66a5f8c libstdc++.so.6`___lldb_unnamed_symbol7814 + 12
    frame #4: 0x00007fffe66a5ff7 libstdc++.so.6`std::terminate() + 23
    frame #5: 0x00007fffe66a6258 libstdc++.so.6`__cxa_throw + 72
    frame #6: 0x00007fffe66972a7 libstdc++.so.6`___lldb_unnamed_symbol7525 + 40
    frame #7: 0x00007fffece6cff6 libenergyplusapi.so.24.2.0`std::__cxx1998::vector<EnergyPlus::DataSizing::ZoneSizingData, std::allocator<EnergyPlus::DataSizing::ZoneSizingData>>::_M_range_check(this=0x0000555556e89e18 size=0, __n=0) const at stl_vector.h:1073:28
    frame #8: 0x00007fffece6c0bc libenergyplusapi.so.24.2.0`std::__cxx1998::vector<EnergyPlus::DataSizing::ZoneSizingData, std::allocator<EnergyPlus::DataSizing::ZoneSizingData>>::at(this=0x0000555556e89e18 size=0, __n=0) at stl_vector.h:1094:16
    frame #9: 0x00007fffece6ac0a libenergyplusapi.so.24.2.0`EnergyPlus::EPVector<EnergyPlus::DataSizing::ZoneSizingData>::operator[](this=0x0000555556e89e00, n=0) at EPVector.hh:79:34
    frame #10: 0x00007fffece695a8 libenergyplusapi.so.24.2.0`EnergyPlus::EPVector<EnergyPlus::DataSizing::ZoneSizingData>::operator()(this=0x0000555556e89e00, n=1) at EPVector.hh:90:23
    frame #11: 0x00007fffedcf46f2 libenergyplusapi.so.24.2.0`EnergyPlus::BaseboardRadiator::BaseboardParams::SizeBaseboard(this=0x0000555555f60910, state=0x00007fffffffab30, baseboardNum=1) at BaseboardRadiator.cc:627:107
    frame #12: 0x00007fffedcf39ac libenergyplusapi.so.24.2.0`EnergyPlus::BaseboardRadiator::BaseboardParams::InitBaseboard(this=0x0000555555f60910, state=0x00007fffffffab30, baseboardNum=1) at BaseboardRadiator.cc:536:32
    frame #13: 0x00007fffedcee6a5 libenergyplusapi.so.24.2.0`EnergyPlus::BaseboardRadiator::SimBaseboard(state=0x00007fffffffab30, EquipName="UNIT1_BOILER_BASEBOARD", ControlledZoneNum=1, FirstHVACIteration=true, PowerMet=0x00007fffffff9620, CompIndex=0x0000555558b6a648) at BaseboardRadiator.cc:146:36
    frame #14: 0x00007fffedb3dfc5 libenergyplusapi.so.24.2.0`EnergyPlus::ZoneEquipmentManager::SimZoneEquipment(state=0x00007fffffffab30, FirstHVACIteration=true, SimAir=0x000055555573add8) at ZoneEquipmentManager.cc:3754:48
    frame #15: 0x00007fffedb142bc libenergyplusapi.so.24.2.0`EnergyPlus::ZoneEquipmentManager::ManageZoneEquipment(state=0x00007fffffffab30, FirstHVACIteration=true, SimZone=0x000055555573addb, SimAir=0x000055555573add8) at ZoneEquipmentManager.cc:160:25
    frame #16: 0x00007fffee737141 libenergyplusapi.so.24.2.0`EnergyPlus::HVACManager::SimSelectedEquipment(state=0x00007fffffffab30, SimAirLoops=0x000055555573add8, SimZoneEquipment=0x000055555573addb, SimNonZoneEquipment=0x000055555573addc, SimPlantLoops=0x000055555573adda, SimElecCircuits=0x000055555573add9, FirstHVACIteration=0x00007fffffff99f5, LockPlantFlows=false) at HVACManager.cc:1771:50
    frame #17: 0x00007fffee72bb66 libenergyplusapi.so.24.2.0`EnergyPlus::HVACManager::SimHVAC(state=0x00007fffffffab30) at HVACManager.cc:824:25
    frame #18: 0x00007fffee724fb1 libenergyplusapi.so.24.2.0`EnergyPlus::HVACManager::ManageHVAC(state=0x00007fffffffab30) at HVACManager.cc:269:12
    frame #19: 0x00007fffee90de94 libenergyplusapi.so.24.2.0`EnergyPlus::HeatBalanceAirManager::CalcHeatBalanceAir(state=0x00007fffffffab30) at HeatBalanceAirManager.cc:4899:32
    frame #20: 0x00007fffee8c7753 libenergyplusapi.so.24.2.0`EnergyPlus::HeatBalanceAirManager::ManageAirHeatBalance(state=0x00007fffffffab30) at HeatBalanceAirManager.cc:168:23
    frame #21: 0x00007fffeea2eaa9 libenergyplusapi.so.24.2.0`EnergyPlus::HeatBalanceSurfaceManager::ManageSurfaceHeatBalance(state=0x00007fffffffab30) at HeatBalanceSurfaceManager.cc:171:48
    frame #22: 0x00007fffee961a4c libenergyplusapi.so.24.2.0`EnergyPlus::HeatBalanceManager::ManageHeatBalance(state=0x00007fffffffab30) at HeatBalanceManager.cc:208:33
    frame #23: 0x00007fffed411e08 libenergyplusapi.so.24.2.0`EnergyPlus::SimulationManager::SetupSimulation(state=0x00007fffffffab30, ErrorsFound=0x00007fffffffa8a3) at SimulationManager.cc:1885:30
    frame #24: 0x00007fffed3fb93b libenergyplusapi.so.24.2.0`EnergyPlus::SimulationManager::ManageSimulation(state=0x00007fffffffab30) at SimulationManager.cc:271:24
    frame #25: 0x00007fffec841228 libenergyplusapi.so.24.2.0`RunEnergyPlus(state=0x00007fffffffab30, filepath="") at EnergyPlusPgm.cc:419:56
    frame #26: 0x00007fffec83f9a4 libenergyplusapi.so.24.2.0`EnergyPlusPgm(args=size=6, filepath="") at EnergyPlusPgm.cc:242:25
    frame #27: 0x0000555555604015 energyplus`main(argc=6, argv=0x00007fffffffc208) at main.cc:60:25
    frame #28: 0x00007fffe63d9083 libc.so.6`__libc_start_main(main=(energyplus`main at main.cc:54:1), argc=6, argv=0x00007fffffffc208, init=<unavailable>, fini=<unavailable>, rtld_fini=<unavailable>, stack_end=0x00007fffffffc1f8) at libc-start.c:308:16
    frame #29: 0x0000555555603e3e energyplus`_start + 46
(lldb) f 11
frame #11: 0x00007fffedcf46f2 libenergyplusapi.so.24.2.0`EnergyPlus::BaseboardRadiator::BaseboardParams::SizeBaseboard(this=0x0000555555f60910, state=0x00007fffffffab30, baseboardNum=1) at BaseboardRadiator.cc:627:107
   624 	
   625 	            if (state.dataSize->CurZoneEqNum > 0) {
   626 	                auto &zoneEqSizing = state.dataSize->ZoneEqSizing(state.dataSize->CurZoneEqNum);
-> 627 	                auto const &finalZoneSizing = state.dataSize->FinalZoneSizing(state.dataSize->CurZoneEqNum);
   628 	                bool FlowAutoSize = false; // Indicator to autosizing water volume flow
   629 	
   630 	                if (this->WaterVolFlowRateMax == DataSizing::AutoSize) {
(lldb) p state.dataSize->FinalZoneSizing
(EnergyPlus::EPVector<EnergyPlus::DataSizing::ZoneSizingData>) {
  std::__debug::vector<EnergyPlus::DataSizing::ZoneSizingData, std::allocator<EnergyPlus::DataSizing::ZoneSizingData> > = size=0 {}
  m_allocated = false
}

Details

Some additional details for this issue (if relevant):

  • Platform (Operating system, version): all
  • Version of EnergyPlus (if using an intermediate build, include SHA): develop, f274ccb

Checklist

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

@RKStrand
Copy link
Contributor

Interesting. It'd trying to size the baseboard when it has nothing that needs to be sized from what I can tell. Also, the baseboard sizing is not called from the same place as other autosizing (called from within the baseboard simulation). Seems like this automatically wants to size, but I am not sure why it is doing that. Seems like any file that didn't had a baseboard but wasn't autosizing other equipment would crash? I'll assign it to myself, but if someone else wants to take this instead, let me know soon.

@RKStrand RKStrand self-assigned this Aug 22, 2024
@RKStrand RKStrand added the Defect Includes code to repair a defect in EnergyPlus label Aug 22, 2024
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.

2 participants