Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for GRUPSLAV #4123

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

hakonhagland
Copy link
Contributor

@hakonhagland hakonhagland commented Jun 25, 2024

See OPM/opm-simulators#5436 and OPM/opm-simulators#5443 for more information.

@hakonhagland
Copy link
Contributor Author

jenkins build this opm-simulators=5443 please

@hakonhagland
Copy link
Contributor Author

jenkins build this opm-simulators=5443 please

opm/input/eclipse/Schedule/ResCoup/GrupSlav.hpp Outdated Show resolved Hide resolved
opm/input/eclipse/Schedule/ResCoup/MasterGroup.hpp Outdated Show resolved Hide resolved
opm/input/eclipse/Schedule/ResCoup/MasterGroup.hpp Outdated Show resolved Hide resolved
opm/input/eclipse/Schedule/ResCoup/Slaves.hpp Outdated Show resolved Hide resolved
@hakonhagland
Copy link
Contributor Author

jenkins build this opm-simulators=5443 please

Copy link
Member

@totto82 totto82 left a comment

Choose a reason for hiding this comment

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

Looks good to me

@hakonhagland
Copy link
Contributor Author

jenkins build this opm-simulators=5453 please

@hakonhagland
Copy link
Contributor Author

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?

@akva2
Copy link
Member

akva2 commented Jun 28, 2024

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

@hakonhagland
Copy link
Contributor Author

jenkins build this opm-simulators=5453 please

@hakonhagland
Copy link
Contributor Author

jenkins build this opm-simulators=5453 please

@hakonhagland
Copy link
Contributor Author

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:

ptr_member<ReservoirCoupling::CouplingInfo> rescoup;

will refer to a nullptr if not rescoup.update() has been called and in OPM/opm-simulators#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
Copy link
Contributor Author

jenkins build this opm-simulators=5453 please

@hakonhagland
Copy link
Contributor Author

hakonhagland commented Aug 6, 2024

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
Copy link
Contributor Author

jenkins build this opm-simulators=5453 please

1 similar comment
@hakonhagland
Copy link
Contributor Author

jenkins build this opm-simulators=5453 please

@blattms blattms removed the request for review from joakim-hove August 9, 2024 14:23
Copy link
Member

@blattms blattms left a comment

Choose a reason for hiding this comment

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

I had another look, This was approved before and I am ready to merge.

I am just wondering about some comments and possible code simplifaction. I seems like those comments are related to code that was not even changed by this PR but just moved. Would still be cool if you would double check my comments and the places.

I will run jenkins on this alone, too,

opm/input/eclipse/Schedule/ResCoup/GrupSlav.cpp Outdated Show resolved Hide resolved
opm/input/eclipse/Schedule/ResCoup/GrupSlav.cpp Outdated Show resolved Hide resolved
opm/input/eclipse/Schedule/ResCoup/GrupSlav.cpp Outdated Show resolved Hide resolved
opm/input/eclipse/Schedule/ResCoup/MasterGroup.cpp Outdated Show resolved Hide resolved
opm/input/eclipse/Schedule/ResCoup/MasterGroup.cpp Outdated Show resolved Hide resolved
opm/input/eclipse/Schedule/ResCoup/MasterGroup.cpp Outdated Show resolved Hide resolved
opm/input/eclipse/Schedule/ResCoup/Slaves.cpp Outdated Show resolved Hide resolved
tests/parser/ReservoirCouplingTests.cpp Outdated Show resolved Hide resolved
tests/parser/ReservoirCouplingTests.cpp Show resolved Hide resolved
@blattms
Copy link
Member

blattms commented Aug 9, 2024

jenkins build this please

@hakonhagland
Copy link
Contributor Author

jenkins build this please

@hakonhagland
Copy link
Contributor Author

I will run jenkins on this alone, too,

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

@hakonhagland
Copy link
Contributor Author

jenkins build this opm-simulators=5453 please

2 similar comments
@hakonhagland
Copy link
Contributor Author

jenkins build this opm-simulators=5453 please

@hakonhagland
Copy link
Contributor Author

jenkins build this opm-simulators=5453 please

@hakonhagland
Copy link
Contributor Author

jenkins build this opm-simulators=5521 please

@hakonhagland
Copy link
Contributor Author

Rebased

@hakonhagland
Copy link
Contributor Author

jenkins build this opm-simulators=5521 please

1 similar comment
@hakonhagland
Copy link
Contributor Author

jenkins build this opm-simulators=5521 please

@blattms
Copy link
Member

blattms commented Sep 10, 2024

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

Let's ask jenkins.

@blattms
Copy link
Member

blattms commented Sep 10, 2024

jenkins build this please

@hakonhagland
Copy link
Contributor Author

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: OPM/opm-simulators#5436, OPM/opm-simulators#5437, OPM/opm-simulators#5443, OPM/opm-simulators#5453, and OPM/opm-simulators#5521

@hakonhagland
Copy link
Contributor Author

jenkins build this opm-simulators=5620 please

@hakonhagland
Copy link
Contributor Author

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 ?

@akva2
Copy link
Member

akva2 commented Sep 20, 2024

you have to build with cmake parameter -DBUILD_FLOW_FLOAT_VARIANTS=1

Removed inclusion of private header from public header files
Require slaves and master groups to be defined at the first report
step
Also add ReseroirCoupling info the ScheduleState serialization test
object
Add ReservoirCoupling::CouplingInfo serialization data to the Schedule
serialization object.
Remove method that was introduced by a mistake in previous commit.
- Changed copy object to const &
- Simplified boost test case logic
@hakonhagland
Copy link
Contributor Author

jenkins build this opm-simulators=5620 please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants