Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
1

EnergyPlus crash - forrtl: severe (157): Program Exception - access violation

asked 2015-03-05 10:57:45 -0600

updated 2015-11-10 15:16:40 -0600

When running EnergyPlus via Python and using multiprocessing I get the following error on some runs. My guess is that this is to do with multiple processes trying to access the same schedules file. Does that make sense to anyone who understands the internals of EnergyPlus better than I do?

The reasoning above seems wrong having looked into what causes this error in Fortran. It's apparently to do with trying to do with touching memory that you're not allowed to. The examples I saw are "writing into a constant parameter, ...reading/writing outside of bounds, ...accessing an uninitialized variable".

So what could be causing this error?

forrtl: severe (157): Program Exception - access violation

Image              PC                Routine            Line        Source             
EnergyPlus.exe     000000014011C536  schedulemanager_m        2468  ScheduleManager.f90
EnergyPlus.exe     00000001405F02EF  setpointmanager_m        5012  SetPointManager.f90
EnergyPlus.exe     00000001405CA274  setpointmanager_m         766  SetPointManager.f90
EnergyPlus.exe     00000001410AEE3F  hvacmanager_mp_si         657  HVACManager.f90
EnergyPlus.exe     00000001410A308E  hvacmanager_mp_ma         310  HVACManager.f90
EnergyPlus.exe     00000001410C1CD2  heatbalanceairman         123  HeatBalanceAirManager.f90
EnergyPlus.exe     000000014110FF52  heatbalancesurfac         149  HeatBalanceSurfaceManager.f90
EnergyPlus.exe     0000000141145CC0  heatbalancemanage         215  HeatBalanceManager.f90
EnergyPlus.exe     00000001411C4ED9  simulationmanager         376  SimulationManager.f90
EnergyPlus.exe     00000001411F0359  MAIN__                    421  EnergyPlus.f90
EnergyPlus.exe     00000001413BBA1C  Unknown               Unknown  Unknown
EnergyPlus.exe     000000014139941F  Unknown               Unknown  Unknown
kernel32.dll       0000000077A759ED  Unknown               Unknown  Unknown
ntdll.dll          0000000077CAC541  Unknown               Unknown  Unknown
edit retag flag offensive close merge delete

Comments

@Jamie, why are you still running the FORTRAN version? Seriously, what version of EnergyPlus is this?

__AmirRoth__'s avatar __AmirRoth__  ( 2015-03-05 12:10:38 -0600 )edit

@Amir Roth It's 8.1. We're 12 months into a project wrapping EnergyPlus in a much larger Python project. I'm not about to start messing about with migrating to 8.2 a couple of weeks from the deadline! Definitely 8.2 for the next one though.

Jamie Bull's avatar Jamie Bull  ( 2015-03-05 12:35:16 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
4

answered 2015-07-22 17:07:47 -0600

Jamie,

Looking at the source from EnergyPlus 8.1.0.009, line 2468 of ScheduleManager.f90 is in the function that gives the current schedule value at a point in the simulation. At that line, the function is checking whether EMS is overriding a schedule. In the current C++ code, it corresponds to right about here.

Without seeing the actual example file, I'm guessing on this project you are using EMS. It appears maybe there is an indexing problem that the code tries to access either a too-high, or zero schedule index in the internal array, which causes the access violation. I know the project might be over, but in case you are still having this issue, if you are able to send the EMS logic that (I presume) you are using, it would be helpful in debugging.

Suggestions to fix would be:

  • Check to make sure you initialize the EMS variable you are using to store the schedule index to a meaningful value before using it
  • If that doesn't reveal the problem, post the EMS logic you use to help diagnose the problem here, or
  • Post the file to the EnergyPlus Helpdesk for further developer assistance
edit flag offensive delete link more

Comments

Hi Edwin, thanks for the answer. You're right though, the project is over and I don't have a record of how things stood at the time this issue came up I'm afraid (without digging deep into Git). Thanks for the pointer to where the error occurs in the code. Is the FORTAN code also available online or just the C++?

Jamie Bull's avatar Jamie Bull  ( 2015-07-23 02:52:48 -0600 )edit
1

The Fortran code isn't explicitly posted by the E+ team, but Unmet Hours has a few major release versions of the Fortran code posted under the open source license. You can look at http://bigladdersoftware.com/epx/ for the packages.

Edwin's avatar Edwin  ( 2015-07-23 09:52:18 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2015-03-05 10:57:45 -0600

Seen: 1,647 times

Last updated: Jul 22 '15