Commit Graph
100 Commits
Author SHA1 Message Date
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 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
Markus Blatt 8bab43ffbd Removed now unused variables. 2020-03-08 15:18:55 +01:00
Markus Blatt 0702f48abc Merge pull request #2424 from blattms/no_serialization_brine
rebased #2408: changed: no need to serialize BrineModule any longer
2020-03-06 20:32:42 +01:00
Markus Blatt 6aeac6cb3a Merge pull request #2407 from akva2/no_serialization_foam
changed: no need to serialize FoamModule any longer
2020-03-06 20:11:27 +01:00
Markus Blatt eea15e5659 Merge pull request #2417 from blattms/loadbalance-centroids
Also distribute the centroids when loadbalancing CpGrid.
2020-03-06 19:47:51 +01:00
Markus Blatt 4c962e61d1 Also distribute the centroids when loadbalancing CpGrid.
They are attached to the cells as well and are now distributed
during CpGrid::loadBalance. Due to this change we also rename
FieldPropsDataHandle to PropsCentroidsDataHandle.
2020-03-06 14:09:32 +01:00
Markus Blatt 1b03b040a3 Merge pull request #2422 from blattms/fix-2406-without-mpi
Only compile FieldPropsDataHandle if MPI was found
2020-03-06 14:03:12 +01:00
Markus Blatt 4baa1ba038 Only compile FieldPropsDataHandle if MPI was found 2020-03-06 13:05:29 +01:00
Markus Blatt 1f00870660 Merge pull request #2406 from blattms/loadbalance-fielprops
Use CpGrid::loadBalance to distribute the field properties.
2020-03-06 11:51:14 +01:00
Markus Blatt 77478a59eb Use CpGrid::loadBalance to distribute the field properties.
The created data handle for the communication could in theory be used
with other DUNE grids, too. In reality we will need to merge with the
handle that ALUGrid already uses to communicate the cartesian indices.

This PR gets rid of using the get_global_(double|int) method in
ParallelEclipseState and reduces the amount of boilerplate code there.
2020-03-06 09:48:04 +01:00
Markus Blatt c0c403aba3 Merge pull request #2380 from blattms/make-cmake-cuda-check-work-for-3.6
Make Cmake version check for CUDA work for CMake 3.6.
2020-03-02 13:21:15 +01:00
Markus Blatt 843903dfdc Make Cmake version check for CUDA work for CMake 3.6.
It seems like the VERSION_GREATER_EQUAL operator for boolean
expressions was introduced after CMake 3.6 and hence the current
check whether to activate CUDA or not is broken in version 3.6 and
below.

This PR fixes this by using VERSION_GREATER.

Closes #2375.
2020-03-02 12:10:45 +01:00
Markus Blatt 9faf2979b9 Merge pull request #2377 from akva2/use_compressed_numbers
changed: use compressed field properties setting up numbers
2020-03-02 11:32:22 +01:00
Markus Blatt 396f84b764 Merge pull request #2372 from akva2/compressed_props_material
Use compressed properties in material law setup
2020-03-02 09:47:09 +01:00
Markus Blatt 80c7bc179b Make mixing incompatible host compiler/device compiler versions fail.
We experienced weired linker errors when using host compiler version for
compilation that were not supported by the nvcc used to compile the
cuda code:
```
[ 15%] Linking CXX executable bin/test_timer
/usr/bin/ld: /home/mblatt/src/dune/opm-2.6/opm-common/opm-seq/lib/libopmcommon.a(Parser.cpp.o): in function `Opm::(anonymous namespace)::file& std::vector<Opm::(anonymous namespace)::file, std::allocator<Opm::(anonymous namespace)::file> >::emplace_back<std::filesystem::__cxx11::path&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>(std::filesystem::__cxx11::path&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
Parser.cpp:(.text+0x1096): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: Parser.cpp:(.text+0x10ad): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: /home/mblatt/src/dune/opm-2.6/opm-common/opm-seq/lib/libopmcommon.a(Parser.cpp.o): in function `Opm::(anonymous namespace)::ParserState::loadFile(std::filesystem::__cxx11::path const&)':
Parser.cpp:(.text+0x23a1): undefined reference to `std::filesystem::canonical(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: Parser.cpp:(.text+0x24e0): undefined reference to
`std::filesystem::__cxx11::path::_M_split_cmpts()'
```
The reason turned out to be that the library path was build up by
paths of the old (g++-7) compiler used by nvcc and the actual (newer) compiler
g++-8. This completely messed up the linker paths for CMake.

To detect this situation already when running cmake we have resorted
to first setting the CMAKE_CUDA_FLAGS to force cmake to make nvcc use
the host compiler and to activate CUDA (if available) before calling
`find_package(CUDA)`. If the host compiler is not supported CMake will
error out during `enable(CUDA)`

Note that we still use (deprecated) FindCUDA later to determine the
libraries to link to.

The users has the option to either deactivate CUDA by setting
`-DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON` or to use a compiler supported
by nvcc (setting `-DCMAKE_CXX_COMPILER=compiler`).

Additionally we do not try to activate CUDA the CMake version is <
3.8. Please note that previously CMake would have errored out here
anyway since we used the unsupported `enable_language(CUDA)` even in
this case.

Closes #2363.
2020-02-25 16:54:53 +01:00
Markus Blatt 22d4e784d3 Merge pull request #2356 from akva2/boost_prune
Lessen boost usage
2020-02-21 13:15:03 +01:00
Markus Blatt 0e45f0827c Merge pull request #2330 from akva2/bump_to_cxx17
remove usage of CXX11Features module
2020-02-11 17:50:01 +01:00
Markus Blatt 11c1574405 Merge pull request #2316 from akva2/fix_bda_onephase
fixed: add explicit template instantation for blocksize 1
2020-02-10 11:23:06 +01:00
Markus Blatt daa8f778bb Merge pull request #2310 from akva2/noecl_small_stuff
Preparatory changes for single-process parsing
2020-01-30 09:13:14 +01:00
Markus Blatt 7e700c11e0 Move PreconditionerFactory into namespace Opm.
This fixes name clashes with DUNE's own factory that is introduced
in DUNE 2.7. Hence it closes issue #2266.

BTW: Dune's factory has more template parameters than ours.
2020-01-07 17:59:23 +01:00
Markus Blatt b9062396be Merge pull request #2209 from Tongdongq/master
Added cusparseSolver, needs GPU to be used
2019-12-20 11:37:27 +01:00
Markus Blatt 3968d23a5a Merge pull request #2249 from joakim-hove/test-throw
Throw std::runtime_error() instead of std::abort() in test failure
2019-12-20 11:28:01 +01:00
Markus Blatt 68272d5861 Merge pull request #2243 from blattms/construct-cpgrid-from-eclgrid-pointer
Pass a pointer to the EclipseGrid to CpGrid::processEclipseGrid.
2019-12-19 11:40:23 +01:00
Markus Blatt 2511121a84 Merge pull request #2222 from dr-robertk/PR/ebos-polyhedralgrid2
Make ebos compile with PolyhedralGrid again.
2019-12-18 23:57:38 +01:00
Markus Blatt ecfbb0e491 Pass a pointer to the EclipseGrid to CpGrid::processEclipseGrid.
... instead of a reference This is needed as we only want to read the
full deck and construct the EclipseGrid only on the master process
with rank 0. Hence all other ranks will pass a nullptr to this
function. This will be possible with this move from a reference to a
pointer.
2019-12-18 21:39:08 +01:00
Markus Blatt d255e1cad6 Merge pull request #2215 from dr-robertk/PR/fix-compile-dune27
Fix compilation with DUNE 2.7
2019-12-18 08:56:51 +01:00
Markus Blatt 75a551c668 Merge pull request #2230 from totto82/addOutput
add group name to output
2019-12-18 08:14:17 +01:00
Markus Blatt 1e0663fc7f Merge pull request #2233 from akva2/noecl_flush
More MPI serialization support
2019-12-18 08:13:43 +01:00
Markus Blatt 30c105e83e Merge pull request #2224 from joakim-hove/test-throw
Use throw std::runtime_error() instead of std::abort() in test
2019-12-16 14:45:41 +01:00
Markus Blatt 87b631e15b Merge pull request #2218 from blattms/use-active-cells-wehen-filtering
Use ActiveGridCells instead of EclipseGrid when filtering connections.
2019-12-11 09:02:37 +01:00
Markus Blatt e7f7ad2ddc Use ActiveGridCells instead of EclipseGrid when filtering connections.
The function signature has changed upstream.
2019-12-10 11:50:07 +01:00
Markus Blatt 201887f283 Merge pull request #2195 from akva2/simplify_parallelrestart_new_types
changed: use a macro to declare prototypes in ParallelRestart.hpp
2019-12-10 08:36:41 +01:00
Markus Blatt 712a902c37 Merge pull request #2205 from andrthu/adjacency-change
Remove non-contributing computations in parallel solver by changing matrix sparsity pattern.
2019-12-06 15:15:50 +01:00
Markus Blatt a0650012c3 ParallelRestart: use references and allow non-default template parameters.
packSize now uses a reference to map/unordered_map to prevent copying.
In addition we always specify all template parameters for the containers to
allow for sending data if non-default ones are used.
2019-11-25 13:04:40 +01:00
Markus Blatt 5c34b843f1 Use process instead of processor for MPI. 2019-11-19 15:56:18 +01:00
Markus Blatt b4ec2f0611 Use correct number of threads when printing banner.
At that stage flow did not set the number of thread in the case where
OMP_NUM_THREADS is not defined. That happens in setupParallelism which
is called when the simulator is run. Hence we have to manually compute
the number of threads similar to there.
2019-11-19 15:45:50 +01:00
Markus Blatt afc76a8b27 Print number of MPI/OMP threads at start and end. 2019-11-19 15:45:50 +01:00
Markus Blatt bc98b20118 Only filter in filterConnections_ on root process.
When filterConnections_ is called the grid is not load
balanced, yet. Currently that means that grid() will also return the
unbalanced grid and all processes will see the whole global grid.

We will change semantics of the unbalanced grid soon: Only the root
process will see the whole grid and the others will see an empty
partition of it. Hence filtering on this partition will remove all
connections on all wells in the schedule for non-root processes and
produce wrong results.

For non-root process the filtering needs to be done on the load
balanced grid. This is accomplished by this commit.
2019-11-14 23:41:17 +01:00
Markus Blatt a5506956fb renamed numWells to numLocalWells in BlackoilWellmodel
as this better reflects that it is not the number of wells in
the whole domain but just the one in the part of the domain
stored in the local process.
2019-11-01 15:11:21 +01:00
Markus Blatt 905403e2ed Fix BlackoilWellModel::numComponents for parallel runs.
In the case with active solvent (BlackoilWellModel::has_solvent_ is
true, e.g. case 2D_OILWATER_POLYMER.DATA) and one process have no
wells while another has some this lead to numComponents returning
different values. Later this lead to truncated message in MPI_Allgather.

The underlying problem was the usage of numWells() which returns just
the number of local wells. We resort to using wellsActive which
returns whether there any well active regardless which process knows it.
2019-11-01 15:07:00 +01:00
Markus Blatt c676b73822 Merge pull request #2120 from blattms/filter-connections-on-all-procs
Filter connections on non-IO ranks and remove parallel deadlock
2019-11-01 13:07:09 +01:00
Markus Blatt 671ab68709 Merge pull request #2117 from blattms/changelog-2019.10
Added entries to changelog concerning 2019.10 release
2019-10-30 21:50:11 +01:00
Markus Blatt a597539342 Filter connections on non-IO ranks, too.
This removes a deadlock experienced for some models
where we have specified connections to non-active cells.

On non-IO ranks we are using the local grid since in the
future there will be no global grid available. Wells connecting
cells not on these processors are neglected anyway.

Closes #2101
2019-10-30 13:46:43 +01:00
Markus Blatt e44f0445c4 Fixed indentation of a2db252 2019-10-30 08:55:05 +01:00
Markus Blatt a2db252271 Move BlackOilOnePhaseIndices to Opm namespace
to make it consistent with the rest. OPM/opm-models#530 development
must have been started before the renaming in OPM/opm-models#532
and somehow the old namespace survived.

downstream PR of OPM/opm-models#577
2019-10-29 17:04:37 +01:00
Markus Blatt 10db57f66b Only print usage information on one processes.
No matter whether requested via --help or printed due to a wrong
command line parameter.

Closes #2012.
2019-10-29 17:00:24 +01:00
Markus Blatt c7aebc66a8 Added entries to changelog concerning 2019.10 release 2019-10-29 13:27:07 +01:00
Markus Blatt b3141133e3 Merge pull request #2114 from akva2/update_rh_packaging
update redhat packaging
2019-10-28 11:59:53 +01:00
Markus Blatt 608b317ecc Allow different ElementMapper types in ElementIndexScatterHandle.
This is needed to support dune-fem where the local mapper might
be
`MultipleCodimMultipleGeomTypeMapper<GridView<GridPart2GridViewTraits<AdaptiveLeafGridPart<CpGrid, (PartitionIteratorType)4,
false> > >, Dune::Impl::MCMGFailLayout>`
as opposed to the global one being
`MultipleCodimMultipleGeomTypeMapper<GridView<DefaultLeafGridViewTraits<CpGrid>>, Dune::Impl::MCMGFailLayout>`.

Closes #2095.
2019-10-22 14:49:55 +02:00
Markus Blatt 9751984021 Merge pull request #2033 from blattms/avoid_equil_grid-rebased
Avoid using global grid (equilGrid) on non-IO processes.
2019-10-21 11:47:17 +02:00
Markus Blatt c7d9cdef9a Merge pull request #2061 from joakim-hove/is-iorank
stdout logging only for rank 0
2019-10-21 10:12:45 +02:00
Markus Blatt 3dad4f21e8 Fixed unused parameter warning wehn compiling without MPI. 2019-10-18 16:23:22 +02:00
Markus Blatt 42247105bf Addressed reviewer's comments. 2019-10-18 16:23:22 +02:00
Markus Blatt 0bc1630cc9 CollectToIORank: Made localIdxToGlobalIdx lookup working.
Since the indexMaps do not contain the global element index anymore
(but the global id). The old code did not work anymore.

Unfortunately, we are using CpGrid specific functions (scatterData)
to get the mapping. Therefore this might be broken if other grids are
used.
2019-10-15 14:03:24 +02:00
Markus Blatt 9735bdadfc Load restart with global grid only available on one processor.
For this the master (IO) rank loads the RestartValue and then
broadcasts it to the other ranks.
2019-10-15 14:03:24 +02:00
Markus Blatt 7e5c810125 Fixes unused variable warning in standard wells.
Only occurs when compiling with -DNDEBUG since the body of the
for-loop is an assert using the loop variable. Loop is now deactivated.
2019-10-15 09:16:36 +02:00
Markus Blatt 7784d53198 Fix wrong globalSize.
That has gotten a little to big and hence the vector
globalCartesianIndex_ and DistributedIndexMapping::ranks_ ,too.
2019-10-14 14:32:22 +02:00