opm-common icon indicating copy to clipboard operation
opm-common copied to clipboard

- made NDEBUG on in release

Open hnil opened this issue 2 years ago • 6 comments

  • make NDEBUG on in release.
  • draft pullrequest to test performance on ytelse

hnil avatar Mar 06 '23 10:03 hnil

jenkins build this please

bska avatar Mar 06 '23 10:03 bska

benchmark please

atgeirr avatar Mar 06 '23 10:03 atgeirr

Benchmark result overview:

Test Configuration Relative
opm-git OPM Benchmark: drogon - Threads: 1 1.01
opm-git OPM Benchmark: drogon - Threads: 8 1.19
opm-git OPM Benchmark: smeaheia - Threads: 1 1.007
opm-git OPM Benchmark: smeaheia - Threads: 8 1.152
opm-git OPM Benchmark: spe10_model_1 - Threads: 1 1.016
opm-git OPM Benchmark: spe10_model_1 - Threads: 8 1.018
opm-git OPM Benchmark: flow_mpi_extra - Threads: 1 1.015
opm-git OPM Benchmark: flow_mpi_extra - Threads: 8 1.035
opm-git OPM Benchmark: flow_mpi_norne - Threads: 1 1.022
opm-git OPM Benchmark: flow_mpi_norne - Threads: 8 1.048
  • Speed-up = Total time master / Total time pull request. Above 1.0 is an improvement. *

View result details @ https://www.ytelses.com/opm/?page=result&id=1986

ytelses avatar Mar 06 '23 16:03 ytelses

Benchmark result overview:

Test Configuration Relative
opm-git OPM Benchmark: drogon - Threads: 1 0.994
opm-git OPM Benchmark: drogon - Threads: 8 1.196
opm-git OPM Benchmark: smeaheia - Threads: 1 0.991
opm-git OPM Benchmark: smeaheia - Threads: 8 1.146
opm-git OPM Benchmark: spe10_model_1 - Threads: 1 1.008
opm-git OPM Benchmark: spe10_model_1 - Threads: 8 1.018
opm-git OPM Benchmark: flow_mpi_extra - Threads: 1 1.015
opm-git OPM Benchmark: flow_mpi_extra - Threads: 8 1.112
opm-git OPM Benchmark: flow_mpi_norne - Threads: 1 1.016
opm-git OPM Benchmark: flow_mpi_norne - Threads: 8 1.032
  • Speed-up = Total time master / Total time pull request. Above 1.0 is an improvement. *

View result details @ https://www.ytelses.com/opm/?page=result&id=1986

ytelses avatar Mar 06 '23 21:03 ytelses

This is really strange on spe9 the effect i > 25 % on update on my machine single threaded.

hnil avatar Mar 07 '23 08:03 hnil

I think the time has come for this to be merged.

The only reason to NOT define NDEBUG for release builds is to preserve assert()s in the executable as a last-resort guard against producing wrong results. Such assert()s have now been removed from most parts of the code (although a few remain) and replaced with if (problem) and exceptions which is a better: assert() should never be used for checking things depending on user input, only to ensure the programmer did not do something stupid.

The remaining assert()s combined with not defining NDEBUG can result in users experiencing errors terminating their runs, when it in some cases at least could have been possible to run through after timestep cuts. That is another reason to make this change.

atgeirr avatar Sep 28 '23 09:09 atgeirr