When not using the OPM CMake build system magic a
find_package(opm-module) did fail in some settings as the
CMAKE_MODULE_PATH did not include the location of OpmPackge.cmake and
the likes.
This fixes this by issuing a find_package(opm-common) for modules that
are not opm-common.
If the input model sets the maximum number of well lists per well
to zero (or negative), then treat this as if the limit is defaulted
and reset the value to the default (one).
1. Was a normal variable if no test program was compiled before.
that meant HAVE_DUNE_FEM was not defined even if dune-fem was found.
2. The if-statement checking whether there is something to compile was
wrong as this is macro and hence prog is not a variable. Resorted
to comparison to empty string.
This is essential if find package modules define imported
targets (usual for modern Cmake). Without this rerunning Cmake another
time in a non-clean build directory will abort with errors if imported
targets are used. E.g. with
```
CMake Error at /home/mblatt/src/dune/opm-2.9/opm-common/cmake/Modules/OpmSatellites.cmake:320 (add_executable):
Target "test_mpiutil" links to target "ParMETIS::ParMETIS" but the target
was not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
Call Stack (most recent call first):
CMakeLists.txt:308 (opm_add_test)
CMake Error at /home/mblatt/src/dune/opm-2.9/opm-common/cmake/Modules/OpmSatellites.cmake:320 (add_executable):
Target "test_mpiutil" links to target "QuadMath::QuadMath" but the target
was not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
Call Stack (most recent call first):
CMakeLists.txt:308 (opm_add_test)
```
This will result in multiple searches, but this should be rather fast
due their previous results being cached.
Some models will use lower-case strings to input the direction of
penetration, e.g., 'x' or 'z'. This commit extends our direction
parser to support such strings.
When using -t SMRY the RSM file is not checked
When using -t RSM the SMRY files is not checked
when running without -t option both RSM and SMRY files are checked together with restart, grid, init and rft file.
The error message for when VFPPROD tables had non-monotonic entries had the table number and the number of errors reversed. This PR fixes this output discrepancy.
Notably missing are
- Maximum gas-liquid ratio
- Maximum temperature
- Minimum reservoir fluid flow rate
- Follow-on well
We do not currently write those items to the restart file but will
extend the support as need arises.
In particular, make RstWell::segment() return 'reference-to-const'
instead of an object. While here, also rewrap the licence blocks
and reorder two data members. The latter is in preparation of
adding restart support for economic limits (WECON).
In preparation of supporting new data types (PLT and segment).
Introduce a wrapper class, WellRFTOutputData, which knows about all
supported data types and how to emit the RFT record header. Defer
specialised data type handling to dedicated record types and, to
this end, rename the existing WellRFT class to RFTRecord.
Mostly by switching from
if (something) {
handle case
}
into
if (! something) {
continue;
}
handle case
While here, also reduce the length of a couple of very long lines.
While useful for analysis in the case of failure, end users will
typically not care that we "rerun" portions of the SCHEDULE section
in response to triggering an action. In the cases where we do need
those messages they will be available in the CASE.DBG file instead.
without this, the restart writer will trigger a segmentation fault
error.
And also, some minor refactoring and function development so that the
simulator can check whether there are valid connections defined for
aquifers with certain id.
This function converts a std::tm to a std::time_t, assuming UTC
and not local timezone. This is used instead of relying on
repeated calls to mktime(), which can fail on some system (BSD)
for dates before 1900.
Remove erroneous warning messages:
NNC: invalid value '' in record 1 for item 12
In file: RON-P50-A01-OPM.DATA, line 3387
NNC(FACE1): not supported use 1* - will continue
For NNC(FACE1) and NNC(FACE2) by deleting the default "" value in the JSON file.
Client model had hundreds of these messages.
Remove the C++ code checks and instead place the logic in the keyword JSON files. This is a cleaner approach.
Note we force that only one of the keywords is allowed in the deck to avoid confusion on what cut-off is actually being applied.
Add support for MINPORV, which is an alias for MINPV. Also added additional checks, such that only one of MINPV, MINPORV and MINPVFIL can be active in the deck
This commit switches to constructing Box instances from a GridDims
and two call-back functions instead of taking an EclipseGrid
directly. The two call-back functions are a predicate for active
cells and a translation from Cartesian to active cell indices
respectively.
This is intended to simplify working with nested boxes, such as
those that occur for local grid refinement.
This commit switches the Cartesian -> IJK decomposition in GridDims
from K->J->I into the I->J->K order. The latter is simpler.
While here, also consistently use 'std::size_t' instead of 'size_t'.
The constructor did implicitly assume that no cell in a numerical
aquifer would be declared inactive in ACTNUM, and this restriction
still applies. Moving numerical aquifer property and connection
processing into the constructor body enables using existing member
functions for non-neighbouring connections and removes a branch that
obscured the fact that we should have ACTNUM be as close to
finalised as possible before creating analytic aquifer connections.
During a report step, if there are multple records for a well has
defaulted connection and completion information, only the last record
will apply to that well.
But the following record is considered not to have defaulted connection
and completion information.
WMPIMUL
'WEL' 0.8 0 0 0 /
/
Commit eca858335 introduced a more comprehensive way of forming the
initial ACTNUM array used when constructing the EclipseGrid from a
corner-point description. This commit applies that strategy to all
known grid types. As an additional benefit this will also cover one
special case that was not handled and would effectively discard the
work done in the generalised initial ACTNUM construction.
Add unit tests to exercise the ACTNUM handling for other grid types.
This commit introduces a new helper template class,
FlatTableWithCopy<RecordType>
which wraps a vector<RecordType>, provides constructors from
DeckKeyword and initializer_list<RecordType> and handles copying
tables for all-defaulted records.
We reimplement the PVTW, DENSITY, and GRAVITY tables in terms of
this helper class to reduce duplication. If the copy behaviour is
generally useful/needed we expect to replace the existing FlatTable
mechanism with the new helper.
Suggested by: Markus Blatt
The existing mechanism did not handle this case sufficiently well.
It is likely that we will have to polish this approach, but for now
use an explicit table copy to ensure that we have structurally
correct backing table data.
A simulation model may choose to give PVTW data as
PVTW
1.0 1.0 1.0e-5 0.2 0.0 /
/ -- record 2 (copied from record 1)
if, for instance, the oil and/or gas tables are different in regions
1 and 2, but the water is the same. In this case we must properly
copy record 1 into record 2 and essentially recreate the table.
To this end, decouple the 'PvtwTable' from the 'FlatTable' machinery
and make the former into an independent type containing vector<>
instead of inheriting from vector<>. Implement the default->copy
behaviour in the new PvtwTable::PvtwTable(const DeckKeyword&)
constructor.
The well list positions for individual wells (i.e,, IWLS) need not,
and typically are not, strictly increasing in the restart files.
Therefore we must only 'resize()' the well name vectors if the
'well_order' is strictly larger than the current size. Otherwise,
we lose information about which wells are in which well lists.
This commit adds support for the GEFF, WEFF, and WEFFG summary
vectors that report the efficiency factors at the well (WEFAC) and
group (GEFAC) levels. WEFFG additionally accounts for efficiency
factors in a well's superior groups in the group tree.
Faults are stored in an OrderedMap with the full string used during
construction even if that is longer than 8 characters. When later
these faults are e.g. modified whith MULTFLT using only the first 8
characters, the only message the user got was
```
An error occurred while creating the reservoir properties
Internal error: Key not found:
Unrecoverable errors while loading input: Key not found
```
With this patch we at least add some more context to the error
message:
```
Error:
An error occurred while creating the reservoir properties
Internal error: [/../EclipseState.cpp:362] Could not set fault transmissibility multiplier 5.23166e-10 for fault CFN2_05t: Key ABCD_05q not found. Similar entries are ABCD_05q_extended_width, UABCD_05q_extended_width.
```
Message now becomes:
```
Error: Problem with keyword MULTIREG
In /path/to/file.inc line 3
region operation on 3D field MULTZ with global storage is not implemented!
```
MULTZ is the only keyword that is stored in global representation
(i.e. with values for inactive cells, too) to allow the "PINCH ALL"
processing. This produced errors like:
```
Error:
An error occurred while creating the reservoir properties
Internal error: Region operations on 3D fields with global storage is
not implemented
```
With this change the error message has more information for the user
and might help to work around it:
```
Error:
An error occurred while creating the reservoir properties
Internal error: In file /path/to/file.inc line 3: MULTIREG region operation on 3D field MULTZ with global storage is not implemented!
```
ERft - return false (not throw an exception) if function hasArray( .. ) is used with an
non-existing rftreport.
ERst - new memeber function hasArray ( .. )
Convert the Python opm package from a regular package to a namespace
package such that opm-simulators can contribute to the package from a
different filesystem path. In this way, the two packages opm.simulators
and opm.io (for example) can have a different parent filesystem path.
Previously, touching CMakeLists.txt after a first compilation would
trigger compile errors as the two CMake runs were done with
inconsistent parameters (first one without USE_SUPERLU defined and
second one with -DUSE_SUPERLU=ON). Of course that meant that the
options would also differ from module to module, which seems like a
recipe for desaster.
This patch fixes this by moving the definition of the USE_SUPERLU
option to OpmInit.cmake which is included very early in the top most
CMakeLists.txt of each module.
ClosesOPM/opm-simulators#3908
We need to honour a "small rate threshold" when outputting the lift
gas max supply rate limit and total gas production limit. This
threshold renders the output discontinuous, but is needed for
compatibility.
Uses GNUInstallDIrs' CMAKE_INSTALL_DATAROOTDIR as top directory for
common python scripts. Also adds that location to
opm-project-config.cmake.in such that other opm modules can
easily lookup the common scripts
Loading summary vector from restart simulation with loadBaseRunData = true and selected summary vector not present in baserun.
Common use case where a new vector added in the restart run.
The ESMRY file can be updated with more time step data in the time span between opening an ESMRY file
and loading actual summary data from the file. This can happen if the ESMRY is generated by an active
run. Length of summary vectors extracted will be equal to number of time steps on disk when the file was
first opened (with the constructor).
We effectively ignore JFUNC data unless end-point scaling is
activated through the ENDSCALE keyword in the RUNSPEC section.
Alert the user to this fact by terminating the simulation run if the
case uses JFUNC without ENDSCALE present in RUNSPEC. In this case,
issue a diagnostic message of the form
Error: Unrecoverable errors while loading input: Problem with keyword JFUNC
In CASE.DATA line 125
Incompatible keyword combination: JFUNC declared, but ENDSCALE is missing.
The current Network::Balance class applies default values a little
too eagerly and this leads to problems for restarted simulation. We
must take care to preserve the "did this item have a value" state
also in the restart file lest interactions with TUNING be lost
there.
To this end, make the minimum timestep size for network balancing be
an std::optional<> and use std::nullopt to represent "no value set"
in the input file. While here, also preserve negative balancing
intervals exactly instead of replacing these values by zero.
In particular, add more unit testing and give names to a number of
index constants.
Thanks to [at]blattms for reviewing the initial version of this
patch.
Instead, just declare that all non-FIELD groups are subject to
higher-level control of the water injection.
This hack is needed for compatibility on a real field case. We must
revisit this at a later point.
If a simulation model explicitly assigns a target or limit of 0.0,
then we must honour that value in the restart file. Use a more
complete condition to detect whether or not group level targets or
limits are defaulted in GCONPROD and/or GCONINJE.
In particular, add entries from WECON, WGRUPCON and, WVFPEXP and fix
an incorrect item attribution for the WTEST 'reason' parameter.
Thanks to [at]tskille for invaluable assistance in identify these
items.
This commit outputs the various BxIP* summary output values such as
BOIP (block-level oil-in-place) and BGIPL (block-level gas-in-place
in liquid phase). While here, also add support for outputting the
block-level dissolved gas-oil-ratio (BRS) and vaporised
oil-gas-ratio (BRV).
Adds a method get_injection_properties() to the Python interface to
Opm::Schedule. This method can be used to get information about
Well::WellInjectionProperties for a given report step.
In order to avoid code duplication between opm-simulators and opm-common,
logic in CMakeLists.txt was refactored out into
cmake/Modules/PyInstallPrefix.cmake
This commit introduces a new overload of the updateUDQActive member
function of the WellInjectionProperties and WellProductionProperties
classes. The new overload is specifically targeted at accounting
for any active UDAs in WELTARG records. It is possible to have
"regular" UDAs introduced in WCONPROD/WCONINJE and also a separate
set of UDAs attributed to WELTARG at the same time so we need to be
able to distinguish the two cases.
Call the new overload from the WELTARG keyword handler.
This replaces the cost of maintaining sets of switch/case statements
with some additional runtime cost of looking up the corresponding
keyword in a std::map<>, but these functions are not called in inner
loops so the extra cost is justified.
This commit extends the set of supported UDQ enumators to include
those of the WELTARG keyword. This is in preparation of adding
restart file support for such cases.
We usually list all libraries that might be needed for linking in the
CMake package configuration files. This is needed when building static
libraries as we do not yet use CMake targets (which would allow to
list them differently). As we are doing this unconditionally and
also including the ones listed in modules that we depend on, changing
a library (e.g. moving from Python 3.9 to 3.10) requires a complete
rebuild of all modules to get rid of the stale dependency on
libpython3.9.
At least when building shared libraries listing the dependencies is
not needed and this patch simply removes all shared libraries form the
list in the CMake package configuration file. Thus we only need to
recompile the modules that have direct dependency on a stale library.
We now print
"Keyword category 'Region' (e.g., summary keywords RPR) not supported
by ACTIONX."
instead of
"make_default_nodes does not yet support: RPR"
Adds get_production_properties() to the python interface to Schedule.
This method can be used to get information about
Well::WellProductionProperties for a given report step
Quadmath is usually unused except when a dependency uses it and
explicitly puts QuadMath::QuadMath into their CMake package
configuration file.
On most platforms the compiler has Quadmath available by
default. But on those that don't we should not stop CMake and fail.
Hence now we only print a message that Quadmath is not available.
Concerning MPI, both DUNE and OPM must be compiled with the
same default. For DUNE that is to used MPI if it is found.
With the previous default Cmake in opm-grid would fail for
DUNE 2.8
Even if SuperLU is found umfpack will be used as the coarse
solver for AMG. But if dune-fem is used that will need SuperL
if it is on the system otherwise linking will fail for DUNE 2.8
Quadmath is used by dune-fem if it is found and linking of flow
will fail in this case for DUNE 2.8 if we did not search for it.
This commit recognises the summary vector "BNSAT" as a supported
keyword. This, in turn, enables retrieving the simulator's solvent
saturation values at the block level as a time series.
- add parameter for which toolset to use
- build against openmpi3
- build with python support
- add boolean flags for the different mpi builds (mostly for testing)
- add parameter for appending extra token to package names.
this can be used for allowing multiple versions to be installed on the
same system.
The commercial simulator does not support parenting a well directly
to the FIELD group and Flow in multiple locations implicitly assumes
that no well is parented directly to FIELD either.
With this commit we detect this situation at the parser stage and
stop reading the input file. In this case, we issue a diagnostic
message of the form
Error: Problem with keyword WELSPECS
In SPE1CASE1.DATA line 384
Wells cannot be parented directly to 'FIELD'.
Wells entered with disallowed 'FIELD' parent group:
* PROD
* INJ
Error: Unrecoverable errors were encountered while loading input
We define a valid cell geometry as one in which all components of
all eight corner vertices of a cell have finite coordinate values
(absolute value less than 1.0E+20) and at least one pair of pillar
vertices are separated by a positive distance.
One can now set the variable OPM_BINARY_PACKAGE_VERSION to a
meaningful version string (Debian 11.2: 2021.10-4). When building
outside of git it will be used as the project hash. If the variable is
non-empty there will also be no timestamp in project-timestamp.hh (as
this would break reproducible builds).
Note that if building from git or not setting the variable then everything
will be like before.
Instead of checking whether this is Debian system we query the
sitepackages path from Python. If it matches dist-packages then
we use dist-packages if we install below /usr, otherwise site-packages
is used.
Compiling will fail at a very late stage and might cause surprises
for novice users. It seems much better to issue an error in CMake with
a meaningful error message. Might prevent some support issues in the
future.
This commit adds support for the BWPR and BGPR summary vectors that
output block-level phase pressures for water (BWPR) and gas (BGPR)
to the summary file.
A lambda expression can read the value of a variable without
capturing it if the variable
has const non-volatile integral or enumeration type and
has been initialized with a constant expression
Clang issues a diagnostic if such variables are captured so drop the
'sz' from the explicit list of captures.
This commit adds the glue code necessary to extract the pertinent
flow rate values from an inter-region flow rate map and then
accumulating those into the SummaryState. We multiply with the
timestep size if we're computing a cumulative total volume.
Add basic unit test for this part of Summary::eval().
If a well is entered in WCON{INJE,PROD} as status 'SHUT' but later
activated in WELOPEN, we must take care to record this status change
in the well's internal "has_produced" or "has_injected" flags as
appropriate. Otherwise, the counts of "abandoned" wells will not be
correct.
This commit adds a new parameter, interreg_flows, to the eval()
member function of class Opm::Summary. This is in preparation of
adding summary file output of inter-region flow rates and
cumulatives-e.g., the ROFT summary vectors.
This commit introduces a new helper facility,
data::InterRegFlowMap
that knows how to interpret region IDs. It is a simple wrapper
around a common CSR representation of (source, destination) region
ID pairs with the additional feature that the element type of the
connection is a linear sequence values of arithmetic type. We've
initially elected to make this sequence out of 'float' in order to
conserve memory since we expect to do little arithmetic to the
sequence itself outside of compression and parallel communication.
Client code will be of two primary categories
1. Producing side which inserts flow rates from individual
connections, compresses the result when done, and communicates
the results to one or more parallel I/O ranks
2. Consuming side, typically on an I/O rank, which merges the
contributions from multiple source ranks and extracts values
pertaining inter-region flows for purpose of outputting time
series data to a summary file.
The first case will create and populate 'FlowRates' and add these
into the container using the 'addConnection' function and finally
call 'compress' when complete. Consumers will then use member
function 'getInterRegFlows' to extract a signed view of flow rate
values associated to a particular region ID pair (nullopt if no such
pair is registered).
This commit introduces a wrapper for a linear subrange of
consecutive elements of an arithmetic type that imposes an ordering
of the elements when treated as directional component surface flow
rates. The wrapper distinguishes negative from positive flow rate
contributions and tracks those separately. This is a building block
for accounting for the inter-region flows in a parallel context.
When a restarted model uses SKIPREST, there must be DATES or TSTEP
records/report times that correspond exactly to the restart time.
The current diagnostic message is a little too brief and developer
centric and does not offer sufficient hints to the user as to what
the underlying issue might be.
Try to expand the current message and provide more clues to the user
by mentioning both the SKIPREST and RESTART keywords in addition to
the expected and encountered time points.
Example original message:
Error: Problem with keyword DATES
In PRED_FLOW.DATA line 223
At date: 2019-04-18 - scanned past restart data: 2019-04-12
Example message in this commit:
Error: Problem with keyword DATES
In PRED_FLOW.DATA line 223
In a restarted simulation using SKIPREST, the DATES keyword must have
a record corresponding to the RESTART time 12-Apr-2019 00:00:00.
Reached time 18-Apr-2019 00:00:00 without an intervening record.
This commit adds a new query
SummaryConfig::fip_regions_interreg_flow
that retrieves the set of FIP array names (e.g., FIPNUM and FIPXYZ)
that are associated to any inter-region flow summary keywords. This
query method returns an empty set if there are no inter-region flow
summary keywords.
This commit extends the 'SummaryConfig' support for inter-region
flows to be aware of user-provided FIP arrays. In other words, we
now recognize, e.g., that
ROFT_XYZ
is the cumulative inter-region oil flow volume corresponding to
regions defined by the 'FIPXYZ' region definition.
Somehow using a custom build_ext subclass always triggered a failing
rebuild when testing:
/usr/lib/ccache/g++-10 -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.9/cxx/builtin_pybind11.o build/temp.linux-x86_64-3.9/cxx/connection.o build/temp.linux-x86_64-3.9/cxx/converters.o build/temp.linux-x86_64-3.9/cxx/deck.o build/temp.linux-x86_64-3.9/cxx/deck_keyword.o build/temp.linux-x86_64-3.9/cxx/eclipse_config.o build/temp.linux-x86_64-3.9/cxx/eclipse_grid.o build/temp.linux-x86_64-3.9/cxx/eclipse_io.o build/temp.linux-x86_64-3.9/cxx/eclipse_state.o build/temp.linux-x86_64-3.9/cxx/emodel_util.o build/temp.linux-x86_64-3.9/cxx/export.o build/temp.linux-x86_64-3.9/cxx/field_props.o build/temp.linux-x86_64-3.9/cxx/group.o build/temp.linux-x86_64-3.9/cxx/log.o build/temp.linux-x86_64-3.9/cxx/parsecontext.o build/temp.linux-x86_64-3.9/cxx/parser.o build/temp.linux-x86_64-3.9/cxx/schedule.o build/temp.linux-x86_64-3.9/cxx/summary_state.o build/temp.linux-x86_64-3.9/cxx/table_manager.o build/temp.linux-x86_64-3.9/cxx/unit_system.o build/temp.linux-x86_64-3.9/cxx/well.o -lopmcommon -lboost_system -lstdc++fs -o build/lib.linux-x86_64-3.9/opm/libopmcommon_python.cpython-39-x86_64-linux-gnu.so -fopenmp /usr/lib/x86_64-linux-gnu/libfmt.so.7.1.3
error: can't copy 'build/lib.linux-x86_64-3.9/opm/libopmcommon_python.cpython-39-x86_64-linux-gnu.so': doesn't exist or not a regular file
Therefore we resort to only setting the CC and CXX variables to the
C++ compiler. Note that one cannot use "ccache c++" for CXX.
With the default build_ext the problem vanishes.
CC is the C compiler. CXX is the C++ compiler. Setuptools will
use the C++ compiler for C++ code. Hence it is vital to set that
correctly. If not set the default C++ compiler will be used.
Unfortunately it will use the first string as the CXX compiler and
hence we need to strip ccache. Fortunately it used CC for the
compilation and that works with gcc as well.
Allow ACTIONX keywords with empty conditions, these ACTIONX keywords will always
evaluate to false. Main motivation is to facilitate dummy keywords for PYACTION.
If cmake is run with `-DOPM_ENABLE_EMBEDDED_PYTHON=ON -DOPM_ENABLE_PYTHON=OFF`
a cmake error was produced because the library would depend on
python/cxx/builtin_pybind11.cpp which would not be generated.
We fix this by doing the Python sanity check (deactivate embedded
python if python is disabled) before running source_hook that adds the
dependency.
Closes#2940
It is used verbatim in setup.py in the list that specifies the linker
flage. Hence it needs to comma separted instead of using a semicolon
as separator.
We also rename it to SETUP_PY_LINKAGE to indicate where it is used.
Closes#2947
The run() function invoked by PYACTION has got a new fifth argument which is a
callable the script should utilize to apply the keywords from an ACTIONX
keyword. The callable is implemented as C++ lambda which will run the
Schedule::iterateScheduleSection() method and make sure an updated
SimulatorUpdate variable can be passed back to the simulator.
This is needed for libfmt >= 8.1.0 as in that version the
cast to int was removed from inside the fmt::format call and an
assertion will fail:
```
In file included from /usr/include/fmt/format.h:48,
from /build/opm-common-2021.10/src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQSet.cpp:22:
/usr/include/fmt/core.h: In instantiation of 'constexpr fmt::v8::detail::value<Context> fmt::v8::detail::make_arg(T&&) [with bool IS_PACKED = true; Context = fmt::v8::basic_format_context<fmt::v8::appender, char>; fmt::v8::detail::type <anonymous> = fmt::v8::detail::type::custom_type; T = Opm::UDQVarType&; typename std::enable_if<IS_PACKED, int>::type <anonymous> = 0]':
/usr/include/fmt/core.h:1855:77: required from 'constexpr fmt::v8::format_arg_store<Context, Args>::format_arg_store(T&& ...) [with T = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, long unsigned int&, Opm::UDQVarType&, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, long unsigned int&, Opm::UDQVarType&}; Context = fmt::v8::basic_format_context<fmt::v8::appender, char>; Args = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long unsigned int, Opm::UDQVarType, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long unsigned int, Opm::UDQVarType}]'
/usr/include/fmt/core.h:1872:38: required from 'constexpr fmt::v8::format_arg_store<Context, typename std::remove_cv<typename std::remove_reference<Args>::type>::type ...> fmt::v8::make_format_args(Args&& ...) [with Context = fmt::v8::basic_format_context<fmt::v8::appender, char>; Args = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, long unsigned int&, Opm::UDQVarType&, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, long unsigned int&, Opm::UDQVarType&}]'
/usr/include/fmt/core.h:3119:44: required from 'std::string fmt::v8::format(fmt::v8::format_string<T ...>, T&& ...) [with T = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, long unsigned int, Opm::UDQVarType, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, long unsigned int, Opm::UDQVarType}; std::string = std::__cxx11::basic_string<char>; fmt::v8::format_string<T ...> = fmt::v8::basic_format_string<char, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, long unsigned int, Opm::UDQVarType, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, long unsigned int, Opm::UDQVarType>]'
/build/opm-common-2021.10/src/opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQSet.cpp:523:27: required from here
/usr/include/fmt/core.h:1728:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt
1728 | formattable,
| ^~~~~~~~~~~
/usr/include/fmt/core.h:1728:7: note: 'formattable' evaluates to false
```
Otherwise, the equality operators for a default-constructed
TableManager object, mostly used in unit tests, will depend on
uninitialised values.
Thanks to [at]akva2 for the initial clue to the underlying cause.
This commit adds new nodes pertaining to the inter-region flows to
the summary configuration keyword list. We combine the pair of
region IDs into a single 'NUMS' value as part of creating the node.
We also split inter-region nodes into a "supported" and an
"unsupported" set, with the former containing the oil, gas, and
water keywords.
While here, also correct a misprint in a diagnostic message which I
noticed as part of developing the new feature.
This commit introduces new helper functions
int EclIO::combineSummaryNumbers(int, int)
tuple<int, int> EclIO::splitSummaryNumber(int)
that know about the relation
combined = n1 + 32768*(n2 + 10)
This relation is typically used to combine one-based region IDs for
inter-region flows into a single 'NUMS' entry in the summary file.
This commit adds support for recognizing additional inter-region
flow rate/cumulatives at the parser level. In particular, we now
have input support for the E300-compatible keyword strings
R[OGW]F(R[-+]?|T[-+])
(e.g., ROFR, RGFT-, or RWFR+). This, in turn, ensures that the
parsing process does not abruptly terminate when encountering such
summary keywords. This is also a necessary step towards supporting
actually calculating those summary vectors, but we presently do not
support doing so.
Expand the minimum, input-reading only, corresponding unit test to
include the oil, gas, and water varieties of the new keyword strings.
While here, also properly classify the per-phase gas cumulatives
RGFTG, RGFTL
as inter-region summary vectors. These were inadvertently listed as
per-region vectors (i.e., in the REGION_PROBE instead of in the
REGION2REGION_PROBE).
This commit ensures that the field, group, and well level cumulative
production curves of solution/free oil and gas are continuous in a
restarted simulation run.
Thanks to Torbjørn Skille for identifying the appropriate locations
in XGRP/XWEL for outputting these items.
This is a quick fix.
The problem that occurs is the following. After loadbalancing the
FieldPropsManager only has a non-nullptr to the FieldProperties on
the process with rank=0. Therefore most of the calls to it will
segfault. This has not been problem before changeset
2921838895. We did not make any calls to e.g.
FieldProperties::apply_schedule_keywords during a simulation.
Now we do via [eclproblem.hh#L1021-L1022](/OPM/opm-simulators/blob/3e4e62bc4f6f6f8a02eb2d2e4976dc2e2d956313/ebos/eclproblem.hh#L1021-L1022))
The maximum supply of lift gas and/or the maximum total gas flow
rate of a group may be defaulted in the context of lift gas
optimisation. In that case, the std::optional<> objects will be
empty and we must not access the contained object through the
value() member function. We output the sentinel value "-10" in this
case.
This is more self-documenting that numeric item indices. While
here, also switch to constructing the EQUIL record in place instead
of forming a temporary and moving it into the vector.
This commit ensures that we do not access the well's BHP reference
depth unless that value is well defined. If the input deck does not
define an explicit BHP reference depth (WELSPECS(5)), and if the
well does not have any active reservoir connections, then we are
supposed to output the usual sentinel value (-1.0E+20) as the datum
depth in 'SWEL'.
Account for this altered semantics in the restart reader too.
This commit adds a new member function,
bool Well::hasRefDepth() const
that allows the caller to query whether or not a particular well has
an active value for the well BHP reference depth. The most common
cause of this value being missing is that the depth item of WELSPECS
is defaulted while the well is not connected to any active cells.
This predicate allows client code, e.g., the restart output module,
to safely access reference depth values in the case of potentially
missing reference depths.
corrections to intehead for netbalan data plus improvements createdoubhead
simplification of code due to changes in master
correction to default value for NETBALAN PRESSURE_CONVERGENCE_LIMIT
- Pass segment string as argument to lambda get instead of binding at
declaration.
- Use SummaryState::get() overload with default
- Introduce scope to make special casing of first segment more distinct
Currently, an rpath to the install directory of libopmcommon.so is
generated for libopmcommon_python.so, but a similar rpath is not added to
the libopmcommon.so in the build directory. It is useful to be able to
use the build directory libraries when not compiling with
-DOPM_INSTALL_PYTHON or when developing.
This PR fixes issue #2843.
This hides them for shared libraries that do not need them.
Should fix the following lintian warnings:
W: libopm-common-dev: pkg-config-references-unknown-shared-library usr/lib/x86_64-linux-gnu/pkgconfig/opm-common.pc -lpython3.7m (line 12)
W: libopm-common-dev: pkg-config-references-unknown-shared-library usr/lib/x86_64-linux-gnu/pkgconfig/opm-common.pc -lstdc++fs (line 12)
W: libopm-common-dev: pkg-config-references-unknown-shared-library usr/lib/x86_64-linux-gnu/pkgconfig/opm-common.pc -lgomp (line 12)
W: libopm-common-dev: pkg-config-references-unknown-shared-library usr/lib/x86_64-linux-gnu/pkgconfig/opm-common.pc -lboost_system (line 12)
W: libopm-common-dev: pkg-config-references-unknown-shared-library usr/lib/x86_64-linux-gnu/pkgconfig/opm-common.pc -lcjson (line 12)
Gbp-Pq: Name 0002-List-link-dependencies-as-private.patch
This commit hooks the new RstNetwork object into the restart feature
of the main Schedule object. We form ExtNetwork Schedule subobjects
if there are active branches and nodes in the restart file.
This commit adds a new helper class, RstNetwork, that loads the raw
data representing the extended network model from restart vectors
IBRAN, INODE, RNODE, and ZNODE. We support loading the information
that is currently output to those restart vectors, but those do not
include every option supported by the input keywords BRANPROP and
NODEPROP.
The RstNetwork type supports querying whether or not the extended
network model is active and, if so, to get iterable collections of
branches and nodes that are geared towards constructing ExtNetwork
objects.
Add support for UDA values items when constructing DeckKeywords from
DeckValues. This is needed when constructing DeckKeywords
from Python. For example WCONPROD has UDA value argument for the oil
rate.
If constraints are applied at the field level, e.g., through the
GCONINJE keyword, then we must incorporate those constraints into
FIELD when restarting a simulation run. This commit takes a step in
this direction by explicitly loading the *GRP array entries
pertaining to FIELD and special casing
Schedule::addGroup(RstGroup, time)
to look for "rst_group.name == FIELD". In that case, we update the
injection and production properties of the existing FIELD group as
needed.
Changed (BASE_SIM.DATA, BASE_SIM_THPRES.DATA, RESTART_SIM.DATA), testblackoilstate3.DATA and testrft.DATA since they affect the tests in test_Restart.cpp, test_restartwellinfo.cpp and test_RFT.cpp respectively.
The xLPT curves should not start at zero in a restarted simulation
run. This commit initialises the cumulative liquid production
volume using the value
xOPT + xWPT
with the individual terms taken from XWEL or XGRP as appropriate.
this means getting rid of the Opm::filesystem namespace
and directly using std::filesystem, as well as dropping
some of the compat code for the tr filesystem.
we still need the FileSystem.hpp/cpp files though as unique_path
is not part of std::filesystem.
This commit extracts the 'NameOrder' sorting operation to a new
public member function, WellMatcher::sort(vector<string>). The
immediate use-case for this function is to provide a stable sorting
order for wells that are matched in an ACTIONX block. Well IDs
often end up in various output arrays in the restart files--e.g., in
the IUAP array the matching wells are used in a WCON* keyword that
employs a user-defined argument as part of setting its targets or
limits--and we should strive to keep those arrays as deterministic
as possible.
This commit adds a new predicate, GuideRate::hasPotentials(), that
checks whether or not rates exist in the 'potentials' array for a
particular well or group name. If neither explicit guide rate
values nor potential rates exist for a particular "wgname", then it
is an error to call GuideRate::get() and that member function will
throw an exception. This new predicate provides a way of avoiding
that exception.
Fixes errors like
Target "test_communication_utils" links to target
"PkgConfig::PkgConfigTBB" but the target
was not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
When configured with TBB dune-common-targets.cmake lists the
imported TBB::tbb or PkgConfig::PkgConfigTBB target
in INTERFACE_LINK_LIBRARIES. Hence we need to be able to resolve
this target in opm. We do this by searching for TBB id dune-common
is a prerequisite.
This commit fixes the problem only for newer versions of TBB shipping a
TBBConfig.cmake file.
The error fixed is along these lines:
Target "test_communication_utils" links to target "TBB::tbb" but the target
was not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
This commit add support for saving connection-level cumulative
quantities (e.g., those denoted by summary vectors COPT or CVIT) to
the restart file (in the 'XCON' array) and to restore these values
back to the 'SummaryState' object upon simulation restart.
Thanks to Torbjørn Skille and Jostein Alvestad for invaluable
assistance in characterising these XCON items.
In particular, ensure that connection-level cumulatives are always
available in the SummaryState. Also generate the connection-level
flowing gas/oil ratio (CGOR) while here.
In particular, add named items for cumulative production and
injection in the XCON array. These are needed in order to generate
continuous connection-level curves in restarted runs.
While here, also add a named item for the well-level cumulative oil
injection quantity.
@@ -11,55 +10,57 @@ The program takes four arguments:
3. Absolute tolerance
4. Relative tolerance (between 0 and 1)
.PP
.SHOPTIONS
.HP
In addition, the program takes these options (which must be given before the arguments):
.PP
\fB\-a\fR Run a full analysis of errors.
.TP
\fB\-h\fR Print help and exit.
.TP
\fB\-d\fR Use report steps only when comparing results from summary files.
.TP
\fB\-i\fR Execute integration test (regression test is default).
.IP
The integration test compares SGAS, SWAT and PRESSURE in unified restart files, and WOPR, WGPR, WWPR and WBHP (all wells) in summary file.
.PP
\fB\-k\fR Specify specific keyword to compare (capitalized), for examples \fB\-k\fR PRESSURE or \fB\-k\fR WOPR:A\-1H
\fB\-l\fR Only do comparison for the last Report Step. This option is only valid for restart files.
\fB\-n\fR Do not throw on errors.
\fB\-p\fR Print keywords in both cases and exit.
\fB\-r\fR compare a spesific report time step number in a restart file.
\fB\-t\fR Specify ECLIPSE filetype to compare, (default behaviour is that all files are compared if found). Different possible arguments are:
.TP
\fB\-l\fR Only do comparison for the last Report Step. This option is only valid for restart files.
.TP
\fB\-n\fR Do not throw on errors.
.TP
\fB\-p\fR Print keywords in both cases and exit.
.TP
\fB\-r\fR compare a specific report time step number in a restart file.
.TP
\fB\-t\fR Specify ECLIPSE filetype to compare, (default behaviour is that all files are compared if found). Different possible arguments are:
.IP
\fB\-t\fR UNRST
Compare two unified restart files (.UNRST). This the default value, so it is the same as not passing option \fB\-t\fR.
.TP
.IP
\fB\-t\fR EGRID
Compare two EGrid files (.EGRID).
.TP
.IP
\fB\-t\fR INIT
Compare two initial files (.INIT).
.TP
.IP
\fB\-t\fR RFT
Compare two RFT files (.RFT).
.TP
.IP
\fB\-t\fR SMRY
Compare two cases consistent of (unified) summary files.
.IP
\fB\-t\fR RSM
Compare RSM file against a summary file.
.PP
\fB\-x\fR Allow extra keywords in case number 2. These additional keywords (not found in case number1) will be ignored in the comparison.
.PP
Exampleusage of the program:
.SH Example usage ofthe program:
.PP
compareECL \fB\-k\fR PRESSURE <path to first casefile> <path to second casefile> 1e\-3 1e\-5
compareECL \fB\-t\fR INIT \fB\-k\fR PORO <path to first casefile> <path to second casefile> 1e\-3 1e\-5
compareECL \fB\-i\fR <path to first casefile> <path to second casefile> 0.01 1e\-6
.PP
Exceptions are thrown (and hence program exits) when deviations are larger than the specified tolerances, or when the number of cells does not match \fB\-\-\fR either in the grid file or for a specific keyword. Information about the keyword, keyword occurrence (zero based) and cell coordinate is printed when an exception is thrown. For more information about how the cases are compared, see the documentation of the EclFilesComparator class.
.SH"SEE ALSO"
The full documentation for
.BcompareECL
is maintained as a Texinfo manual. If the
.Binfo
and
.BcompareECL
programs are properly installed at your site, the command
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.