Commit Graph

772 Commits

Author SHA1 Message Date
Tobias Meyer Andersen
0bab02f809 update name of opm cuilu0 to match gpuistl 2024-09-13 09:15:19 +02:00
Kai Bao
4f51eb35d5 addressing reviewing comments 2024-09-11 15:53:35 +02:00
Kai Bao
2c75adf165 adding a compositional simulator
flowexp_comp
2024-09-11 14:58:33 +02:00
Kai Bao
85513754bc splitting Blackoil related to FlowProblemBlackoil
so FlowProblem can be used for compositional or other setting
2024-09-11 14:58:14 +02:00
Arne Morten Kvarving
93d796ef22 restart: add translation unit 2024-09-05 15:02:52 +02:00
Arne Morten Kvarving
e22276b91a restart.hh: rename to restart.hpp 2024-09-05 13:58:09 +02:00
Arne Morten Kvarving
478ddb5e52 added: opm/models/simulatorutils.[ch]pp
move humanReadableTime from simulator.hh into it
2024-09-05 13:32:15 +02:00
Arne Morten Kvarving
ec3081baab
Merge pull request #5580 from akva2/add_terminal_tu
added: translation unit for terminal manipulation stuff
2024-09-05 12:03:07 +02:00
Arne Morten Kvarving
909aa53efc added: opm/models/utils/terminal.[ch]pp
holds some terminal related methods that used to sit
in parametersystem
2024-09-05 10:58:42 +02:00
Bård Skaflestad
3de20b46b6 Add Saturation Function Consistency Checks for SCALECRS
This commit introduces consistency checks for the scaled displacing
saturation in the three point horizontal scaling method
(SCALECRS=YES).  These plug into the framework introduced in commit
c3939c544 (PR #5438).  We implement the following two checks

  - SGCR < 1-SOGCR-SWL < SGU
  - SWCR < 1-SOWCR-SGL < SWU

which collectively guarantee a mobile displacing oil saturation in
the two phase gas/oil and oil/water systems.
2024-09-05 10:36:43 +02:00
Arne Morten Kvarving
bc83bb6e1c parametersystem: introduce translation unit 2024-09-05 10:07:40 +02:00
Arne Morten Kvarving
05f01bf819 parametersystem.hh: rename to .hpp 2024-09-05 10:07:40 +02:00
Bård Skaflestad
be64ef3ef6 Add Water Phase Saturation Function Consistency Checks
This commit introduces a set of consistency checks for the water
phase saturation functions.  These plug into the framework
introduced in commit c3939c544 (PR #5438).  We implement the
following three checks

  - 0 <= SWL < 1
  - 0 < SWU <= 1
  - SWL <= SWCR < SWU

which collectively enable a non-negative oil saturation in the two
phase oil/water system.
2024-09-04 13:47:33 +02:00
Bård Skaflestad
d69d929d37
Merge pull request #5571 from bska/gphase-sfunc-consistency-checks-impl
Add Gas Phase Saturation Function Consistency Checks
2024-09-04 13:02:25 +02:00
Arne Morten Kvarving
f838cb6ecf timer: introduce translation unit 2024-09-04 12:06:52 +02:00
Arne Morten Kvarving
b3e08b4f2f timer.hh: rename to timer.hpp 2024-09-04 12:06:35 +02:00
Arne Morten Kvarving
13b575eae9 tasklets: introduce translation unit 2024-09-04 12:06:21 +02:00
Arne Morten Kvarving
d35d80427e tasklets.hh: rename to tasklets.hpp 2024-09-04 12:06:21 +02:00
Arne Morten Kvarving
27f9277c47 mpiutil: add translation unit 2024-09-04 12:06:21 +02:00
Arne Morten Kvarving
fcd0168691 mpiutil.hh: rename to mpiutil.hpp 2024-09-04 12:06:21 +02:00
Arne Morten Kvarving
e7a9c4cd21 threadmanager: remove unused typetag template parameter
and move implementation to a translation unit
2024-09-04 12:06:21 +02:00
Bård Skaflestad
9c246faefa Add Gas Phase Saturation Function Consistency Checks
This commit introduces a set of consistency checks for the gas phase
saturation functions.  These plug into the framework introduced in
commit c3939c544 (PR #5438).  We implement the following three checks

  - 0 <= SGL < 1
  - 0 <= SGU < 1
  - SGL <= SGCR < SGU

which collectively enable a non-negative oil saturation in the two
phase gas/oil system.
2024-09-04 11:34:39 +02:00
Arne Morten Kvarving
3ee5eddf48 threadmanager.hh: rename to threadmanager.hpp 2024-09-04 11:32:21 +02:00
Arne Morten Kvarving
55a0a6da54 blackoilsolventparams: introduce translation unit
move code for loading parameters from eclipse state into it
2024-09-04 11:17:40 +02:00
Arne Morten Kvarving
6ceeb3098e blackoilsolventparams.hh: rename to blackoilsolventparams.hpp 2024-09-04 11:17:40 +02:00
Arne Morten Kvarving
3aed1aa7f9 blackoilpolymerparams: introduce translation unit
move code for loading parameters from eclipse state into it
2024-09-04 11:17:40 +02:00
Arne Morten Kvarving
85cc5ffa5f blackoilpolymerparams.hh: rename to blackoilpolymerparams.hpp 2024-09-04 09:21:09 +02:00
Arne Morten Kvarving
5a567de3e2 blackoilmicpparams: introduce translation unit
move code for loading parameters from eclipse state into it
2024-09-04 09:17:26 +02:00
Arne Morten Kvarving
e1453e5a48 blackoilmicpparams.hh: rename to blackoilmicpparams.hpp 2024-09-04 09:16:34 +02:00
Arne Morten Kvarving
f6d3893093 blackoilfoamparams: introduce translation unit
move code for loading parameters from eclipse state into it
2024-09-04 09:13:02 +02:00
Arne Morten Kvarving
6bb6e3db43 blackoilfoamparams.hh: rename to blackoilfoamparams.hpp 2024-09-04 09:11:58 +02:00
Arne Morten Kvarving
a04d9fdd00 blackoilextboparams: introduce translation unit
move code for loading parameters from eclipse state into it
2024-09-04 09:08:12 +02:00
Arne Morten Kvarving
9fd99ab232 blackoilexboparams.hh: rename to blackoilextboparams.hpp 2024-09-04 09:06:59 +02:00
Arne Morten Kvarving
a51e13c244 blackoilbrineparams: introduce translation unit
move code for loading parameters from eclipse state into it
2024-09-04 09:02:17 +02:00
Arne Morten Kvarving
99d64ff7ec blackoilbrineparams.hh: rename to blackoilbrineparams.hpp 2024-09-04 09:00:02 +02:00
Bård Skaflestad
2e70fc407e Add Oil Phase Saturation Function Consistency Checks
This commit introduces a set of consistency checks for the oil phase
saturation functions.  These plug into the framework introduced in
commit c3939c544 (PR #5438).  We implement the following four checks
for the gas/oil two-phase system

  - 0 <= SOGCR < 1
  - SWL + SGU <= 1
  - SOGCR < 1 - SWL - SGL
  - SOGCR < 1 - SWL - SGCR

which all guarantee a non-negative (mobile) oil saturation in the
gas/oil system.  Similarly, we implement the following four checks
for the oil/water two-phase system

  - 0 <= SOWCR < 1
  - SGL + SWU <= 1
  - SOWCR < 1 - SWL - SGL
  - SOWCR < 1 - SWCR - SGL

which provide the same guarantees as outlined above, but for the
oil/water system.

We add a base class, PhaseCheckBase<Scalar>, which provides a common
representation of the violated/critical predicates and implement the
specific checks as derived types of this base class.
2024-09-03 12:35:44 +02:00
Arne Morten Kvarving
e3a16df477 add imported opm-models code to buildsystem 2024-09-03 10:49:49 +02:00
Tobias Meyer Andersen
d925d62bf2 refactor cusparsematrixoperations 2024-08-23 11:15:18 +02:00
Tobias Meyer Andersen
d2681b26ed refactor opm_cuda_safe_call 2024-08-23 11:12:13 +02:00
Tobias Meyer Andersen
85a9ad2b61 refactor cuistl folder names 2024-08-22 15:32:21 +02:00
Tobias Meyer Andersen
5919b417e3 refactor cuview 2024-08-22 15:27:23 +02:00
Tobias Meyer Andersen
fba1858f42 refactor cuvector 2024-08-22 15:20:20 +02:00
Tobias Meyer Andersen
3aa1767548 refactor cusparsematrix 2024-08-22 15:14:33 +02:00
Tobias Meyer Andersen
0c1ea3ee4d refactor cuseqilu0 2024-08-22 15:07:53 +02:00
Tobias Meyer Andersen
1721a1071f refactor cuowneroverlapcopy 2024-08-22 14:46:38 +02:00
Tobias Meyer Andersen
158619083e refacor cujac 2024-08-22 14:40:23 +02:00
Tobias Meyer Andersen
d17ee3315b refactor CuDILU 2024-08-22 14:28:33 +02:00
Tobias Meyer Andersen
69897753e8 refactor CuBuffer 2024-08-22 14:12:30 +02:00
Tobias Meyer Andersen
67bc9e8f34 refactor CuBlockPreconditioner 2024-08-22 13:58:35 +02:00
Kjetil Olsen Lye
c4f686227b
Merge pull request #5451 from multitalentloes/generalize_thread_block_tuner
Generalize thread block tuner
2024-08-22 12:56:14 +02:00
Tobias Meyer Andersen
14ea44246a add autotuner 2024-08-20 13:35:33 +02:00
Arne Morten Kvarving
d15cdea9ec FlowProblem: move parameter registration to FlowProblemParameters.cpp 2024-08-16 17:15:53 +02:00
Arne Morten Kvarving
b902f83fa6 BlackoilModelParameters: introduce translation unit 2024-08-16 17:15:53 +02:00
Arne Morten Kvarving
f6cc23aa4e DamarisParameters: introduce translation unit 2024-08-16 16:59:51 +02:00
Arne Morten Kvarving
e82395af99 FlowLinearSolverParameters: introduce translation unit 2024-08-16 16:59:50 +02:00
Arne Morten Kvarving
51b9d891a1 EclTimesteppingParams: introduce translation unit 2024-08-16 16:58:30 +02:00
Kjetil Olsen Lye
eb3d4e9203
Merge pull request #5441 from multitalentloes/add_opm_cuilu0
Add OpmCuILU0 and clean up cuistl
2024-08-12 09:46:37 +02:00
Tobias Meyer Andersen
7a30aaa46e Add an OPM implementation of ILU0
improve file structure in cuistl
run clang-format
2024-08-09 15:52:42 +02:00
Arne Morten Kvarving
edb99264ea add test for new parameter system 2024-08-09 15:29:27 +02:00
Arne Morten Kvarving
917fdbedfd changed: FlowProblem parameters moved to Opm::Parameters namespace 2024-08-06 09:50:02 +02:00
Arne Morten Kvarving
2a52cf8134 changed: Damaris parameters moved to Opm::Parameters namespace 2024-08-06 09:50:02 +02:00
Tobias Meyer Andersen
e8ac31da16 add CuBuffer and CuView to cuISTL 2024-08-01 16:38:16 +02:00
Markus Blatt
6e74fea547
Merge pull request #5477 from lisajulia/feature/metis-support
Add the metis partitioner as a command line option as well
2024-07-17 07:32:39 +02:00
Markus Blatt
ca2ef490aa
Merge pull request #5408 from BigDataAccelerate/cpr_rocsparse
rocsparse CPR initial version
2024-07-16 18:57:40 +02:00
Lisa Julia Nebel
653cb28bc2 Add the metis partitioner as a command line option as well 2024-07-16 17:39:28 +02:00
Bård Skaflestad
0c71d0701c Add MPI Support to Saturation Function Consistency Checks
This commit adds a new public member function

    SatfuncConsistencyChecks<>::collectFailures(root, comm)

which aggregates consistency check violations from all ranks in the
MPI communication object 'comm' onto rank 'root' of 'comm'.  This
amounts to summing the total number of violations from all ranks and
potentially resampling the failure points for reporting purposes.

To this end, extract the body of function processViolation() into a
general helper which performs reservoir sampling and records point
IDs and which uses a call-back function to populate the check values
associated to a single failed check.  Re-implement the original
function in terms of this helper by wrapping exportCheckValues() in
a lambda function.  Extract similar helpers for numPoints() and
anyFailedChecks(), and add a new helper function

    SatfuncConsistencyChecks<>::incorporateRankViolations()

which brings sampled points from an MPI rank into the 'root's
internal data structures.

One caveat applies here.  Our current approach to collecting check
failures implies that calling member function reportFailures() is
safe only on the 'root' process in a parallel run.  On the other
hand functions anyFailedChecks() and anyFailedCriticalChecks() are
safe, and guaranteed to return the same answer, on all MPI ranks.

On a final note, the internal helper functions are at present mostly
implemented in terms of non-owning pointers.  I intend to switch to
using 'std::span<>' once we enable C++20 mode.
2024-06-28 11:04:53 +02:00
Kjetil Olsen Lye
9b414419e7
Merge pull request #5404 from multitalentloes/add_dilu_LU_splitting
Add cudilu lu splitting
2024-06-27 14:30:45 +02:00
Arne Morten Kvarving
386fbed37f changed: remove hipification at configure time
the outputs will be generated when needed by the custom_command

since these outputs are not intended to be edited, there is no reason
to hipify them up front. in particular this removes the long sequential
process at configure time, allowing all hipification to run in parallel
(if using multiple build jobs, ie. ninja -jx or make -jx)
2024-06-26 16:01:16 +02:00
Bård Skaflestad
c3939c5444 Add New Platform for Saturation Function Consistency Checks
The intention is that this will ultimately replace the existing
RelpermDiagnostics component which does not really work in parallel
and which does not report enough context to help diagnose underlying
issues.  For now, though, we just add the shell of a new set of
checks and hook that up to the build.

Class SatfuncConsistencyChecks<Scalar> manages a configurable set of
consistency checks, the implementations of which must publicly
derive from SatfuncConsistencyChecks<Scalar>::Check.  Client code
will configure a set of checks by first calling

    SatfuncConsistencyChecks<Scalar>::resetCheckSet()

then register individual checks by calling

    SatfuncConsistencyChecks<Scalar>::addCheck()

and finally build requisite internal structures by calling

    SatfuncConsistencyChecks<Scalar>::finaliseCheckSet()

Client code will then run the checks by calling

    SatfuncConsistencyChecks<Scalar>::checkEndpoints()

typically in a loop.  Class SatfuncConsistencyChecks<Scalar> will
count consistency check failures and attribute these to each
individual check as needed.  We also maintain separate counts for
"Standard" and "Critical" failures.  The former will typically
generate warnings while the latter will typically cause the
simulation run to stop.  Individual checks get to decide which check
is "Critical", and client code gets to decide how to respond to
"Critical" failures.

Member function SatfuncConsistencyChecks<Scalar>::reportFailures()
will generate a textual report of the known set of consistency check
failures at a give severity level.

As an internal implementation detail, SatfuncConsistencyChecks uses
"reservoir sampling"
(https://en.wikipedia.org/wiki/Reservoir_sampling) to track details
about individual failed checks.  We maintain at most a fixed number
of individual points (constructor argument).
2024-06-26 12:17:00 +02:00
Bård Skaflestad
26cd7ab993 Move opm/core/props to opm/simulators/utils
The opm/core directory is no longer meaningful, and it contains only
components which might collectively be described as simulator
utilities.
2024-06-25 12:22:09 +02:00
Lisa Julia Nebel
ecf7bd1e52 Test for skipping the ghost entries using Jacobi preconditioner 2024-06-07 14:40:58 +02:00
Tobias Meyer Andersen
9b2f41ad96 Add option to split the matrix into diagonal,
strictly lower and stricly upper part.
Add tests checking that the result matches
the CPU dilu implementation.
2024-06-05 13:35:54 +02:00
Razvan Nane
7a307fafa0 add rocsparseCPR preconditioner 2024-06-04 17:13:13 +02:00
Razvan Nane
74b30e6bba refactor AMG creation as a class 2024-06-04 15:13:54 +02:00
Razvan Nane
3eb87b7b04 refactor rocsparseSolverBackend to allow flexible preconditioner 2024-06-04 12:17:49 +02:00
Razvan Nane
071f009bf3 refactor preconditioner class 2024-06-04 09:47:03 +02:00
Razvan Nane
83b50f08e6 rename opencl files 2024-06-04 06:28:50 +02:00
Razvan Nane
02b76b5309 refactor rocm files 2024-06-04 06:19:28 +02:00
Tobias Meyer Andersen
e9d6b326cc Add HIP support for AMD GPUs
This commits adds cmake functionality that can
hipify the cuistl framework to support AMD GPUs.

Some tests have been written as HIP does not mirror
CUDA exactly.

CONVERT_CUDA_TO_HIP is the new CMAKE argument.
CMAKE version is increased to include HIP
as a language (3.21 required).

A macro is added to create a layer of indirection
that will make only cuistl files that have been
changed rehipified.

Some BDA stuff is extracted to make sure CUDA
is not accidentally included.
2024-05-06 15:56:53 +02:00
Bård Skaflestad
2fcefbd743
Merge pull request #5226 from akva2/avoid_alu_poly
changed: put SupportsFaceTag in separate header
2024-03-11 12:35:26 +01:00
Arne Morten Kvarving
2a91fb4c2f remove unused ebos/eclnewtonmethod.hh 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
fb7c4f6fd2 move ebos/eclproblem.hh to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
6f5d53b20b move ebos/eclgenericproblem.[hh|cc] to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
15339fe02f move ebos/eclproblem_properties.hh to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
57905c1069 move ebos/ecltransmissibility[_impl].[hh|cc] to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
9facaaf816 ebos/damariswriter: move to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
76ccaf45ef ebos/damaris_properties.hh: move to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
1362143e48 move ebos/eclgenericvanguard.[hh|cc] to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
6949abbf0d move ebos/eclbasevanguard.hh to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
9fe969378d move ebos/eclgenericcpgridvanguard.[hh|cc] to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
04ed17ebd0 move ebos/eclcpgridvanguard.hh to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
bc2dd1110e move ebos/eclfluxmodule.hh to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
2d604e12a7 move ebos/eclequilinitializer.hh to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
d717d96590 move ebos/eclthresholdpressure.hh to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
f6475f8c1e move ebos/eclgenericthresholdpressure[_impl].[hh|cc] to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
e6eac2039b move ebos/vtkecltracermodule.hh to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
9d256bc233 move ebos/ecltracermodel.hh to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
3a3881e8d9 move ebos/eclgenerictracermodel[_impl].[hh|cc] to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
a01e1bd902 move ebos/eclsolutioncontainers.[hh|cc] to opm/simulators/flow 2024-03-08 12:39:48 +01:00
Arne Morten Kvarving
eb90588fa9 move ebos/eclmixingratecontrols.[hh|cc] to opm/simulators/flow 2024-03-08 12:39:48 +01:00