Commit Graph

57 Commits

Author SHA1 Message Date
Arne Morten Kvarving
30c5069519 add missing UDQConfig.hpp includes 2023-01-12 09:39:36 +01:00
Arne Morten Kvarving
c7016854d9 changed: make the deck an implementation detail in Opm::readDeck 2022-11-24 13:00:38 +01:00
Atgeirr Flø Rasmussen
926c213628 Make ensureOutputDirExists() callable outside readDeck.cpp, and use it.
This is necessary because when using Damaris we must have the output dir ready
when we initialize Damaris. In the existing code, this was ensured only
from the setupLogging() call.
2022-10-13 12:23:06 +02:00
Atgeirr Flø Rasmussen
04180031e1 Limit warnings to terminal during deck input.
With this, the tag limit of 10 is used from the very start of the run,
and not only after the deck has been read.
2022-08-16 14:43:07 +02:00
Bård Skaflestad
252d0afe8e Emit Actual Message on Input Failure
This gives more information to the user and hopefully aids them in
resolving the underlying issue.
2022-05-20 16:30:19 +02:00
Markus Blatt
51d8c9536e Spelling fix geomtry -> geometry.
Actually one should rename the function used from opm-common, too.
But that is for later...
2022-04-27 20:52:30 +02:00
Bård Skaflestad
dfdfbbd7d7 Don't Process Corner-Point Data If No Valid Cell Geometry
If no cell has a valid corner-point geometry, typically caused by
using GDFILE to read non-finite data such as all ZCORN = -1.0E+20,
then we must not attempt to generate a grid structure.  If we do, we
will typically just fail somewhere deep down in the corner-point
processing code and generate a diagnostic message that's hard to
decipher.

With this commit we instead output a diagnostic message of the form

    Failed to create valid EclipseState object.
    Exception caught: No active cell in input grid has valid/finite cell geometry
    Please check geometry keywords, especially if grid is imported through GDFILE

This may not be a lot better than the original diagnostic

    Processing grid
    flow: ${ROOT}/opm-grid/opm/grid/cpgpreprocess/preprocess.c:768: is_lefthanded: Assertion `! searching' failed.
    Aborted (core dumped)

but does at least suggest that the grid data may be faulty.
2022-03-25 14:35:55 +01:00
Markus Blatt
710d648eda Prevent multiple *.?.dbg/prt files in production crashed parallel runs.
There was a fallout when skipping concating these files to the
default ones (PR #1708). We should also have deactivated creating
these files at all. As a result these files appeared in all parallel
runs that were aborted.

This change now prevents creating and logging to these files in
parallel in a default
run (--enable-parallel-logging-fallout-warning=false).

Developers can still activate logging and concating to see whether
everything is only logged on the io process by passing
--enable-parallel-logging-fallout-warning=true.

Closes 3725
2022-01-27 17:21:29 +01:00
Joakim Hove
6b92443cb4 Downstream filesystem reorganisation in opm-common 2022-01-02 14:33:34 +01:00
Arne Morten Kvarving
06bd25575f use std::filesystem directly 2021-11-01 12:31:58 +01:00
Joakim Hove
daabe1ca76 Make sure WellTestState is initialized also on non IO rank 2021-10-19 11:16:41 +02:00
Joakim Hove
2c68f12769 Load WellTestState from restart file 2021-10-13 08:46:48 +02:00
Bård Skaflestad
0f13f4095b Mark 'comm' As Potentially Unused
The communicator is only needed in parallel builds.
2021-10-10 20:38:45 +02:00
Bård Skaflestad
d028937925 Remove Unused 'Comm' Parameter
Remnant from ealier refactoring work.
2021-10-08 12:44:27 +02:00
Bård Skaflestad
1feab761d6 Extract Helper Functions From readDeck
Mostly to reduce the number of nested conditionals and long lines.
2021-10-07 22:01:47 +02:00
Elyes Ahmed
f53c597f90 Replacing use of MPI_COMM_WORLD with a variable communicator. 2021-10-05 13:07:52 +02:00
Joakim Hove
8943e90e17 Broadcast UDQState and Action state after restart loading 2021-09-28 09:54:15 +02:00
Bård Skaflestad
1dc3832966
Merge pull request #3540 from hakonhagland/python_set_sched
Initialize blackoil simulator from Opm::Schedule shared with Python.
2021-09-23 13:32:31 +02:00
Joakim Hove
f581208fa0 Load Action state from restart file 2021-09-22 12:43:10 +02:00
Håkon Hægland
5ad65c70ee Initialize blackoil simulator from schedule shared with Python.
Adds a new constructor to Main.hpp that takes shared pointers to Deck,
EclipseState, Schedule, and SummaryConfig. This makes it possible to
share these variables with Python without worrying about lifetime issues
of the underlying C++ objects. For example, a Python script can first
create an opm.io.schedule.Schedule object which is modified from Python.
Then, assume the same Python script creates an
opm.simulators.BlackOilSimulator which is initialized with the same
schedule object. Since the underlying C++ object is a shared pointer,
the Schedule object in Python may go out of scope (get deleted by Python)
without having the C++ schedule object being deleted. And the Python
BlackOilSimulator may continue to be used after the Python Schedule object
has been deleted since it still has a valid C++ schedule object.
2021-09-21 15:52:59 +02:00
Joakim Hove
357540bfca Create Action::State external to the vanguard 2021-09-19 10:17:58 +02:00
Joakim Hove
eeab23ebab Add Parser argument to restart loader 2021-09-09 15:08:14 +02:00
Joakim Hove
3e66fc9555 Add Runspec argument to restart loader 2021-09-04 19:35:53 +02:00
Markus Blatt
598e9fa102 [bugfix] Fix sequential run after #979
Definition of the communicator was moved inside a
`#if HAVE_MPI` there. This commit queries the
communicator again below to fix this.
2021-09-02 13:12:23 +02:00
Markus Blatt
edd6c6fe85 [bugfix] Prevent segmentation fault for unkown keywords in parallel.
If there are unknown keywords and the parser throws an exception
then we nevertheless broadcasted the eclipseState and schedule.
Unfortunately, these might be null pointers in this case and
the serializer will run into a segmentation fault (e.g. when
serializing the non-existent TableManager)

Broadcasting is now only done if parsing was successful.
2021-09-02 11:14:46 +02:00
Joakim Hove
060eac4999 Add basic functionality for validating special case keywords 2021-08-24 13:50:40 +02:00
Bård Skaflestad
ec264159b1 Load Analytical Aquifers from Restart File
This commit activates the restart support for analytical aquifers.
Analytic aquifer keywords do not exist in the input file for
restarted runs since the 'SOLUTION' section is empty apart from from
the 'RESTART' specification.

We use the 'RestartIO::Aquifer' class to load the information from
the restart file and then assign this information to the
AquiferConfig object hosted by the EclipseState.  Loading Schedule
information from the restart file is still contingent on the
'--sched-restart=false' command line setting.
2021-08-19 21:07:05 +02:00
Joakim Hove
2b680f27af Load udq state results from restart file 2021-07-03 10:08:25 +02:00
Joakim Hove
528078e8e1 Assemble UDQState external to the vanguard 2021-07-01 08:24:59 +02:00
Bård Skaflestad
704c33f08f Chase Restart Loading API Change 2021-06-25 09:11:09 +02:00
Peter Verveer
fd753e20c4 Add keyword validation using a predicate function 2021-06-14 18:10:36 +02:00
Joakim Hove
d2510714e0 Check that stdout is attached to terminal before applying color 2021-05-28 10:20:10 +02:00
Arne Morten Kvarving
ca1a799e95 changed: put partially supported keywords in separate compile unit
avoid triggering full simulator rebuilds when updating
this list
2021-05-12 14:29:33 +02:00
Arne Morten Kvarving
306593af3b changed: put unsupported keywords in separate compile unit
avoid triggering full simulator rebuilds when updating
this list
2021-05-12 14:29:33 +02:00
Arne Morten Kvarving
bbfda699d3 KeywordValidation: use forwarding 2021-04-29 12:46:49 +02:00
Arne Morten Kvarving
5fb5f79318 readDeck: use forwarding 2021-04-29 12:43:51 +02:00
Arne Morten Kvarving
a4c5429341 fixed: include required headers where needed 2021-04-26 22:39:32 +02:00
Peter Verveer
1640c4afcf Implement a new keyword validator 2021-04-12 16:47:02 +02:00
Joakim Hove
7e59532944
Merge pull request #3104 from joakim-hove/summary-config-rm-tables
Remove TableManager argument when constructing SummaryConfig
2021-03-10 07:33:06 +01:00
Joakim Hove
ec344d555d Pass ouput interval overeride to Schedule constructor 2021-03-08 19:30:58 +01:00
Joakim Hove
253205d63e Remove TableManager argument when constructing SummaryConfig 2021-03-08 15:40:17 +01:00
Joakim Hove
1563525e8d Add FieldProps argument to SummaryConfig constructor 2021-03-08 08:18:50 +01:00
Joakim Hove
914bbeca82 Fetch messagelimits from ScheduleState 2021-01-12 07:44:10 +01:00
Kai Bao
49eb111225 adapting to the interface change of SummaryConfig 2020-10-01 23:32:21 +02:00
Joakim Hove
a755a2d056 Do not print error message when flow exits 2020-09-28 11:03:45 +02:00
Joakim Hove
76f57f5a1d Catch OpmInputError in addition to std::exception 2020-09-28 11:03:45 +02:00
Joakim Hove
0b5134521e Add inline fmtlib code in source tree 2020-09-28 11:01:13 +02:00
Arne Morten Kvarving
76c63c4405 changed: hide internal method 2020-09-15 10:51:57 +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