Commit Graph
100 Commits
Author SHA1 Message Date
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
Markus Blatt ddd947bf0a Use correct matrix for flexible solver when parallel.
In this case matrix_ is a nullptr and noGhostMat_ is the optimized
matrix to use. Before this commit we experienced a segmentation fault
as the nullptr was dereferenced and passed to the solver.
2020-05-12 19:06:12 +02:00
Markus Blatt 4c72af9546 Make only rank zero honor verbosity in flexible solvers.
Previously all the ranks print linear solver statistics in verbose
mode which cluttered the output in parallel runs. Now only rank 0
will print like it should be.
2020-05-12 18:06:20 +02:00
Markus Blatt 1f177b33e7 Use communicator to decide whether this is a truly parallel. 2020-05-12 12:46:04 +02:00
Markus Blatt 1ff1f24fbb Fix when the matrix with no ghosts will be used. 2020-05-12 12:46:04 +02:00
Markus Blatt e8b79b2b63 Prevent matrix copy in serial run. 2020-05-12 12:46:04 +02:00
Markus Blatt 357469dc21 Only extract overlap and interior information if needed.
That is, if actually set up the additional matrix with no ghosts.
2020-05-12 11:52:19 +02:00
Markus Blatt aa54b4d8db Remove unused weight_filename from json file. 2020-05-12 11:52:19 +02:00
Markus Blatt 47acb6ecb3 Make flexible solvers and CPR accessible for flow binary.
Previously, one had to call a seperate binary called
flow_blackoil_dunecpr. Unforntunately, that was only built if users
requested that the tests (`-DBUILD_TESTING=ON`) and the flow
variants (`-DBUILD_FLOW_VARIANTS=ON`) should be built. In addition
it would use a slightly different nonlinear solver implementation.

With this commit flow can be asked to either use
CPR (`--use-cpr=true --matrix-add-well-contributions=true`) or to use
the flexible solvers bx setting the `--linear-solver-configuration`
option. In all other cases the usual solver implementations are still
used.

Note that the flexible solvers still need
`--matrix-add-well-contributions=true` and hence cannot cope with
multi-segment wells.
2020-05-12 11:52:19 +02:00
Markus Blatt 71b234ec54 Make CprReuseSetup always use same default value.
The default was 0 for flow and 3 for flow_blackoil_dunecpr. Now we
always use 3. This is safe as it will not be used for any other
solvers than the flexible ones.
2020-05-12 11:52:19 +02:00
Markus Blatt 5b4acd5417 Do not query wells for solver if it is actually not needed. 2020-05-12 11:52:19 +02:00
Markus Blatt d54d69df25 Merge pull request #2610 from blattms/fix-write-matrix-dune-2,7
For DUNE 2.7 and up we need to specialize for Opm:MatrixBlock
2020-05-12 11:50:21 +02:00
Markus Blatt 19bd9cea65 for DUNE 2.7 and up we need to specialize for Opm:MatrixBlock
as there already is a specialization for an arbitrary Block
and that one leads to compile errors because we redefine it
in OPM (and miss some other specializations for Opm:MatrixBlock,
e.g. isNumber).
2020-05-11 21:29:47 +02:00
Markus Blatt d26c993d86 Merge pull request #2579 from akva2/quell_dep_warning_boost_1.71
quell deprecation warnings with boost 1.71
2020-05-05 17:29:33 +02:00
Markus Blatt 3f65235935 Merge pull request #2591 from atgeirr/fix-parameter-setup
Do not run setupParameter_() twice for the static-typed sims.
2020-05-05 17:27:44 +02:00
Markus Blatt c6fe4c7bab Merge pull request #2569 from blattms/prevent-cmake-error-for-cuda-g++-master
Prevent Cmake error for CUDA with incompatible c++ compiler.
2020-05-05 13:32:10 +02:00
Markus Blatt 6a0bad0243 Need to set ENV{CUDAHOSTCXX}, too.
No variables are used by check_language and hence we need
ti make nvc aware of the host compiler by the environment
variable.
2020-04-29 13:58:48 +02:00
Markus Blatt 2d32fde1c9 Fix CMake CUDA documentation. 2020-04-29 13:29:45 +02:00
Markus Blatt 2c7556d286 Use CMAKE_CUDA_HOST_COMPILER instead of ENV{CUDAHOSTCXX}. 2020-04-29 13:29:45 +02:00
Markus Blatt 9b8887d39f Merge pull request #2576 from blattms/remove-unused-code-blackoilmodelebos
Removes unused member istlSolver_ and method to get it from BlackoilM…
2020-04-28 22:14:40 +02:00
Markus Blatt ca744231b1 Removes unused member istlSolver_ and method to get it from BlackoilModelEbos
It is not used since quite some time and tends to confuse me.
2020-04-28 16:46:17 +02:00
Markus Blatt 46ccc77959 Use CMAKE_CUDA_FLAGS_${CMAKE_BUILD_TYPE} if appropriate. 2020-04-27 22:05:47 +02:00
Markus Blatt 4e0cd2a77e Prevent multiple "-ccbin g++" in nvcc command.
If ENV{CUDAHOSTCXX} is set then this will cause CMake to add
"-ccnin ${ENV{CUDAHOSTCXX}}" to variable CMAKE_CUDA_FLAGS
even if there already is one.
2020-04-27 22:05:47 +02:00
Markus Blatt f03b56c261 Complete future-proofing ILU usage in the preconditioner factory.
SeqILU0/SeqILU0 are removed in master and one should use SeqILU
2020-04-27 15:52:43 +02:00
Markus Blatt ddb0940336 Prevent Cmake error for CUDA with incompatible c++.
At least on Debian 10 the standard c++ compiler is g++-8,
but CUDA only supports g++-7 and our test for CUDA in cmake
did send an error in that case/combination which is quite
annoying.

The reason was that check_language(CUDA) did not honor
the CMAKE_CUDA_FLAGS variable and always used the default g++7,
but enable_language(CUDA) did honor it. As we do set the underlying
host compiler the fromer reported that CUDA is available while the
latter marked the CUDA compiler as broken.

With this commit we work around this by setting the environment
variable ENV{CUDAHOSTCXX} which nvcc will use. Hence now we only try
to enable CUDA if it is compatible with the C++ compiler
2020-04-27 15:22:56 +02:00
Markus Blatt e61e2bd399 Merge pull request #2551 from akva2/fix_test_dir
fixed: use PROJECT_BINARY_DIR, not CMAKE_BINARY_DIR
2020-04-21 11:16:00 +02:00
Markus Blatt 057a0ceeeb Removes stale CPR headers that have been superseeded.
No need to drag them along and confuse people.
2020-04-15 21:38:28 +02:00
Markus Blatt 83d30547f6 Merge pull request #2517 from blattms/refactor-policy-settings
Refactor policy settings (Needed by OPM/opm-common#1675)
2020-04-15 21:02:29 +02:00
Markus Blatt 695e6c9449 Only warn abou CUDA version if CUDA was actually found. 2020-04-15 14:21:36 +02:00
Markus Blatt 11b0a409d1 Merge pull request #2534 from akva2/janitoring
remove unused lambda parameter
2020-04-14 22:25:29 +02:00
Markus Blatt 6f913d3a85 Merge pull request #2532 from hakonhagland/add_main_hpp
Add Main.hpp to CMakeLists_files.cmake.
2020-04-14 22:23:34 +02:00
Markus Blatt 340bad4b17 Fix policy warnings (needed by OPM/opm-common#1675 2020-04-02 20:31:54 +02:00
Markus Blatt 59916a7526 Move CUDA tests to a later stage to make time for setting policies. 2020-04-02 20:30:20 +02:00
Markus Blatt 20f26bffbf fixup! [FlexibleSolver] Added missing headers determine IsComm. 2020-04-02 17:16:17 +02:00
Markus Blatt 9ce008ef7d [FlexibleSolver] Added missing headers determine IsComm.
Seems needed for some compilers
2020-04-02 17:10:43 +02:00
Markus Blatt e8145656de Merge pull request #2512 from alfbr/enable-owner-first
Enable owner first ordering by default
2020-04-02 13:07:48 +02:00
Markus Blatt a8184df3c2 Corrected expected exception type in PreconditionerFactory test 2020-03-31 16:49:37 +02:00
Markus Blatt 2c432e09af Error when json file is requested for insufficient boost version. 2020-03-31 16:49:37 +02:00
Markus Blatt 589b70ff26 Correct errror message when json file is not specified. 2020-03-31 16:49:37 +02:00
Markus Blatt 910ecdb78d Addedmissing space. 2020-03-31 16:49:37 +02:00
Markus Blatt b16f635b90 Deleted commented out code. 2020-03-31 16:49:37 +02:00
Markus Blatt a72ab9d283 Fixed typo and reworded. 2020-03-31 16:49:37 +02:00
Markus Blatt 2fc2703aba Use special default for LinearSolverMaxIter for CPR and honor CprMaxEllIter 2020-03-31 16:49:37 +02:00
Markus Blatt 2c1df912fe honor ilulevel for ParallelOverlappingILU0 2020-03-31 16:49:37 +02:00
Markus Blatt 9019a52937 Use enable_if on comm constructor parameter.
As this is the one we want to check.
2020-03-31 16:49:37 +02:00
Markus Blatt b016a1a714 [FlexibleSolver] active CPR if UseCpr is true and adjust maxIter.
If no LinearSolverConfiguration is specified but UseCpr is true we
use cpr_quasiimpess. If the user does not specify the maximum
iteration number we use 20 for cpr.
2020-03-31 16:49:37 +02:00
Markus Blatt 74b958c258 Improves exceptions and message and resort to OPM_THROW for flexible solvers. 2020-03-31 16:49:37 +02:00
Markus Blatt ff0d54d4ea Add sensible defaults for flexible solver properties...
to prevent throwing. The get methods will throw if called without a
default value. This quite unfortunate and not very user friendly, as
there are many properties and the throwing will happen during the
linear solve and result in time step chopping.

This commit should prevent such throws and allow users to provide
jsdon files omitting some options.
2020-03-31 16:49:37 +02:00
Markus Blatt 2e4824cbc7 Change default configuration to "ilu0".
The previous was "file" which resulted in runtime errors
like

Program threw an exception: No linear-solver-configuration-json-file given for linear-solver-configuration=file
2020-03-31 16:49:37 +02:00
Markus Blatt dcb316f442 Make update method of preconditioners parameter-less again.
Previously, it got passed the weights only needed for CPR.
Additionally those were passed with the parameter tree to the
update method and constructor.

Now the CPR constructor gets a function to use for recalculating
the weights and the property is not changed. Unfortunately this
means that the preconditioner creators of the factory get another
parameter.
2020-03-31 16:49:37 +02:00
Markus Blatt 95a1e1ca0e Remove property tree parameter from PreconditionerWithUpdate::update
It is not used, needed parameters can stored in the constructor, and
it made de design a bit suboptimal.
2020-03-31 16:49:37 +02:00
Markus Blatt 70cff4b342 Refactor to a single function that calculates true impes weights.
Two identical versions seemed like a lot of maintenance for no gain.
2020-03-31 16:49:37 +02:00
Markus Blatt 3d04df9759 Merge pull request #2493 from blattms/fix-cuda-version-fix
Check for cuda 9.0 or newer as we are supposed to.
2020-03-23 11:11:35 +01:00
Markus Blatt 1f876e693b Check for cuda 9.0 or newer as we are supposed to.
9.7 was a local change to see whether deactivating CUDA for old
version works.

Completes #2488
2020-03-23 11:10:17 +01:00
Markus Blatt 53d636a3b1 Merge pull request #2488 from blattms/fix-cuda-version-check
Fix CUDA version check to allow versions 9.0 or newer.
2020-03-23 09:45:20 +01:00
Markus Blatt 03b2c44dce Prevent some unnecessary copies. 2020-03-23 09:40:14 +01:00
Markus Blatt b41b449c7d Removed suplicated code for calculating quasi impes weights.
Maintaining two versions is just to error prone.
2020-03-23 09:40:14 +01:00
Markus Blatt c14bf078a1 Make ParallelOverlappingILU0 updateable & use it to construct ILU0/n
This should force the flexible solver approach to recalculate the
decomposition during update.

Closes #2490
2020-03-23 09:39:51 +01:00
Markus Blatt 74051ebf01 Fix CUDA version check to allow versions 9.0 or newer. 2020-03-20 14:36:24 +01:00
Markus Blatt c0a82ff335 Merge pull request #2475 from Tongdongq/separate_wellcontributions_for_gpu
Separate wellcontributions for gpu
2020-03-20 12:14:06 +01:00
Markus Blatt 0970867e47 Merge pull request #2484 from akva2/janitoring
avoid potentially uninitialized warnings in serial
2020-03-19 13:07:08 +01:00
Markus Blatt 5fc248f786 Rely on local ids being persistent across grid modifications
as the issue in CpGrid was fixed, recently.
2020-03-17 12:26:30 +01:00
Markus Blatt a45c278c4a Merge pull request #2458 from blattms/use-indices-for-modifying-matrices
Do not use local id set to index matrices.
2020-03-13 20:10:17 +01:00
Markus Blatt 1c2d3fbcc7 Do not use local id set to index matrices.
That the local ids were consecutive and starting from 0 was just
a coincidence and they should never be used to access linear systems
or vectors. This commit fixes this by using the correct mappers instead.

Note the we removed some computations from the constructor of
ISTLSolverEbosCpr as it inherits from ISTLSolverEbos and the operations
already happnen in constructor of the base class.
2020-03-13 17:56:49 +01:00
Markus Blatt e65f6c02bb Merge pull request #2220 from andrthu/owners-first
[For testing] Enable "owners first" ordering. Altered SpMV, SP and ILU.
2020-03-13 17:48:22 +01:00
Markus Blatt fed22e5189 Tighten parallel tolerances for SPE1CASE2_THERMAL 2020-03-10 15:45:01 +01:00
Markus Blatt 400ca4230b Use dynamic_cast to ParallelEclipseState and do error checking. 2020-03-10 14:29:19 +01:00
Markus Blatt eb8ac2af2d Use correct region temperature when calculating RS/RV
The InitialStateComputer::temperature_ array, previously used,
was of cartesian size, but used as if it only contained the
values of the cells of a region.
With this commit InitialStateComputer::temperature_ is a compressed local
array and we explicitly copy out only the region values when computing
RS/RV.

Closes #2423.
2020-03-10 11:54:58 +01:00
Markus Blatt 04311f6337 Allow auto creation of field properties arrays in ParallelEclipseState.
There are field properties that can usually be queried even if they
are not explicitly specified in the input
file (e.g. PVTNUM). Unfortunately, the ParallelEclipseState cannot
forsee which of these will be queried at startup and after the
loadbalancing only the master process is able to auto creates
these (easily). Hence this commit uses a fall-back if an unstored
keyword is queried. In this case we use get_global-* to auto create
the keyword and use functions of the cartesian mapper to extract the
relevant values on the process.

Of course this temporarily wastes space and we might want to resort to
a more memory savy approach later.
2020-03-10 11:36:02 +01:00
Markus Blatt f4876becfb Improve exception handling in ParallelEclipseState::get_global-*
In particular we make sure that all processes throw on unknown
keywords.
2020-03-10 11:36:02 +01:00
Markus Blatt fa158893db Merge pull request #2447 from akva2/simplify_serializer
changed: simplify eclmpiserializer
2020-03-10 11:21:50 +01:00
Markus Blatt 1e65a1421b Merge pull request #2448 from akva2/serialize_aquifer_config
fixed: serialize AquiferConfig
2020-03-10 08:37:22 +01:00
Markus Blatt 5c8cdc8024 Use get_int instead of get_int_global in initstateequil.hh.
With the arrival of compressed field properties there is no need
to extract the global arrays just to compress them manually
afterwards. This change should remove commununication and
synchronization points.
2020-03-09 21:32:41 +01:00
Markus Blatt 9ccd4be5e3 Shrink EclEquilInitializer::initialFluidStates_.
There is not reason to it as a vector of cartesian size as we access
its entries by the compressed element index. This should save space
and speedup the lookup.
2020-03-08 16:25:35 +01:00
Markus Blatt f90cfa7ef9 Merge pull request #2425 from blattms/no_serialization_polymermodule
Rebased #2419: changed: no need to serialize PolymerModule any longer
2020-03-08 15:20:35 +01:00