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

Return geometry by value (alternative 2)

Open SoilRos opened this issue 6 months ago • 10 comments

To avoid copying a shared pointer, which is rather costly, the geometry now stores a variant holding either the ownership or a non-owning view to the entity variable. In the case of entity variables owned by the grid, a non-owning storage is fine as the geometry should not outlive the grid. On grid refinement the grid points are only owned by the geometry, so a move into the geometry is preferred.

Note that this PR is based on #885 which fixes all the lifetime issues of the geometry objects.

SoilRos avatar Jun 13 '25 08:06 SoilRos

jenkins build this serial please

aritorto avatar Jun 13 '25 09:06 aritorto

jenkins build this serial please

SoilRos avatar Jun 26 '25 13:06 SoilRos

jenkins build this serial please

SoilRos avatar Jul 04 '25 13:07 SoilRos

benchmark please

blattms avatar Jul 09 '25 12:07 blattms

Benchmark results did not get posted back here. I am on it. The gist of the benchmark is, that there is sometimes a small increase in solution time (less than .5%). Some a runs are even faster. None really slower.

blattms avatar Jul 11 '25 08:07 blattms

benchmark please

blattms avatar Jul 14 '25 10:07 blattms

Manually posting results from run on July 9:

Test Configuration Relative
opm-git OPM Benchmark: drogon - Threads: 1 1.002
opm-git OPM Benchmark: drogon - Threads: 8 0.885
opm-git OPM Benchmark: punqs3 - Threads: 1 0.991
opm-git OPM Benchmark: punqs3 - Threads: 8 0.982
opm-git OPM Benchmark: smeaheia - Threads: 1 0.996
opm-git OPM Benchmark: smeaheia - Threads: 8 0.923
opm-git OPM Benchmark: spe10_model_1 - Threads: 1 0.999
opm-git OPM Benchmark: spe10_model_1 - Threads: 8 1.007
opm-git OPM Benchmark: flow_mpi_norne - Threads: 1 1.003
opm-git OPM Benchmark: flow_mpi_norne - Threads: 8 0.934
opm-git OPM Benchmark: flow_mpi_norne_4c_msw - Threads: 1 - FOPT (Total Oil Production At End Of Run) 1
opm-git OPM Benchmark: flow_mpi_norne_4c_msw - Threads: 8 0.909
  • Speed-up = Total time master / Total time pull request. Above 1.0 is an improvement. *

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

blattms avatar Jul 15 '25 08:07 blattms

Benchmark result overview:

Test Configuration Relative
opm-git OPM Benchmark: drogon - Threads: 1 1.007
opm-git OPM Benchmark: drogon - Threads: 8 0.899
opm-git OPM Benchmark: punqs3 - Threads: 1 1.002
opm-git OPM Benchmark: punqs3 - Threads: 8 0.991
opm-git OPM Benchmark: smeaheia - Threads: 1 1.006
opm-git OPM Benchmark: smeaheia - Threads: 8 0.922
opm-git OPM Benchmark: spe10_model_1 - Threads: 1 1.004
opm-git OPM Benchmark: spe10_model_1 - Threads: 8 0.991
opm-git OPM Benchmark: flow_mpi_extra - Threads: 1 1
opm-git OPM Benchmark: flow_mpi_extra - Threads: 8 0.898
opm-git OPM Benchmark: flow_mpi_norne - Threads: 1 0.998
opm-git OPM Benchmark: flow_mpi_norne - Threads: 8 0.923
opm-git OPM Benchmark: flow_mpi_norne_4c_msw - Threads: 1 - FOPT (Total Oil Production At End Of Run) 1
opm-git OPM Benchmark: flow_mpi_norne_4c_msw - Threads: 8 - FOPT (Total Oil Production At End Of Run) 1
  • 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=2823

ytelses avatar Jul 15 '25 08:07 ytelses

jenkins build this serial please

SoilRos avatar Jul 31 '25 14:07 SoilRos

jenkins build this serial please

SoilRos avatar Aug 01 '25 10:08 SoilRos