Commit Graph
100 Commits
Author SHA1 Message Date
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
Markus Blatt 6b3c6cd7f1 Remove EclBaseVanguard::internal*_ variables.
Before this we had a set of external*_ variabales (unique_ptrs), a set of
internal_*_ variables (unique_ptrs) and another set of pointers that
point to the pointers actually used. That seemed a bit much. With this
commit skip the internal variables and use unique_ptrs for all
others. In the constructor either the external*_ gets moved or the
objects are directly created as unique_ptrs.
2020-08-27 09:05:09 +02:00
Markus Blatt 1300139eea Use make_unique to create unique_ptrs with exception safety. 2020-08-27 09:05:09 +02:00
Markus Blatt 75104fd310 Move to more consistent ownership of ECL data in EclBaseVanguard
We resort to consistently use unique_ptrs in EclBaseVanguard for
the data read from ECL files or set externally. This means that
during the simulation EclBaseVanguard owns this data and not Main
or the ebos setup functions. This ownership transfer becomes
transparent due to std::move.

This came up when trying to fix the parallel runs of ebos and during
that removing some code duplication.
2020-08-27 09:05:09 +02:00
Markus Blatt 83bfd4edfc Merge pull request #2738 from akva2/more_macro_replacement
More macro replacement
2020-08-27 08:46:25 +02:00
Markus Blatt d55628bd8d Merge pull request #2739 from blattms/fixed-relaxed-tol-logic
Finally fix selection for relaxed tolerance.
2020-08-27 08:38:32 +02:00
Markus Blatt bee46ed309 Finally fix selection for relaxed tolerance.
Default values are MaxStrictIter=8 and RelaxedPvFraction=1.0.
To activate relaxed pv fraction set MaxStrictIter to 0 and
fraction below 1.
2020-08-26 15:42:27 +02:00
Markus Blatt 92b1708433 Use reference to ebos residual to prevent copying. 2020-08-25 14:07:27 +02:00
Markus Blatt 49ed3d6468 Removes rest of the commented out code introduced with applyUMFPack. 2020-08-20 10:17:33 +02:00
Markus Blatt cca38ddc36 Fixed spelling in error message. 2020-08-20 10:17:26 +02:00
Markus Blatt efe17780e2 Reinforce maxStrictIter for the newton.
That was removed before in lieu of the fraction of cells that
violate CNV.
This change should make the results as before unless somebody changes
maxStrictIter or RelaxedMaxPvFraction
2020-08-19 14:42:40 +02:00
Markus Blatt 94eb0d5ffe Fixes method name in throw message. 2020-08-19 08:11:50 +02:00
Markus Blatt 0c0be3a941 Reset duneDSolver only once. 2020-08-18 17:55:50 +02:00
Markus Blatt ae8e2fb8c2 Removed commented out code from MSWell. 2020-08-18 17:55:50 +02:00
Markus Blatt e96c4a9908 Removed unused method invDXDirect. 2020-08-18 17:55:50 +02:00
Markus Blatt 7261759065 Reuse UMFPack decomposition whenever possible.
We hold a shared pointer to the umpfack solver that gets reset
whenever the matrix is changed. When applying the decomposition
we will be recomputed if the solver pointer is null.
2020-08-18 17:55:50 +02:00
Markus Blatt ce409737fe Allow applyUMFPack to decompose if needed. 2020-08-18 17:55:50 +02:00
Markus Blatt a011244d9c refactored invDxDirect to allow for reusing the decomposition. 2020-08-18 17:55:50 +02:00
Markus Blatt f65eca3310 Use RelaxedMaxPvFraction 0 for now.
This should make the tests work.
2020-08-18 16:57:16 +02:00
Markus Blatt e040484580 relaxed tolerance for CNV if only small fraction of PV is violated
Previously we used relaxed tolerance once a certain number of Newton
steps was exceeded. Now we check for all cells violating CNV locally
and if their pore volume is less than a certaun fraction (default 3%)
we use the relaxed tolerance (default: 1e9)

Original idea originated from Norce.
2020-08-18 16:57:16 +02:00
Markus Blatt c1effde738 Merge pull request #2722 from blattms/fix-reorder-ilu0-opencl
[OpenCL] Fixes out of bounds read in reordering code in ILU0.
2020-08-07 18:09:12 +02:00
Markus Blatt 5743a979e3 Formatting: added missing space. 2020-08-07 09:38:10 +02:00
Markus Blatt 8d3eac81a5 [OpenCL] Fixes out of bounds read in reordering code in ILU0.
rowPerColor only has size numColors!
2020-08-05 21:22:01 +02:00
Markus Blatt da40f0200e Merge pull request #2720 from blattms/correctly-free-cuda-mem-for-ms
Also free memory allocated with CUDA later with CUDA
2020-08-04 13:50:33 +02:00
Markus Blatt c28a12636a Also free memory allocated with CUDA also with CUDA
With multisegment wells we allocate WellContributions::hx and hy with
`CudaMallocHost`. Yet we tried to deallocate them with
`delete[]`. This caused segementation faults e.g. for
model1/MSW_MODEL_1. Now we use `CudaFreeHost` for freeing if we used
CUDA.

Closes #2719
2020-08-04 12:54:27 +02:00
Markus Blatt 6c1f8bd872 Merge pull request #2707 from blattms/fix-opencl-warnings
Fix some warnings in the OpenCl Solver.
2020-07-21 14:18:26 +02:00
Markus Blatt 13ff454e56 Remove unused variable groups from BlackoilWellModel::wellsToState.
Alternatively it could be marked as [[maybe_unused]] if it will be
used sometime in the future.
2020-07-21 11:35:43 +02:00
Markus Blatt f37fa8bbd9 Prevent unused variable warnings without CUDA in WellContributions. 2020-07-21 11:24:19 +02:00
Markus Blatt 59064b4ac2 Prevent warning about shadowing dim_wells and dim. 2020-07-10 13:40:38 +02:00
Markus Blatt efd3aeb290 Catch exceptions by const reference to prevent warnings.
e.g. gcc issued: "warning: catching polymorphic type ‘class cl::Error’ by value [-Wcatch-value=]"
2020-07-10 13:40:38 +02:00
Markus Blatt faaee51d09 Merge pull request #2682 from Tongdongq/openclSolver
Added openclSolver
2020-07-10 13:38:32 +02:00
Markus Blatt 7a571c98db include missing header for OpenCLSolver with g++-8.3
Without I got compilation errors.
2020-07-07 11:10:19 +02:00
Markus Blatt c01e6d14f7 Merge pull request #2694 from atgeirr/flexible-wellop
Allow well operators with FlexibleSolver.
2020-07-01 20:30:44 +02:00
Markus Blatt 27c9ed5c85 Consistently use ISTLSolverEbos::getMatrix to get correct matrix. 2020-06-24 15:37:43 +02:00
Markus Blatt 27ace20378 [bugfix] remove redundant copyjacToNoGhost in ISTLSolverEbos::solve
It uses a null pointer and make flow segfault. The copying is already
done in ISTLSolverEbos::prepare.
2020-06-24 15:25:24 +02:00
Markus Blatt 2e9cfffea6 Fix TRANXYZ for problems with less than 3 dimensions.
Up to now We always assumed that cardDims[i]>1 holds. which it does for most
of the cases. But when e.g. simulating a vertical stack of 5 cells
flow would report the transmissibilities in the Z direction in TRANX
and output TRANZ as zero. Similar problems should be there for 2D grids.

With this commit we actually check whether there can be neighbours in
the X and Z direction to prevent this behavior.
2020-06-15 10:40:26 +02:00
Markus Blatt b1adbd45cb Merge pull request #2663 from akva2/fix_timestamp_gen
fixed: fix parallel builds
2020-06-09 17:31:25 +02:00
Markus Blatt c57a901e51 Merge pull request #2650 from blattms/prevent-deadlock-after-parsing
Prevent deadlock after parsing if there were error in parallel
2020-06-04 12:24:44 +02:00
Markus Blatt 9870206c53 flow --help|--print-properties=1|--print-parameters=1} returns 0
Previously (in this PR) they returned an error code.
2020-06-03 16:49:29 +02:00
Markus Blatt 2457133ebf Use MPI_Abort to make flow return nonzero error codes in parallel.
The previously used MPI_Finalize might have resulted in returning
zero even if there were problems.
2020-06-03 16:48:50 +02:00
Markus Blatt f8201e5a94 Catch parser errors in parallel and abort.
Previously only the master process was aware of the error and flow did
deadlock in parallel runs if there were parser errors
encountered. With this commit all processes are made aware of the
problem and flow aborts with an error code.
2020-06-03 11:14:57 +02:00
Markus Blatt 0ad9bc5465 Merge pull request #2633 from blattms/require-umfpack
Mark SuiteSparse as required.
2020-05-28 11:49:03 +02:00
Markus Blatt 55b3a65230 Merge pull request #2628 from Tongdongq/multisegmentwells-gpu
cusparseSolver can now handle MultisegmentWells
2020-05-22 16:24:58 +02:00
Markus Blatt 1be2bc7e77 Mark SuiteSparse as required.
It is used unconditionally in the multisegment well code.
2020-05-20 14:58:44 +02:00
Markus Blatt 74936c3239 Skip exception for unset verbosity, use fallback for default solvers
boost::property_try::get without a defaults throws an exception. As
result the nonlinear solver and timestepper think that there is a
problem with solving and chop the timnestep until they give up.

This commit fixes this by using a default and falling back to the
command line specified value for the default solvers.
2020-05-18 08:33:49 +02:00
Markus Blatt b887492285 Write out the linear system when ultra high verbosity is requested.
This added to ISTLSolverEbosFlexible and should be available form
ISTLSolverEbos for consistency reasons, too. Done with this commit.
2020-05-15 16:21:48 +02:00
Markus Blatt e812eb132a Merge pull request #2625 from blattms/modify-cpr-defaults
Modify cpr defaults (for better performance)
2020-05-15 14:07:36 +02:00
Markus Blatt 712f576b36 Default to trueimpes as this seems slightly faster for Norne. 2020-05-15 12:41:25 +02:00
Markus Blatt 6635c8c7cd Actually honor CprMaxEllIter
instead of always overwriting it with 1.
2020-05-15 12:40:17 +02:00
Markus Blatt 65fceb34c1 Delete superfluous second setting of trueimpes.
It is already set in the if-else above.
2020-05-15 12:38:41 +02:00
Markus Blatt 92d4f77896 Merge pull request #2617 from blattms/gpu-fallout-pr-2608
Fix Gpu fallout pr 2612
2020-05-13 19:31:43 +02:00
Markus Blatt 50cbe9a09e Use "trueimpes" for weight_type for configuration cpr_trueimpes.
Previously, we always used quasiimpes.
2020-05-13 17:00:36 +02:00
Markus Blatt 76e710df97 Simplify intstantiation of BDABridge template members
with a macro and stripping unneeded template members.
2020-05-13 16:29:36 +02:00
Markus Blatt 85fffee06e Pass a mutable matrix to BdaBridge::solve_system
That function will overwrite zero diagonal values with small nonzero ones.
2020-05-13 16:28:15 +02:00
Markus Blatt d54268513e Add getMatrix() const method needed for GPU solvers.
Somehow I missed testing with CUDA.
2020-05-13 15:33:34 +02:00
Markus Blatt 46ab154396 Merge pull request #2615 from atgeirr/split-files
Split file to ensure correct authorship and license is applied.
2020-05-13 15:02:54 +02:00
Markus Blatt 90a0e2b392 Merge pull request #2613 from blattms/use-correct-matrix
Use correct matrix for scaling and get rid of unused preconditioner matrix member
2020-05-13 14:54:07 +02:00
Markus Blatt f6b4a4396e Merge pull request #2614 from blattms/clean-hnil-fix
Fixed unitialized value for ILU when using flexible solvers.
2020-05-13 14:40:02 +02:00
Markus Blatt 664e582b5f [bugfix] Use correct matrix for scaling.
For some of the scaling approaches the wrong matrix (dereferenced
nullptr) would have been used which should have resulted segmentation
faults. With this commit we add a method getMatrix() that returns the
correct one and use that for scaling.
2020-05-13 13:38:02 +02:00
Markus Blatt 9f278db5a6 Removes additional member for matrix used by the preconditioner.
Somehow that approach went missing in action and it is always the
same as the assembled matrix. Hence no need for that member anymore
and we remove it to prevent confusion.
2020-05-13 13:38:02 +02:00
Markus Blatt 1e56b8f907 Merge pull request #2608 from blattms/merge-cpr-legacy
Make flexible solvers and CPR accessible for flow binary.
2020-05-13 13:20:23 +02:00
Markus Blatt 7ed960b6d1 Use normal pointer to assembled matrix. 2020-05-13 12:23:20 +02:00