Commit Graph
100 Commits
Author SHA1 Message Date
Markus Blatt c1da6a896a Cleanup wellstatefullyimplicit test. 2020-12-07 20:41:24 +01:00
Markus Blatt 44bd18ea78 Used remove_reference_t 2020-12-07 20:41:15 +01:00
Markus Blatt b6c1a1533c Use vector::empty() instead of size() to test for entries. 2020-12-07 20:41:15 +01:00
Markus Blatt 07e676371e Get global index from Well connection instead of computing it. 2020-12-07 20:22:54 +01:00
Markus Blatt 91e951420f [bugfix] Pass references to gatherVectorOnRoot 2020-12-07 15:40:51 +01:00
Markus Blatt 562f9ffd03 Fixes test for WellStateFullyImplicitBlackoil 2020-12-07 15:40:51 +01:00
Markus Blatt fd4db9b933 Only sum rates for owned wells in WellGroupHelpers.
Well rates of distributed wells might be stored on multiple processes
but should be summed only once. Hence only the owner does the
summation with this commit.
2020-12-07 15:40:51 +01:00
Markus Blatt c2f59b0629 Skip temp. reporting of some rates if distributed non-owned wells.
In the end of the report each the report from these wells will
come from another process, anyway.
2020-12-07 15:40:51 +01:00
Markus Blatt 472623d4a3 Output report for distributed wells only on owner.
For this we need to gather the connection data from
both WellState and WellStateFullyImplicitBlackoil.
2020-12-07 15:40:51 +01:00
Markus Blatt 580ef249b3 Skip wells not owned when communicating goup rates. 2020-12-07 15:40:50 +01:00
Markus Blatt 4edca71a1b Correct pressure and pvt region index for distributed wells.
To get this we need to determine which process has the
very first open well connection and use that to broadcast
pressure and pvt region index.
2020-12-07 15:40:50 +01:00
Markus Blatt a9a733ebc1 Make check whether a connection exists work for distributed wells. 2020-12-07 15:20:42 +01:00
Markus Blatt 932e3c8fb9 Use a custom handle for copying doubles for above.
The one previously used is unfortunately protected upstream (not noticed with gcc <=8).
2020-12-07 11:47:09 +01:00
Markus Blatt c164762763 Merge pull request #2965 from akva2/fix_test_build_old_boost
changed: use BOOST_CHECK instead of BOOST_TEST
2020-12-07 11:32:36 +01:00
Markus Blatt 10fd57f37f BlackoilWellModel: Skip capturing this and simulator in lambda
Instead create local variables and capture them.
2020-12-04 13:43:45 +01:00
Markus Blatt 2e5b1c8d54 Use reference for WellInterface::parallel_well_info_ 2020-12-04 13:24:31 +01:00
Markus Blatt eb03712027 Factored out creation of parallel well infos from getLocalNonshutWells. 2020-12-04 13:02:01 +01:00
Markus Blatt 9c17628995 Renamed pinfo to parallel_well_info 2020-12-03 15:34:48 +01:00
Markus Blatt 9cada4a5a5 Fix indentation 2020-12-03 15:29:12 +01:00
Markus Blatt 575120d4f0 Improce documentation a bit. 2020-12-03 15:24:05 +01:00
Markus Blatt c5dd4f4533 Make CommunicateAbove constructor explicit. 2020-12-03 15:12:35 +01:00
Markus Blatt 0126243f02 Utility to communicate above value of a perf of distributed well
This adds an utility that creates a vector of all above values for
the local perforations. For distributed wells this is needed as the
perforation above might live on another processor. We use the parallel
index sets together with the global index of the cells that are
perforated.
2020-12-03 11:10:36 +01:00
Markus Blatt 73919d6136 Support broadcasting value of first perforation for distributed well
This needed to e.g. determine bottom hole pressure, pvt region, etc.
2020-12-03 11:10:36 +01:00
Markus Blatt 317e29d15a Utility for checking connections of distributed well. 2020-12-03 11:10:36 +01:00
Markus Blatt 3d92e41cad Recover prev. iteration count and curves for undistributed wells
Rounding errors for `B.mmv(x,y)` are slightly different from
```
Y temp(y);
B-mv(x, temp);
y -= temp;
```
2020-12-03 11:10:36 +01:00
Markus Blatt 8ee58096ba Make the parallel reduction when applying the Wells.
The B matrix is basically a component-wise multiplication
with a vector followed by a parallel reduction. We do that
reduction to all ranks computing for the well to save the
broadcast when applying C^T.
2020-12-03 11:10:36 +01:00
Markus Blatt 3996967344 Added a class with information and comunicator for parallel wells.
BlackoilWellModel now stores an instance of this class for each
well. Inside that class there is a custom communicator that only
contains ranks that will have local cells perforated by the well.
This will be used in the application of the distributed well operator.

This is another small step in the direction of distributed wells,
but it should be safe to merge this (note creation of the custom
communicators is a collective operation in MPI but done only once).
2020-12-03 09:29:43 +01:00
Markus Blatt fdf6f4244c [bugfix] Do not iterate pass end of perf_data_ in initCompletions
IMHO this might have happened if perf_data_ is empty
or if the last connection is closed. (Discovered while
working on distributed wells but might happen already
before!)
2020-12-01 14:54:48 +01:00
Markus Blatt ab114b2e95 Use WellInterface::perf_data_ to calculate PI.
that simplifies the code a bit and will work with
distributed wells. Previously, we assumed that all
non-shut perforations are stored locally. That does
not hold any more.
2020-12-01 14:11:05 +01:00
Markus Blatt cb49f652db Merge pull request #2943 from atgeirr/use-symmetricdependency-criterion-amg
Use better-suited AMG criterion.
2020-11-26 11:28:31 +01:00
Markus Blatt 19bebcefe2 Broadcast schedule another time after filtering connection on rank 0
Only after rank zero does the filtering the schedule the well
definitions in there are guarateed to have no perforations to inactive
cells. Therefore we broadcast the schedule another time to publish
this to all processes.

Previously, we did the filtering locally on these processes bit that
did also remove perforations to cells that are active globally but
not locally. That seems very hard to work with when allowing
distributed wells.
2020-11-24 22:46:49 +01:00
Markus Blatt b21b6cf28c Merge pull request #2914 from ducbueno/rm-oclcontainer
Removed WellContributionsOCLContainer class
2020-11-19 21:27:55 +01:00
Markus Blatt fb5f2eb9d0 StandardWell only assing primary_variables_[WQTotal] once.
There seems to be no need to assign the same value consecutively
as often as there are phases.
2020-11-19 19:50:01 +01:00
Markus Blatt d8eaef3271 Fixed and updated comment 2020-11-19 15:29:45 +01:00
Markus Blatt 46cb9012c0 Do not filter connections on the schedule of the loadbalanced grid.
It would remove perforated cells from wells that cross the local
domain's border. That would make it impossible to figure out the
first connection. In addition we would not be able to check that
the connections exist (as rank 0 would have the complete information
-> inconsistency).
2020-11-19 15:29:45 +01:00
Markus Blatt ea3c899080 Merge pull request #2882 from atgeirr/msw-add-well-contrib
Implement addWellContributions() for multi-segment wells
2020-11-18 13:44:24 +01:00
Markus Blatt 991e73048a Merge pull request #2926 from OPM/consistent-pvt-for-groups
Use consisten pvt region index for groups in parallel.
2020-11-17 16:56:49 +01:00
Markus Blatt 41843f2667 Use consistent pvt region index for groups in parallel.
In serial we use the first cell of the first well to determine the
pvt region index for a group. Previously, we used the first cell of
the first local well in a parallel run. Unfortunately that may lead
to different pvt region indices being used for the same goup on
different processes.

We fix this by using the same approach in parallel as we already use
in serial. For this we use Well::seqIndex() to determine the needed
ordering.
2020-11-17 12:54:45 +01:00
Markus Blatt 09a4a04c22 Merge pull request #2896 from atgeirr/refactor-well-calc
Refactor well calculations
2020-11-17 09:40:19 +01:00
Markus Blatt 64fa5a2b30 Merge pull request #2858 from Tongdongq/ilu-reorder-strategy
Added cmdline parameter --ilu-reorder-strategy
2020-11-17 09:35:12 +01:00
Markus Blatt 0dcfc60363 Merge pull request #2912 from totto82/polyhedrealgrid
Make a flow version that uses the polyhedreal grid
2020-11-16 17:04:38 +01:00
Markus Blatt d6e2e87efc WellInterface::initComletions: stop relying on open connections being local.
Instead use the perforation data to add the correct indices.
2020-11-12 17:22:36 +01:00
Markus Blatt 049aaad326 Adds original ECL index of well connection to PerforationData
and use it in the WellInterface instead of creating a vector
with these indices there. The original approach recreates
information in another path of the well and assumes that all
connections are in a process's local partition. That assumption
does not hold any more for distributed wells.
2020-11-12 17:21:37 +01:00
Markus Blatt 010ff83f26 Use functor iterating container when communicating group rates.
Makes the code more compact.
2020-11-12 16:28:36 +01:00
Markus Blatt d83ae17e5b Always accumulates data in AMG to 1 process on coarse levels.
In OPM the matrix graph might be unsymmetric as we do not store
the full sparsity pattern for copy rows but only the diagonal.
Unfortunately, DUNE assumes that matrices from finite elements and
finite volumes have a symmetric sparsity pattern for copy rows to
and uses this assumption to create the graphs for PTScotch/ParMETIS
more easily. But PTScotch/ParMetis assume a symmetric graph.
2020-11-03 22:13:27 +01:00
Markus Blatt 4f1bed2890 Merge pull request #2895 from akva2/janitoring
fix typo
2020-11-03 15:22:04 +01:00
Markus Blatt 320cf46a5f Merge pull request #2857 from blattms/fix-nvcc-umfpack-compilation
Fixes compilation of CUDA.
2020-10-15 11:50:28 +02:00
Markus Blatt 44fadfb88a Fixes compilation of CUDA.
nvcc exits compilation if the header dune/istl/basearray.hh (form DUNE
2.6) is included as it does not seem to understand the friend declaration
there (friend class for a struct).

```
/usr/include/dune/istl/basearray.hh:101:49: error: ‘typename Dune::Imp::base_array_unmanaged<B, A>::RealIterator’ names ‘template<class B, class A> template<class T> struct Dune::Imp::base_array_unmanaged<B, A>::RealIterator’, which is not a type
       friend class RealIterator<const ValueType>;
                                                 ^
```
2020-10-14 19:23:57 +02:00
Markus Blatt 884e02c0e2 Merge pull request #2848 from atgeirr/unify-linsolve-only
Unify linear solvers
2020-10-13 08:09:27 +02:00
Markus Blatt ba1bc7c23c Added BlackoilWellModel::getLocalNonshutWells to reduce code duplication. 2020-10-09 15:27:09 +02:00
Markus Blatt 5553d2d1f3 Renamed variables/functions for number of cells. 2020-10-05 20:02:13 +02:00
Markus Blatt f791884639 Used std::distance instead of manual for-loop. 2020-10-05 14:31:48 +02:00
Markus Blatt ca8de16285 Fixes parallel computation of average formation factors.
This was using the sum of the sum of all cells of the partitions.
Hence the shared cells were counted twice.
2020-10-05 14:08:59 +02:00
Markus Blatt ec884183a5 Merge pull request #2828 from blattms/add-mswells
[opencl] deletes assignment operator of WellContributionsOCLContainer
2020-10-01 22:35:09 +02:00
Markus Blatt e8c030be17 Merge pull request #2821 from ducbueno/add-mswells
Reintroduced multisegment wells to OpenCL backend
2020-10-01 21:52:25 +02:00
Markus Blatt 1109aeecfc Merge pull request #2825 from blattms/dune-2.7-fixes
Fixes compilation with DUNE 2.7
2020-10-01 16:30:18 +02:00
Markus Blatt 903cde5568 Merge pull request #2820 from atgeirr/serial-partitioning
Add command line parameter --serial-partitioning.
2020-10-01 16:09:49 +02:00
Markus Blatt 684b58564c use auto in for-loop as at other occasions. 2020-10-01 15:56:50 +02:00
Markus Blatt f306f78737 Delete assignment operator of WellContributionsOCLContainer, too 2020-10-01 15:55:57 +02:00
Markus Blatt 6e1f729e8d Work around MPIGuard which is broken in DUNE 2.7.0
Otherwise compilation aborts with:

flow_ebos_gasoil.cpp:(.text+0xa5d0): multiple definition of `Dune::GuardCommunicator::create(ompi_communicator_t* const&)';
2020-09-30 20:34:36 +02:00
Markus Blatt d30f6d272b [gpu] Support UMFPack with DUNE 2.7
The index type changed from int to long int with 2.7.
2020-09-30 20:10:21 +02:00
Markus Blatt acf5ea2663 Merge pull request #2823 from akva2/janitoring
remove unused variables
2020-09-30 13:43:52 +02:00
Markus Blatt c26aefdd5b Merge pull request #2816 from ducbueno/new-opencl-stdwell
New standard well implementation for the OpenCL backend
2020-09-30 09:32:19 +02:00
Markus Blatt 3a41c78114 Merge pull request #2811 from akva2/python_binding_reuse
changed: reuse objects if building python inline
2020-09-29 15:57:13 +02:00
Markus Blatt 1d94357558 Refactored how well information is exported after load balancing.
Previously, we exported an unordered map containing all names of
wells that are not present in the local part of the grid.

As we envision to have wells that are distributed across multiple
processors, this information does not seem to be enough. We need
to be able to set up communication for each well. To do this we need
to find out who handles perforations of each well.

We now export a full list of well name together with a boolean
indicating whether it perforates local cells (vector of pair of string
and bool).
2020-09-22 20:04:01 +02:00
Markus Blatt 779c7f6012 Merge pull request #2793 from blattms/fix-tran-application
Fixes application of transmissibility modifiers from the edit section.
2020-09-22 19:56:16 +02:00
Markus Blatt a4ea6e9658 Merge pull request #2792 from atgeirr/fewer-mpi-sums
Rewrite communicateGroupRates() to do a single sum().
2020-09-22 07:51:34 +02:00
Markus Blatt e5f4971d58 CentroidsPropsDatahandle Use emplace_back for saving pair 2020-09-21 21:30:51 +02:00
Markus Blatt 99f74cad96 FieldData and TranCalculator are now in Fieldprops namespace. 2020-09-18 15:01:17 +02:00
Markus Blatt abff765c1d Also query unsupported field data for the TransCalculator.
FiedlPropsManager::keys() list the FieldProperties needed by the
TransCalculator, but these cannot be queried the normal way as this
raises exceptions and results in a deadlock. Hence we use the new
funtionality to get also the unsupported ones, by passing true to
get_double_field_data.
2020-09-17 22:23:04 +02:00
Markus Blatt fd2a0d8a7d Deserialize TranCalculator also on master 2020-09-17 20:28:17 +02:00
Markus Blatt 6d8621e4df Use TranCalculator to update transmissibilities. 2020-09-17 20:28:17 +02:00
Markus Blatt 5987eae7d5 Add TranCalculator functionality to ParallelFieldPropsManager 2020-09-17 19:49:38 +02:00
Markus Blatt 9b997aea8c Use FieldData in ParallelEclipseState.
We will need the values_status for the TranCalculator in parallel.
2020-09-17 19:49:38 +02:00
Markus Blatt 58fdf300df Use std::exit(EXIT_FAILURE)
Somehow this reappeard druing refactoring.
2020-09-15 08:36:20 +02:00
Markus Blatt cd74796004 Refactored to only check once for errors in parallel.
This simplifies the code a lot (less `#if HAVE_MPI`) and there seems
to be not reason not to.
2020-09-15 08:27:04 +02:00
Markus Blatt d413a2c960 Perform checkArrayDimension only on rank 0. 2020-09-15 08:26:23 +02:00
Markus Blatt 921e154972 use EXIT_FAILURE to indicate problems whem exiting. 2020-09-14 19:17:55 +02:00
Markus Blatt 519e4ac002 Improves error handling and reporting in parallel.
As the ErrorGuard also dumps warnings we now always dump
it (previously only on error) to get these messages in the
console.

If there are error encountered, we log a meaningful error
message (the real cause was missing previously) and do a
graceful exit after MPI_Finalize.
2020-09-14 12:53:02 +02:00
Markus Blatt c2362daae9 reactive applyMultipliers_(trans, outsideFaceIdx, ..) for PINCH(5)=ALL
Should make the tests succeed.
2020-09-10 10:20:17 +02:00
Markus Blatt 06827bdd17 Apply only MULTZ+ in applyAllZMultipliers_, prepare for PINCH(5)=TOP
For PINCH(5)==ALL, we take the minimum of MULTZ+ and ignore MULTZ-.
We also prepare for PINCH(5)==TOP taking only the toplevel MULTZ+
value.

For non-vertical directions we use both MULTZ+ and MULTZ-
2020-09-10 09:12:34 +02:00
Markus Blatt d2a2d5074d Rely on insideCartElemIdx<outsideCartElemIdx in allpyAllZMultipliers_
and simpily code under that assumption.
2020-09-09 21:41:52 +02:00
Markus Blatt ee6044b2e0 Fixes determining whether index of summary keyword is on process.
We used a method isGlobalIdxOnThisRank to determine whether to write
an entry for a summary keyword (like BPR). Unfortunately, this did
exactly what the name suggested, but we actually passed a cartesian
index to it. That meant that a lower cartesian index might have found on
many processes (with different cartesian index and hence resulting in
wrong values), while higher for ones no process would have been found
with it (resulting in writing zeros).

With this commit we store a sorted list of cartesian indices and query
that in the renamed and restructured function isCartesianidxOnThisRank.

Most probably this broke during refactoring.

Closes #2665
2020-09-08 20:44:27 +02:00
Markus Blatt 11f9eb9d88 Base face processing decision of faces on cartesian indices
This will process the same faces in serial and parallel.
Hence it make the silent assumption that we only process faces
from low cartesian index to high cartesian index hold again.

This should fix PINCH MULTZ ALL in parallel.
2020-09-08 11:10:31 +02:00
Markus Blatt 578ca0a725 Fixed unused variable warning. 2020-09-07 16:42:01 +02:00
Markus Blatt c21f1e72f8 Prevent another copy of cell to region mapping in RateConverter.
RateConverter itself already copies this and offers the mapping.
With this commit we just use that.
2020-09-07 15:36:07 +02:00
Markus Blatt 53005c477d Merge pull request #2762 from ducbueno/opencl-stdwell-clean
Fixed out of resources problem
2020-09-03 19:50:39 +02:00
Markus Blatt 3ee0db8cf4 Merge pull request #2760 from atgeirr/inform-user
Use log mechanism for info output
2020-09-03 17:15:00 +02:00
Markus Blatt ba8782eeca Merge pull request #2761 from akva2/fix_flexible_serial
fixed: use the proper linear operator without wells in matrix in serial
2020-09-03 17:08:40 +02:00
Markus Blatt d51b4a53e8 Merge pull request #2758 from atgeirr/reinstate-lost-features
Reinstate lost logging of header and parameters.
2020-09-03 15:08:55 +02:00
Markus Blatt 5193b0c90e Merge pull request #2756 from blattms/fix-opencl-shadowing-warnings
[opencl] Fixes shadowing variable warnings.
2020-09-02 22:51:28 +02:00
Markus Blatt 27931c4303 [opencl] Fixes shadowing variable warnings.
These seemed familar and I would have sworn that I already fixed them
somewhen. Might have been reintroduced by rebasing.
2020-09-02 22:46:44 +02:00
Markus Blatt e997d7b130 Merge pull request #2751 from ducbueno/opencl-stdwell-clean
AddStandardWell functionality in OpenCL backend
2020-09-02 22:02:05 +02:00
Markus Blatt 70805ca1d4 Merge pull request #2728 from blattms/fix-parallel-rebased
Fix parallel ebos
2020-08-27 10:54:14 +02:00
Markus Blatt 944b646092 Add WELLDIMS to datafile of test_ecl_output.
Somehow the checking is now stricter for the tests due to
the changes in eclbasevanguard. Fixes test failures of
test_ecl_output.
2020-08-27 09:05:09 +02:00
Markus Blatt 410ad3bc82 Only setup message limiter if logger is actually there.
Needed for test_ecl and test_ecl_output.
2020-08-27 09:05:09 +02:00
Markus Blatt 2b557a42ff Make unique_ptr instantiation exception safe for the kids in readDeck. 2020-08-27 09:05:09 +02:00
Markus Blatt 322bc8d9cc only check deck on process 0 2020-08-27 09:05:09 +02:00
Markus Blatt c958034d26 Adapt and use readDeck from EclipseBaseVanguard, too.
This reduces code duplication ad should fix the bad_cast exception
when running ebos in parallel.
2020-08-27 09:05:09 +02:00
Markus Blatt 575245d785 Factored out logging setup and deck reading from class Main.
These codes are reimplemented in the ebos simulator and should
be reused, instead. This commit factilitates this and starts
reusing the logging setup code in ebos. Hence reduces code duplication.
2020-08-27 09:05:09 +02:00