Skip to content

Commit

Permalink
Fluid properties caching third test
Browse files Browse the repository at this point in the history
  • Loading branch information
amirroth committed Dec 29, 2023
1 parent 2b8d2c8 commit 1a5bc35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/EnergyPlus/FluidProperties.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7044,9 +7044,9 @@ namespace FluidProperties {
DISABLE_WARNING_POP

std::uint64_t uTtag = uT >> precision_shift;
std::uint64_t uRound = (uT >> (precision_shift - 2) & 3);
std::uint64_t uRound = (uT >> (precision_shift - 1) & 1);

if (uRound == 3) ++uTtag; // Round up if next two bits are 1s
if (uRound == 1) ++uTtag; // Round up if next bits is 1

std::uint64_t hash = uTtag & t_sh_cache_mask;
auto &cTsh = state.dataFluidProps->cached_t_sh[hash];
Expand Down

7 comments on commit 1a5bc35

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FluidCaching (amirroth) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3567 of 3587 tests passed, 429 test warnings)

Messages:\n

  • 423 tests had: ESO small diffs.
  • 313 tests had: EIO diffs.
  • 375 tests had: MTR small diffs.
  • 248 tests had: Table small diffs.
  • 1 test had: JSON small diffs.
  • 9 tests had: ESO big diffs.
  • 13 tests had: Table big diffs.
  • 16 tests had: ERR diffs.
  • 1 test had: JSON big diffs.
  • 1 test had: MTR big diffs.
  • 1 test had: EDD diffs.

Failures:\n

regression Test Summary

  • Passed: 786
  • Failed: 20

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FluidCaching (amirroth) - Win64-Windows-10-VisualStudio-16: OK (2759 of 2759 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FluidCaching (amirroth) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (1972 of 1972 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FluidCaching (amirroth) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (790 of 790 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@amirroth
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Myoldmopar @mjwitte @rraustad So ... there are three different commits here.

  • The first one disables FluidProps caching entirely. It produces diffs.
  • The next two do caching but slightly differently than we are doing it now. Right now we truncate some low-significance bits to create the cache index. This means that we are essentially always rounding down to do the lookup. This doesn't really mean anything because the SpecificHeat value that is cached corresponds to the temperature that created the entry no matter where it falls in the "bucket". The two other commits don't always round down to do the lookup. They round either up or down based on either the immediately truncated bit or the immediately truncated two bits. These also produce some diffs, although fewer than disabling caching entirely. The diffs are mostly small, but there are several "butterfly effects" in which a small diff results in a timestamp changing by an hour or two.

I would like to simplify the caching algorithm somewhat as well as to change some FluidProps data structures, but we are almost certainly going to get diffs like these when I do.

FWIW these are not the changes I am going to make. These are just simple tests to bound the scope of the issue.

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FluidCaching (amirroth) - x86_64-MacOS-10.17-clang-14.0.0: OK (3524 of 3546 tests passed, 764 test warnings)

Messages:\n

  • 785 tests had: AUD diffs.
  • 430 tests had: ESO small diffs.
  • 317 tests had: EIO diffs.
  • 385 tests had: MTR small diffs.
  • 250 tests had: Table small diffs.
  • 25 tests had: MTD diffs.
  • 2 tests had: JSON big diffs.
  • 10 tests had: MDD diffs.
  • 16 tests had: Table big diffs.
  • 7 tests had: ESO big diffs.
  • 19 tests had: ERR diffs.
  • 2 tests had: EDD diffs.
  • 1 test had: MTR big diffs.

Failures:\n

regression Test Summary

  • Passed: 764
  • Failed: 22

Build Badge Test Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FluidCaching (amirroth) - x86_64-MacOS-10.18-clang-15.0.0: Tests Failed (2985 of 3546 tests passed, 226 test warnings)

Messages:\n

  • 785 tests had: AUD diffs.
  • 704 tests had: EIO diffs.
  • 16 tests had: EDD diffs.
  • 514 tests had: ESO big diffs.
  • 511 tests had: Table big diffs.
  • 131 tests had: MTR big diffs.
  • 268 tests had: ZSZ big diffs.
  • 194 tests had: ESO small diffs.
  • 425 tests had: MTR small diffs.
  • 117 tests had: Table small diffs.
  • 103 tests had: ERR diffs.
  • 169 tests had: SSZ big diffs.
  • 69 tests had: SSZ small diffs.
  • 25 tests had: MTD diffs.
  • 10 tests had: MDD diffs.
  • 2 tests had: JSON big diffs.
  • 33 tests had: ZSZ small diffs.
  • 1 test had: PERF_LOG diffs.

Failures:\n

regression Test Summary

  • Passed: 226
  • Failed: 560

Build Badge Test Badge

Please sign in to comment.