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

Add support for GRUPSLAV

Open hakonhagland opened this issue 1 year ago • 29 comments

See OPM/opm-simulators#5436 and https://github.com/OPM/opm-simulators/pull/5443 for more information.

hakonhagland avatar Jun 25 '24 19:06 hakonhagland

jenkins build this opm-simulators=5443 please

hakonhagland avatar Jun 25 '24 19:06 hakonhagland

jenkins build this opm-simulators=5443 please

hakonhagland avatar Jun 25 '24 22:06 hakonhagland

jenkins build this opm-simulators=5443 please

hakonhagland avatar Jun 26 '24 06:06 hakonhagland

jenkins build this opm-simulators=5453 please

hakonhagland avatar Jun 28 '24 07:06 hakonhagland

The jenkins build console output reports:

Repository revisions:
	​[main module] opm-common=origin/pr/4123/merge
	 [downstream] opm-grid=master
	 [downstream] opm-models=master
	 [downstream] opm-simulators=pull/5453/merge

[...]

​simulators/opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp:27:10: fatal error: opm/input/eclipse/Schedule/ResCoup/ReservoirCouplingInfo.hpp: No such file or directory
   ​27 | #include <opm/input/eclipse/Schedule/ResCoup/ReservoirCouplingInfo.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

But that file opm/input/eclipse/Schedule/ResCoup/ReservoirCouplingInfo.hpp is actually present in the current PR, see here.. @akva2 Any ideas?

hakonhagland avatar Jun 28 '24 08:06 hakonhagland

yes. you have to add it to the installed header list in CMakeLists_files.cmake.

akva2 avatar Jun 28 '24 08:06 akva2

jenkins build this opm-simulators=5453 please

hakonhagland avatar Jun 28 '24 09:06 hakonhagland

jenkins build this opm-simulators=5453 please

hakonhagland avatar Aug 05 '24 15:08 hakonhagland

The Jeninks tests reports a segmentation fault:

[opm-deb:2741637] Signal: Segmentation fault (11)
[opm-deb:2741637] Signal code: Address not mapped (1)
[opm-deb:2741637] Failing at address: 0x90

It seems this is because the ptr_member rescoup:

https://github.com/OPM/opm-common/blob/d5ea3ac19bcc380125a2489ed3ce84857ef892ce/opm/input/eclipse/Schedule/ScheduleState.hpp#L404

will refer to a nullptr if not rescoup.update() has been called and in https://github.com/OPM/opm-simulators/pull/5453 I try to access this in that case (update() has not been called). What I need to do is something like this:

if (this->schedule()[0].rescoup()) {
     auto master_mode = this->schedule()[0].rescoup().masterMode();
    // ....
}

but this will not compile since rescoup() returns a const T& and not a pointer. Do I need to modify ptr_member or am I missing something? For example, by adding a empty() method:

bool empty() const {
      return !this->m_data;
}

Then, I could do:

if (!this->schedule()[0].rescoup.empty()) {
     auto master_mode = this->schedule()[0].rescoup().masterMode();
    // ....
}

hakonhagland avatar Aug 06 '24 09:08 hakonhagland

jenkins build this opm-simulators=5453 please

hakonhagland avatar Aug 06 '24 19:08 hakonhagland

The Jeninks tests reports a segmentation fault

Seems like real the problem was that I had forgot to add reservoir coupling information to the Schedule serialization object, so the rescoup ptr_member became nullptr on all ranks except for rank 0.

hakonhagland avatar Aug 06 '24 19:08 hakonhagland

jenkins build this opm-simulators=5453 please

hakonhagland avatar Aug 06 '24 19:08 hakonhagland

jenkins build this opm-simulators=5453 please

hakonhagland avatar Aug 06 '24 19:08 hakonhagland

jenkins build this please

blattms avatar Aug 09 '24 14:08 blattms

jenkins build this please

hakonhagland avatar Aug 09 '24 16:08 hakonhagland

I will run jenkins on this alone, too,

@blattms I think this PR should be merged at the same time as https://github.com/OPM/opm-simulators/pull/5453 is merged. Currently the jenkins build fails when using opm-simulators master branch, but it succeeds if building against https://github.com/OPM/opm-simulators/pull/5453. This is because that PR includes the missing headers needed for schedule serialization.

hakonhagland avatar Aug 09 '24 20:08 hakonhagland

jenkins build this opm-simulators=5453 please

hakonhagland avatar Aug 09 '24 20:08 hakonhagland

jenkins build this opm-simulators=5453 please

hakonhagland avatar Aug 09 '24 20:08 hakonhagland

jenkins build this opm-simulators=5453 please

hakonhagland avatar Aug 09 '24 21:08 hakonhagland

jenkins build this opm-simulators=5521 please

hakonhagland avatar Aug 12 '24 19:08 hakonhagland

Rebased

hakonhagland avatar Sep 09 '24 08:09 hakonhagland

jenkins build this opm-simulators=5521 please

hakonhagland avatar Sep 09 '24 08:09 hakonhagland

jenkins build this opm-simulators=5521 please

hakonhagland avatar Sep 09 '24 13:09 hakonhagland

Lots of approvals. Is there a reason not to merge this without the rest?

Let's ask jenkins.

blattms avatar Sep 10 '24 12:09 blattms

jenkins build this please

blattms avatar Sep 10 '24 12:09 blattms

Is there a reason not to merge this without the rest?

@blattms For the jenkins build to pass, we need to first merge some PRs in opm-simulators: https://github.com/OPM/opm-simulators/pull/5436, https://github.com/OPM/opm-simulators/pull/5437, https://github.com/OPM/opm-simulators/pull/5443, https://github.com/OPM/opm-simulators/pull/5453, and https://github.com/OPM/opm-simulators/pull/5521

hakonhagland avatar Sep 10 '24 13:09 hakonhagland

jenkins build this opm-simulators=5620 please

hakonhagland avatar Sep 19 '24 17:09 hakonhagland

The Jenkins build reports 6 test failures:

image

I can run all of those test cases locally, except the case compareECLFiles_flow_blackoil_float+SPE1CASE1. Here I get,

$ ctest -N  | grep SPE1CASE1
  Test #107: compareECLFiles_flow+SPE1CASE1
  Test #108: compareECLFiles_flow+SPE1CASE1_IMPORT
  Test #113: compareECLFiles_flow+SPE1CASE1_BRINE
  Test #114: compareECLFiles_flow+SPE1CASE1_PRECSALT
  Test #122: compareECLFiles_flow+SPE1CASE1_METRIC_VFP1
  Test #123: compareECLFiles_flow+SPE1CASE1_WATER
  Test #358: compareParallelSim_flow+SPE1CASE1_WATER
  Test #359: compareParallelSim_flow+SPE1CASE1_BRINE

@akva2 Do you know how to run test case compareECLFiles_flow_blackoil_float+SPE1CASE1 ?

hakonhagland avatar Sep 20 '24 11:09 hakonhagland

you have to build with cmake parameter -DBUILD_FLOW_FLOAT_VARIANTS=1

akva2 avatar Sep 20 '24 11:09 akva2

jenkins build this opm-simulators=5620 please

hakonhagland avatar Oct 05 '24 20:10 hakonhagland