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

Can someone help me with an FArray1.hh error when compiling E+ on linux?

asked 2016-01-13 03:00:38 -0500

updated 2017-06-02 18:26:46 -0500

Hello,

For my PhD In architectural engineering I am altering the E+ source code to create an advanced hybrid ventilation system manager. Until now everything went fine. But yesterday I got this error (see below) when running the compiled version (The compiling itself returns no errors). After not being able to solve this problem I returned to a backup of my altered source code that was previously working. Now it gives me the same error. Can someone tell me what the FArray1 is? Can someone recommend me a good debugger for linux?

Thank you.

EnergyPlus: /home/data/bbelmans/EnergyPlus/EnergyPlusBuilds/WORKDIR/third_party/ObjexxFCL/src/ObjexxFCL/FArray1.hh:1131: T& ObjexxFCL::FArray1< <template-parameter-1-1> >::operator()(int) [with T = std::basic_string<char>]: Assertion `contains( i )' failed. /usr/local/bin/runenergyplus: line 488: 25156 Aborted (core dumped) "$ENERGYPLUS_DIR/bin/$PRG_N"

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2016-01-13 08:40:14 -0500

FArray1 is a container class that holds, in this case, strings.

Basically you get this assertion when you have a Debug build and you try to access an index outside the bounds of the array. For example, if you have nothing in your Array but you try to access it with fooArray( 1 ), it will throw this assertion because there is nothing at index 1. The FArray, and other Array classes, are emulation classes of Fortran's Arrays. The biggest important fact about this is that Fortran is 1-based indexing versus 0-based indexing for C++ native containers (vector, list, etc).

Regarding a debugger on Linux, I would use GDB if you are familiar with command line debugging. Otherwise, I would suggest using JetBrains CLion IDE, which will help you compile EnergyPlus as well as being able to run an interactive debugger and set breakpoints. I find it very helpful and it works well. You have to pay for the IDE but as a student you can get access to it (and all of JetBrains' other IDEs) for free.

I also notice from your error message it looks like you are using the runenergyplus script. I would suggest to use the command line interface native in EnergyPlus now instead of that script. Just call energyplus -h to see all command line input options. This is the preferred method to start simulations. It will also allow you to more easier test from CLion, if you use it.

edit flag offensive delete link more

Comments

@MarkAdams. Thank you for the very informative answer. I think I have found the bug. The CLion IDE is very helpful indeed.

BBel's avatar BBel  ( 2016-01-14 07:12:13 -0500 )edit
2

answered 2016-01-13 08:10:17 -0500

updated 2016-01-13 08:16:30 -0500

I ran into this just the other day. The error means that you are passing a null string as one of the function arguments. The "Assertion 'contains(I)' failed" part of the message indicates that the string wasn't there. If you can run this in a debugger, when you hit that line, an abort message should pop up. Choose retry to stop the program. Then use the call stack to backtrack where this was called from. Then check all the arguments passed to the function.

edit flag offensive delete link more

Your Answer

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

Add Answer

Careers

Question Tools

1 follower

Stats

Asked: 2016-01-13 03:00:38 -0500

Seen: 161 times

Last updated: Jan 13 '16