Overcome StdOutputRecordCount's limit of about 2.1 billion #9204
Labels
Defect
Includes code to repair a defect in EnergyPlus
LowComplexityApproved
Used for subcontractor defect complexity requests
Issue overview
Recent a user reports the needs to report a very large number of output variables (into eso, and/or possibly sql as well) that exceeds the integer type limits of 2 147 883 647. Therefore, a question was asked about changing the “int” type definition of the variable state.dataGlobal->StdOutputRecordCount to an even “longer” integer type, such as “long int” to solve the problem.
The problem is related to the code here:
EnergyPlus/src/EnergyPlus/SimulationManager.cc
Lines 1826 to 1831 in e6e681d
If the count hits above the 32-bit integer upper limit, it will execute the “else” block and delete the entire output file. Another possible solution provided by the user is to use
StdOutputRecordCount != 0
, instead ofStdOutputRecordCount > 0
, that could exploit the negative overflow theint
type to avoid theelse{
block to be executed in an overflow condition.The case as described by the user is about a 30 000 square meter building with 1000 area, using a 5-minute timestep for simulations. The user outputted a set of variables for each zone for an in-house automatic tools to check comfort and efficiency in each zone. With the settings, at each timestep the outputs contains 105 120 000 records. The 2.1 billion limit was quickly consumed up.
A few thoughts about this:
state.dataGlobal->StdOutputRecordCount
fromint
tounsigned int
might double the limit, which is about 4.3 billion records.state.dataGlobal->StdOutputRecordCount
seems to be used just an increment counter, and it is not used in any array index or anything else. This helps in not complicating the issue.Details
Some additional details for this issue (if relevant):
Checklist
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
The text was updated successfully, but these errors were encountered: