Commit Graph
100 Commits
Author SHA1 Message Date
Markus Blatt 906c3036c4 Merge pull request #3110 from blattms/external-fmtlib-2
Enable usage of fmtlib on the system.
2021-03-15 13:26:34 +01:00
Markus Blatt 6766f2f81e Enable usage of fmtlib on the system.
If fmtlib is present on the system we used that one
in the normal mode (not header only). Otherwise we
fallback to the embedded one header only.
Searching for the library is done on opm-common.
2021-03-11 20:03:00 +01:00
Markus Blatt 3ec181e231 Merge pull request #3089 from Tongdongq/exact-ilu-decomp-gpu
Exact ilu decomp gpu
2021-03-08 17:25:04 +01:00
Markus Blatt d1f65451f1 Honor top most group efficiency factor in checkGroupConstraints{Inj,Prod} 2021-03-02 11:32:27 +01:00
Markus Blatt 0d2b9629b0 Document efficiencyFactor in checkGroupConstraints{Inj,Prod}
Reading recursion is quite hard and a comment might help others.
2021-03-02 11:31:04 +01:00
Markus Blatt 39546864ab Honor GEFAC of topmost group when summing solvent rates. 2021-03-01 11:16:29 +01:00
Markus Blatt 6e8b1e8d2e Honor gefac of topmost group in WellHelpers::updateGuideRateForGroups 2021-03-01 11:16:29 +01:00
Markus Blatt 1d9f13e310 Honor GEFAC for the top most group when calculating well phase rates.
Previously GEFAC was not applied here.
2021-03-01 11:15:57 +01:00
Markus Blatt 1ce5c59851 Honor GEFAC for top group in get{Injection,Production}Controls. 2021-03-01 10:26:40 +01:00
Markus Blatt 0644fba01b Merge pull request #3088 from joakim-hove/use-active-index
Use active index
2021-03-01 09:22:25 +01:00
Markus Blatt d693c3da42 Merge pull request #3050 from joakim-hove/actionx-welpi
Support combination of ACTIONX and WELPI
2021-02-18 22:09:16 +01:00
Markus Blatt fd7c4e3d24 Merge pull request #3053 from totto82/fixBoundaryMPI
fix boundary face index on process boundaries
2021-02-11 09:07:19 +01:00
Markus Blatt 21676d2645 Merge pull request #3051 from blattms/support-non-gpu-devs-opencl
Allow usage of non-gpu devices with OpenCL.
2021-02-10 19:48:54 +01:00
Markus Blatt 00df3d06c2 Allow usage of non-gpu devices with OpenCL.
This is needed to use the CPU backend of PoCL http://portablecl.org/
which seems handy for debugging.
2021-02-09 10:45:19 +01:00
Markus Blatt 7862f7d56d Merge pull request #2991 from Tongdongq/fgpilu_cpu_gpu
Added CPU and GPU implementations of Fine-Grained Parallel ILU (FGPILU)
2021-02-09 10:35:12 +01:00
Markus Blatt 009feaa35d Merge pull request #3044 from GitPaean/correcting_threading_output
correcting the output of the number of threads
2021-02-04 14:31:03 +01:00
Markus Blatt 0238a80b02 Merge pull request #3032 from blattms/test-spe9-distributed-wells
Support external loadbalancers in EclCpGridVanguard
2021-02-02 11:21:40 +01:00
Markus Blatt 67fc95c340 Merge pull request #3029 from blattms/activate-distributed-wells
Activate distributed wells in the simulator
2021-02-02 09:40:08 +01:00
Markus Blatt 1af403c45d Merge pull request #3037 from totto82/resetIter
reset the iteration count in the newtonSolver
2021-01-29 08:33:17 +01:00
Markus Blatt 143ae344f5 Split error message into multiple lines 2021-01-28 16:43:24 +01:00
Markus Blatt 2d23b01da8 Restrict property/type tag changes to eclbasevanguar.hh 2021-01-27 14:41:10 +01:00
Markus Blatt 65eb65cfaf Added test for distributed wells when loadbalancing along z-axis only. 2021-01-27 10:25:16 +01:00
Markus Blatt 9ccc953bf0 Add a flow executable that only distributes cells in z-direction.
Executable is named flow_distribute_z and uses the external
loadbalancing information. It can be used to test the distributed
standard wells on SPE9 with 4 or more processes.
2021-01-26 21:27:39 +01:00
Markus Blatt e1e1ff9a17 Added support for external load balancer to EclCpGridVanguard.
You can use EclCpGridVanguard::setExternalLoadBalancer() to
set an external funtion that creates a vector of integers (containing
the partition for each cell) from the grid. If it is set then this
information will be used for loadbalancing, otherwise ZOLTAN.
2021-01-26 21:12:04 +01:00
Markus Blatt ac1757d2c0 Corrected use of typetag system to make the tests compile.
This meant introducing another version of the TAG for the
grid.
2021-01-25 15:05:24 +01:00
Markus Blatt f464d93f15 Activate distributed standard wells.
We introduce a new parameter --enable-distributed-wells=<true|false>
for this. During startup we check that the model either only has
standard wells or that multisegement wells are actively interpreted
as standard wells (by way of passing --enable-multisegment-wells=false
as an option).
2021-01-25 15:05:24 +01:00
Markus Blatt c037bd762d Merge pull request #2990 from atgeirr/testing-precfactory-operators
Only add AMG preconditioners to factory if sensible.
2020-12-22 09:52:53 +01:00
Markus Blatt ef6c953e0f [bugfix] Fix partial sum
the total number of entries gathered was computed wrong, and we wrote
out ouf memory.
2020-12-18 14:48:19 +01:00
Markus Blatt 5b943761d7 Fixes StandardWell::computeConnectionDensities.
This computation is serial and needs a complete representation
of data attached to all preforations (even those stored on
another process). This commit uses the newly created factory to
correctly compute the connection densities for distributed wells.
2020-12-18 14:48:19 +01:00
Markus Blatt 69fd6495c0 Added factory to construct the global representation of perf data.
Some of our computations are heavily serial and need a complete
representation of the data attached to all perforation no matter
whether a perforation lives on the local partition or not. This commit
adds a factory that allows to easily create such a representaion and
helps writing data back to the local representation.
2020-12-18 14:48:19 +01:00
Markus Blatt 53b51eeba7 Use int as global index type in IndexSet
That is what seems to be used by ECL schedule, too.
2020-12-18 14:48:19 +01:00
Markus Blatt 4dff6fb168 Fixes StandardWell::updateProductivityIndex for distributed wells. 2020-12-18 14:48:19 +01:00
Markus Blatt 12f5a6aaff Fixes StandardWell::allDrawDownWrongDirection for distributed wells. 2020-12-18 14:48:19 +01:00
Markus Blatt a9c327b321 refactored ParallelWellInfo test code for further testing. 2020-12-18 14:48:19 +01:00
Markus Blatt ba1feadb63 Added missing parallel reduction to computeCurrentWellRates.
This is supposed to be summation over values at all perforations.
Hence, it needs a parallel sum.
2020-12-18 14:48:19 +01:00
Markus Blatt fc4a7fa3c1 Fixes StandardWell::updateIPR for distributed wells.
Of course the summation needs to be over all perforations of the
wells, no matter where they reside. Hence we need communication.
2020-12-18 14:48:19 +01:00
Markus Blatt c09797355d Sum well rates in computeWellRatesWithBhp for distributed wells.
This needs summation over all procs that share the well as it needs
information from all perforations. Some of them might reside on other
processes.
2020-12-18 14:48:19 +01:00
Markus Blatt 065e2f34f1 Do not include config.h in header (not even in *_impl.hpp)
I was getting warnings about redefined definitions (e.g. HAVE_PARMETIS).
2020-12-11 17:53:24 +01:00
Markus Blatt 924bf5ed19 Use old style traits class approach to check for face tag support.
Old version failed due to a gcc compiler
bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77446 with error:
"non-constant condition for static assertion"
2020-12-11 17:39:55 +01:00
Markus Blatt 9097907857 Merge pull request #2983 from blattms/stdwell-comm-works-on-spe9-2
use random access to simplify code at second occasion
2020-12-11 17:00:07 +01:00
Markus Blatt fa83ed2fdc use random access to simplify code at second occasion 2020-12-11 14:25:56 +01:00
Markus Blatt 354ae1f319 Merge pull request #2976 from blattms/stdwell-comm-works-on-spe9
Make distributed standard well work on SPE9.
2020-12-11 13:43:03 +01:00
Markus Blatt b4ed86313e use random access to simplify code during partial_sum of dist wells 2020-12-11 11:24:51 +01:00
Markus Blatt 02bab0957d Merge pull request #2982 from totto82/fixPot
move the try-catch inside the compute potential loop
2020-12-11 11:24:21 +01:00
Markus Blatt d7ae211729 Also test ParallelWellInfo with an MPI run if possible. 2020-12-10 11:32:52 +01:00
Markus Blatt c0c1897ea9 Fix computeConnectionPressureDelta for distributed wells.
As this is as sequential (ordering matters!) as it can get we need to
communicate all perforations, do the partial sum with them and save
result back to the local perforations.
2020-12-10 11:32:52 +01:00
Markus Blatt 35218bf042 Added possibility to communicate values from perforations below. 2020-12-10 11:06:28 +01:00
Markus Blatt 3c66b729e1 Fixes perf rate initialization for distributed wells. 2020-12-10 11:06:28 +01:00
Markus Blatt 1d9d04161d Use std::partial_sum to calculate displacements. 2020-12-09 12:30:48 +01:00
Markus Blatt b97385c963 Fix and move changes to commented code to code to WellGroupHlper.hpp 2020-12-09 12:29:56 +01:00
Markus Blatt 4f93b2b7c6 Include config.h in WellGroupHelpers.cpp
as should be done in all cpp files.
2020-12-08 21:21:02 +01:00
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 f7ed1b21fa Determine pressure and depth above for distributed wells. 2020-12-07 16:32:33 +01:00
Markus Blatt 6f4fa114c1 barrier before and after MPI_Broadcast in non-production runs.
This helps with debugging as for some OpenMPI versions communication
might interfere with other communications if there are bugs.
2020-12-07 16:32:33 +01:00
Markus Blatt 901327ac54 Cater for empty parts of distributed wells for pvt region index. 2020-12-07 16:32:33 +01:00
Markus Blatt a9df5065ae Use global number of perforations when initializing well.
The local number of perforations is not correct anymore
for distributed wells.
2020-12-07 16:32:33 +01:00
Markus Blatt 0d6c39be2f Fix distributed WellInterface::checkMaxRatioLimitCompletions
Not all connections are local, hence we need a sum across all processes
computing for this well.
2020-12-07 16:32:33 +01:00
Markus Blatt 6eb835c98e Only use connections in the interior for distributed wells. 2020-12-07 16:32:33 +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