Commit Graph

198 Commits

Author SHA1 Message Date
Håkon Hægland
8c1a951e09 First PR in a splitting up of PR #2516.
According to private discussion with @joakim-hove PR #2516 is splitted into
smaller parts to facilitate review and a quicker merge into master.

As mentioned in PR #2516, main() in flow.cpp is refactored to address
the comments on PR #2127 and as preparation for implementing the Python
bindings described in PR #2403.
2020-04-03 14:53:45 +02:00
Bård Skaflestad
022ba52200
Merge pull request #2514 from akva2/fix_filesystem_gcc9
changed: avoid calling parent_path on paths that has none
2020-04-03 12:41:14 +02:00
Arne Morten Kvarving
57d5eefd26 changed: avoid calling parent_path on paths that has none
causes a throw on gcc-9
2020-04-03 11:27:47 +02:00
Atgeirr Flø Rasmussen
0c8ce54b71
Merge pull request #2498 from blattms/cherry-pick-hnil-flexible-clean-interface-rebased
Cleaned up flexible solver improvements.
2020-04-02 15:28:10 +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
hnil
2388a9b551 Added simple defaults for flexible solver: current options added ilu0, cpr_quasiimpes, cpr_trueimpes, file (genneal configuration)
This commit 0c62c8442 cherry-picked and slightly cleaned up and
adapted to recent changes.
2020-03-31 16:49:37 +02:00
Joakim Hove
d6a1d3029e Use std::shared_ptr for Python handle to Schedule 2020-03-31 12:28:07 +02:00
Joakim Hove
f425758c25
Merge pull request #2501 from joakim-hove/add-python-arg
Add Python argument to Schedule constructor
2020-03-27 13:44:09 +01:00
Joakim Hove
30216212c4 Add Python argument to Schedule constructor 2020-03-26 10:15:07 +01:00
Arne Morten Kvarving
b698fe2c90 prune some unnecessary includes 2020-03-25 09:42:02 +01:00
Arne Morten Kvarving
a2d840a5f7 changed: put eclipse state broadcast in separate compilation unit
to avoid compiling several times for each flow variant
2020-03-19 09:31:52 +01:00
Arne Morten Kvarving
d9ab0e7522 remove old serialization support for ASTNode 2020-03-19 09:31:07 +01:00
Arne Morten Kvarving
7389959b88 remove old serialization support for WListManager 2020-03-19 09:31:07 +01:00
Arne Morten Kvarving
13f3b31bd6 add missing includes 2020-03-16 20:52:17 +01:00
Markus Blatt
09c2cb2107 Make flow variants use ParallelEclipseState just as flow 2020-03-16 10:09:26 +01:00
Arne Morten Kvarving
05286d8900 changed: simplify mpi setup
no need for a separate reference to the parallel state any longer
2020-03-16 08:20:44 +01:00
Arne Morten Kvarving
3389db4f4c fixed: consistently use #if MPI instead of #ifdef MPI 2020-03-16 08:20:44 +01:00
Arne Morten Kvarving
38023fac21 changed: use EclMpiSerializer for Schedule 2020-03-16 08:20:44 +01:00
Arne Morten Kvarving
c40c733a57 fixed: build without MPI 2020-03-13 17:52:37 +01:00
Joakim Hove
4dfa22e6a2 Allow flow to continue with --sched-restart=false 2020-03-12 15:20:39 +01:00
Arne Morten Kvarving
e1bf6ed4a6 use eclmpiserializer for SummaryConfig broadcast 2020-03-10 10:01:26 +01:00
Joakim Hove
42f96ca039 Add commandline switch --sched-restart to control restart init 2020-03-04 15:44:32 +01:00
Arne Morten Kvarving
293612265e fix build without MPI 2020-02-28 13:03:16 +01:00
Arne Morten Kvarving
05c0c4b6e8 Use the ParallelEclipseState and ParallelFieldPropsManager
with these in place, we now only parse the deck on the root process.
2020-02-28 10:26:55 +01:00
Arne Morten Kvarving
68a9d17de1 changed: pass/store deck as a pointer
and remove asserts for null-ptr. preparatory step for only
having deck on root mpi process
2020-02-28 10:26:55 +01:00
Joakim Hove
2e18107097 Add disabled functionality to init wells and group from restart file 2020-02-25 09:49:26 +01:00
Joakim Hove
d3bfa83c7c
Merge pull request #2343 from joakim-hove/move-rstconfig
RestartConfig has moved from EclipseState to Schedule
2020-02-20 07:07:37 +01:00
Arne Morten Kvarving
abc439d336 remove last usage of boost::filesystem 2020-02-18 08:54:37 +01:00
Joakim Hove
5ad4936025 RestartConfig has moved from EclipseState to Schedule 2020-02-17 21:48:12 +01:00
Arne Morten Kvarving
11e0e5b549
Merge pull request #2326 from akva2/fix_dune_fem
fixed: build with dune-fem enabled
2020-02-17 09:03:04 +01:00
Atgeirr Flø Rasmussen
5fe48dab8b
Merge pull request #2327 from akva2/bump_dune
Bump required dune version to 2.6
2020-02-11 09:41:44 +01:00
Robert Kloefkorn
e04bb6e91a [feature][flow_blackoil] Added a variant to compile the blackoil option
only for faster development.
2020-02-10 12:11:30 +01:00
Arne Morten Kvarving
f4bc377996 fixed: build with dune-fem enabled
in that case we do not have an 'instance' of the static mpi helper
class.
2020-02-07 15:19:09 +01:00
Arne Morten Kvarving
4978e72039 bump required dune version to 2.6
remove compatiblity code with older versions
2020-02-06 16:24:39 +01:00
Bård Skaflestad
73a58c4599
Merge pull request #2287 from akva2/avoid_deck_for_phases
avoid instancing a new Runspec from deck to obtain active phases
2020-01-17 16:22:26 +01:00
Arne Morten Kvarving
8a14d70f97 avoid instancing a new Runspec from deck to obtain active phases
this is already available in the eclipseState.
in particular, this is preparing for the case where only the
root-process has a deck instance.
2020-01-17 15:36:30 +01:00
Arne Morten Kvarving
3fca2ae631 changed: avoid using deck setting up schedule on non-root processes 2020-01-17 10:29:46 +01:00
Tor Harald Sandve
ada7c9d90b fix various extentions 2020-01-09 14:14:38 +01:00
Trine S. Mykkeltvedt
99e7785fb5 renamed saltwater-->brine and removed keywords from missingFeatures 2020-01-09 14:14:38 +01:00
Trine S. Mykkeltvedt
5749615bd8 addd simple salt/brine implementation 2020-01-09 14:14:38 +01:00
Arne Morten Kvarving
227ff00730 avoid usage of deck on all processes setting up SummaryConfig 2020-01-08 10:30:57 +01:00
Atgeirr Flø Rasmussen
cab0724a26
Merge pull request #2119 from blattms/fix-multiple-usage-printing-parallel
Only print usage information on one processes.
2019-11-22 15:23:27 +01:00
Arne Morten Kvarving
dd2a360e10
Merge pull request #2118 from blattms/fix-one-phase-namespace
Move BlackOilOnePhaseIndices to Opm namespace
2019-10-30 09:29:01 +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
Joakim Hove
252829850e Pass ParseContext settings in constructor 2019-10-25 14:30:13 +02:00
Joakim Hove
4490f31540 stdout logging only for rank 0 2019-10-16 15:19:00 +02:00
Atgeirr Flø Rasmussen
5211217c94 Whitespace fixes (tabs->spaces, reformatted new files). 2019-10-11 15:57:51 +02:00
Atgeirr Flø Rasmussen
10e2200a25 Add two new flow variants for one-phase (water, water+energy) simulation. 2019-10-11 08:19:18 +02:00
Atgeirr Flø Rasmussen
7270aa3013 Update flow_tag.hpp to match current flow.cpp.
The flow_tag.hpp file is used for simple construction of simulators for
particular models or other compile-time choices. This updates it to
get identical behaviour as that of mainline (multi-model) Flow.
2019-10-11 08:19:18 +02:00
Tor Harald Sandve
aeb29a5412 move PRT header to the top 2019-10-03 12:13:13 +02:00
Joakim Hove
dccb9bfa10
Merge pull request #2017 from atgeirr/fix-abort-unknown-param
Abort the run before reading the deck if there are unknown params.
2019-09-23 22:10:17 +02:00
Atgeirr Flø Rasmussen
c7200460ab Abort the run before reading the deck if there are unknown params. 2019-09-19 14:20:05 +02:00
Arne Morten Kvarving
d3d9831fc3 changed: ewoms/common -> opm/models/utils 2019-09-19 11:14:36 +02:00
Arne Morten Kvarving
7048589ec1 changed: ewoms/models/blackoil -> opm/models/blackoil 2019-09-19 11:12:45 +02:00
Atgeirr Flø Rasmussen
b8b3599ac5
Merge pull request #1993 from akva2/namespace_change
changed: namespace Ewoms -> namespace Opm
2019-09-09 09:05:19 +02:00
Atgeirr Flø Rasmussen
7c34877630 Ensure output dir exists before creating log streams. 2019-09-06 12:35:40 +02:00
Arne Morten Kvarving
5599bb6d8c changed: namespace Ewoms -> namespace Opm 2019-09-05 17:14:38 +02:00
Joakim Hove
c804e85bc7
Setup logging before the simulator is initialized (#1980)
Setup logging before the simulator is initialized
2019-08-27 22:41:48 +02:00
Franz G. Fuchs
7fb90bff47 Use foam module. 2019-08-07 10:39:16 +02:00
Bård Skaflestad
6cf0710271 Flow: Verify Consistent Array Dimensions
The output code has an unfriendly error mode in which we
unceremoniously crash--without writing any data--if some declared
array dimensions from RUNSPEC aren't big enough to hold all the
dynamic objects (wells, groups, connections &c).

Verify that the declared dimensions are indeed big enough for the
current simulation run before starting the simulator to ensure that we
don't waste a lot of computational effort if, for instance, the first
output is very close to the end of the simulation.
2019-06-30 23:50:38 +02:00
Atgeirr Flø Rasmussen
a33cfbf0bc Moved Flow-related classes and files to opm/simulators/flow. 2019-06-20 11:00:51 +02:00
Tor Harald Sandve
edbc28f46c
Merge pull request #1879 from andlaus/mebos
add `mebos`, a multiplexed ebos variant
2019-06-13 11:03:38 +02:00
Andreas Lauser
ca8ea76818 add mebos, a multiplexed ebos variant
`mebos` works similarly as `flow`, but in contrast to `flow`, `mebos`
only creates the deck in the common code path whilst the
'EclipseState' and the other higher-level parser objects are always
created internally by the vanguard. this approach avoids code
duplication and the worst effects of parser API creep.

to avoid having to compile non-trivial compile units multiple times,
the actual code of the variants is moved into `ebos_$VARIANT.{hh,cc}`
files and the respective compile units are each put into a small
static library whilst the main function of said libraries are invoked
by either the multiplexed or the respective specialized simulator's
`main()`. This is also somewhat similar of how `flow` works, with the
difference that `mebos` uses the blackoil variant to determine the
parameters it needs to know for parsing the deck instead of
introducing a "fake" type tag for this. The rationale is to reduce
compile time compared to the "fake type tag" approach and -- to a
lesser extend -- avoid unnecessary copy-and-pasting of code. In
particular, this means that for the vast majority of cases, only one
place needs changed in the code for all `ebos` variants if, for
example, the parser API requires further objects in the future.
2019-06-11 10:27:47 +02:00
Atgeirr Flø Rasmussen
72ae444566 Fixes for Dune < 2.6.
The PreconditionerFactory requires 2.6, so this is addressed by
simply not using that code at all for Dune < 2.6. No FlexibleSolver
etc.
2019-06-06 09:10:43 +02:00
Halvor Møll Nilsen
ec498086a6 Add flexible solver and preconditioner infrastructure.
Also use it in flow_blackoil_dunecpr.cpp. Adds new command-line parameter,
--linear-solver-configuration-json-file, to read linear solver config from
JSON-format file at runtime.
2019-06-03 11:42:30 +02:00
Kai Bao
8ac85b892c
Merge pull request #1859 from joakim-hove/use-exit
Return EXIT_FAILURE in main() instead of rethrow
2019-05-24 10:29:59 +02:00
Joakim Hove
7489269172 Return EXIT_FAILURE in main() instead of rethrow 2019-05-24 08:34:12 +02:00
Atgeirr Flø Rasmussen
41ef80dd7d
Merge pull request #1842 from blattms/always-print-version-if-requested
If requested always print version and exit.
2019-05-15 15:13:24 +02:00
Markus Blatt
b885c1a013 Let only master process print information about exception.
Previously, each process did this in a parallel run which
clutters the terminal output quite a bit in a parallel run.
2019-05-15 11:14:06 +02:00
Markus Blatt
18a404768e If requested always print version and exit.
Previously this was only done if there were no other parameters on the
command line. That approach feels a bit unusual.
2019-05-13 14:40:42 +02:00
Atgeirr Flø Rasmussen
c17adf788f Moved files to opm/simulators/ subdirs. 2019-05-08 12:58:19 +02:00
hnil
526187325b changed verbosity of the cpr solver 2019-04-12 11:02:50 +02:00
Markus Blatt
9f49e3fc26 Also pass the parseContext and errorGuard to Opm::checkDeck()
This is now mandated since the checkDeck interface was changed recently.
Otherwise compilation errors out.
2019-04-10 15:01:52 +02:00
Markus Blatt
6538b59d9e Added parallel CPR that reuses the matrix hierarchy.
Currently this just compiles but still segfaults in parallel.
2019-04-10 14:40:46 +02:00
hnil
f05a9fdb25 Version of cpr amg which can reuse setup and also change smoothers of fine and coarse system by changing tags 2019-04-10 14:40:46 +02:00
Andreas Lauser
6f1018f11a also pass the parseContext and errorGuard to Opm::checkDeck() 2019-04-04 18:13:36 +02:00
Joakim Hove
935642ba88
Merge pull request #1716 from joakim-hove/unsupported-keywords
The missing features check takes a ParseContext argument
2019-02-22 07:49:43 +01:00
Joakim Hove
e20037167f Remove unused ParameterGroup.hpp header file 2019-02-17 12:44:28 +01:00
Andreas Lauser
777fd61342 flow: account for external setup costs 2019-02-05 16:52:58 +01:00
Joakim Hove
13aeee109c The missing features check takes a ParseContext argument 2019-01-25 18:03:32 +01:00
Joakim Hove
71d4162a7e Add strict parsing option to flow 2019-01-11 17:25:54 +01:00
Joakim Hove
eedbafb805 Call Ewoms::setExternalSchedule() and Ewoms::setExternalSummaryConfig() 2019-01-11 15:38:23 +01:00
Joakim Hove
b3344a7b99 All objects which require ParseContext / ErrorGuard are created in flow 2019-01-11 08:30:05 +01:00
Joakim Hove
8a9df385af Add ErrorGuard when parsing 2019-01-07 10:44:33 +01:00
Kai Bao
76edcc0d91 addressing the second part of comments form PR#1680 2018-12-13 21:31:36 +01:00
Kai Bao
167306169b including the injectivity program to flow 2018-12-11 21:41:44 +01:00
Kai Bao
b079c0a1e5 adding flow_injecitivity executable target 2018-12-11 21:40:47 +01:00
Atgeirr Flø Rasmussen
eeb17b460f
Merge pull request #1677 from joakim-hove/version
Add special case handling of commandline argument "--version"
2018-12-10 10:07:05 +01:00
Joakim Hove
54417a8033 Intercept and the handle commandline argument --version 2018-12-09 20:47:00 +01:00
Andreas Lauser
bf602c621b flow: use eclipseState.simulatorConfig().isThermal() to determine whether energy ought to be conserved
this is the new and hip way to query this information from the ECL
parser.
2018-11-16 14:49:17 +01:00
Andreas Lauser
e5fb6cf83c flow: do not pass the schedule and summaryConfig objects anymore
they are now always created internally by the vanguard.
2018-11-07 12:34:54 +01:00
Tor Harald Sandve
08c4a4857b Adapt to changes in schedule interface 2018-10-29 10:39:14 +01:00
Andreas Lauser
25ae95375b flow: print the "reading deck file" message only once
this is a small follow-up to #1599: not only the banner must be
protected but also the "reading deckfile" message. Mea culpa!
2018-10-24 17:30:45 +02:00
Andreas Lauser
d26fe45d52 flow: print the startup-banner only on the first rank
thanks to [at]atgeirr for catching this.
2018-10-24 14:30:21 +02:00
Andreas Lauser
7d30a8408a flow: print the startup banner immediately
also, add a "reading deck" output. The idea is to make `flow`'s
behaviour less surprising by preventing people from thinking that
nothing happens after starting `flow` for a large deck.
2018-10-22 10:37:16 +02:00
Andreas Lauser
d7efb362a2 make the build of flow fully parallelizable
so far, the actual specializations of the simulator were compiled into
the `libopmsimulators` library and the build of the glue code
(`flow.cpp`) thus needed to be deferred until the library was fully
built. Since the compilation of the glue code requires a full property
hierarchy for handling command line parameters, this arrangement
significantly increases the build time for systems with a sufficient
number of parallel build processes. ("sufficient" here means 8 or more
threads, i.e., a quadcore system with hyperthreading is sufficient
provided that it has enough main memory.)

the new approach is not to include these objects in
`libopmsimulators`, but to directly deal with them in the `flow`
binary. this allows all of them and the glue code to be compiled in
parallel.

compilation time on my machine before this change:

```
> touch ../opm/autodiff/BlackoilModelEbos.hpp; time make -j32 flow 2> /dev/null
Scanning dependencies of target opmsimulators
[  2%] Building CXX object CMakeFiles/opmsimulators.dir/opm/simulators/flow_ebos_gasoil.cpp.o
[  2%] Building CXX object CMakeFiles/opmsimulators.dir/opm/simulators/flow_ebos_oilwater.cpp.o
[  2%] Building CXX object CMakeFiles/opmsimulators.dir/opm/simulators/flow_ebos_blackoil.cpp.o
[  2%] Building CXX object CMakeFiles/opmsimulators.dir/opm/simulators/flow_ebos_solvent.cpp.o
[  4%] Building CXX object CMakeFiles/opmsimulators.dir/opm/simulators/flow_ebos_polymer.cpp.o
[  6%] Building CXX object CMakeFiles/opmsimulators.dir/opm/simulators/flow_ebos_energy.cpp.o
[  6%] Building CXX object CMakeFiles/opmsimulators.dir/opm/simulators/flow_ebos_oilwater_polymer.cpp.o
[  6%] Linking CXX static library lib/libopmsimulators.a
[ 97%] Built target opmsimulators
Scanning dependencies of target flow
[100%] Building CXX object CMakeFiles/flow.dir/examples/flow.cpp.o
[100%] Linking CXX executable bin/flow
[100%] Built target flow

real    1m45.692s
user    8m47.195s
sys     0m11.533s
```

after:

```
> touch ../opm/autodiff/BlackoilModelEbos.hpp; time make -j32 flow 2> /dev/null
[ 91%] Built target opmsimulators
Scanning dependencies of target flow
[ 93%] Building CXX object CMakeFiles/flow.dir/flow/flow.cpp.o
[ 95%] Building CXX object CMakeFiles/flow.dir/flow/flow_ebos_gasoil.cpp.o
[ 97%] Building CXX object CMakeFiles/flow.dir/flow/flow_ebos_oilwater_polymer.cpp.o
[100%] Building CXX object CMakeFiles/flow.dir/flow/flow_ebos_polymer.cpp.o
[100%] Building CXX object CMakeFiles/flow.dir/flow/flow_ebos_oilwater.cpp.o
[100%] Building CXX object CMakeFiles/flow.dir/flow/flow_ebos_solvent.cpp.o
[100%] Building CXX object CMakeFiles/flow.dir/flow/flow_ebos_blackoil.cpp.o
[100%] Building CXX object CMakeFiles/flow.dir/flow/flow_ebos_energy.cpp.o
[100%] Linking CXX executable bin/flow
[100%] Built target flow

real    1m21.597s
user    8m49.476s
sys     0m10.973s
```

(this corresponds to a ~20% reduction of the time spend on waiting for
the compiler.)
2018-09-26 11:49:12 +02:00