Compare commits

...

21 Commits

Author SHA1 Message Date
Markus Blatt
90d18f7d1a Changed version in dune.module to 2022.04 2022-05-12 11:39:24 +02:00
Markus Blatt
8f13f559f8
Merge pull request #3025 from blattms/backport-of-pr-3023
[backport] Do not hard-code shared-libs in package configuration if not needed.
2022-05-06 14:36:53 +02:00
Markus Blatt
e66fd64dba Do not hard-code shared-libs in package configuration if not needed.
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.
2022-05-06 14:33:28 +02:00
Markus Blatt
388c852c27
Merge pull request #3017 from blattms/backport-of-pr-3015
[backport] Install python bindings as default.
2022-05-02 12:47:39 +02:00
Markus Blatt
c7d50318e7 Install python bindings as default.
This is for consistency with opm-simulators, which (always)
installs them if they are built.

Closes #2976
2022-05-02 12:39:40 +02:00
Markus Blatt
23ad6d7383
Merge pull request #3013 from blattms/backport-of-pr-3012
[backport] Make not finding Quadmath non-fatal (e.g. not available on arm64)
2022-04-29 11:51:54 +02:00
Markus Blatt
c8e5935a19 Make not finding Quadmath non-fatal (e.g. not available on arm64)
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.
2022-04-29 11:21:40 +02:00
Markus Blatt
28f9f86c65
Merge pull request #3011 from blattms/backport-of-pr-3006
[backport] Added default values for I, J, K1 and K2
2022-04-28 12:27:27 +02:00
Øyvind Lind-Johansen
783e6f6555 Added default values for I, J, K1 and K2 2022-04-28 12:23:33 +02:00
Markus Blatt
536641d5d7
Merge pull request #3010 from blattms/backport-of-pr-3007
[backport] fixed: avoid direct floating point comparisons in tests
2022-04-28 12:23:00 +02:00
Markus Blatt
1f40b8cdaa
Merge pull request #3009 from blattms/backport-of-pr-3008
Spelling fixes (valied -> valid).
2022-04-28 12:21:12 +02:00
Markus Blatt
573609832d Spelling fixes (valied -> valid). 2022-04-28 12:19:05 +02:00
Arne Morten Kvarving
7945f45c5e fixed: avoid direct floating point comparisons in tests
we want to compare with an epsilon since these have gone
through calculations
2022-04-28 12:17:19 +02:00
Markus Blatt
dc207254ae Bump version to 2022.04-rc1 2022-04-26 20:02:39 +02:00
Markus Blatt
2721fe62bd
Merge pull request #3001 from blattms/backport-of-pr-2997
[backport] Cleanup, update and improve man pages for 2022.04
2022-04-21 11:31:56 +02:00
Markus Blatt
4637126794 Cleanup, update and improve man pages for 2022.04 2022-04-21 11:29:25 +02:00
Markus Blatt
80e9abdd69
Merge pull request #3000 from blattms/backport-of-pr-2998
[backport] added: ability to use jenkins build scripts for release test building
2022-04-21 11:25:46 +02:00
Arne Morten Kvarving
c5a01d7d84 added: ability to use jenkins build scripts for release test building
we need to be able to specify absolute refs to use for the repos
rather than a pull request number.
2022-04-21 11:24:37 +02:00
Markus Blatt
a965a18320
Merge pull request #2996 from blattms/backport-of-pr-2995
[backport] Use dune buildsystem defaults
2022-04-20 20:24:45 +02:00
Markus Blatt
a561e68b41 Require UMFPack
A direct coarse solver of AMG is needed for good convergence and umfpack
was tested to work better than SuperLU previously. Hence we now require it.
2022-04-20 19:53:13 +02:00
Markus Blatt
a44c0ad80b Always build with MPI and search for SuperLU and Quadmath.
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.
2022-04-20 19:53:13 +02:00
22 changed files with 296 additions and 142 deletions

View File

@ -9,7 +9,7 @@ option(ENABLE_ECL_INPUT "Enable eclipse input support?" ON)
option(ENABLE_ECL_OUTPUT "Enable eclipse output support?" ON)
option(ENABLE_MOCKSIM "Build the mock simulator for io testing" ON)
option(OPM_ENABLE_PYTHON "Enable python bindings?" OFF)
option(OPM_INSTALL_PYTHON "Enable python bindings?" OFF)
option(OPM_INSTALL_PYTHON "Install python bindings?" ON)
option(OPM_ENABLE_EMBEDDED_PYTHON "Enable embedded python?" OFF)
# Output implies input

View File

@ -43,7 +43,7 @@ int main(void){
endif()
if (USE_QUADMATH AND NOT QUADMATH_FOUND)
message(FATAL_ERROR "Quadruple precision math support was explicitly requested but is unavailable!")
message(STATUS "Quadruple precision math support is unavailable! Skipping it.")
endif()
include(FindPackageHandleStandardArgs)

View File

@ -19,7 +19,7 @@ find_opm_package (
"dune-common REQUIRED;
ParMETIS;
SuperLU;
SuiteSparse COMPONENTS umfpack
SuiteSparse COMPONENTS umfpack REQUIRED
"
# header to search for
"dune/istl/bcrsmatrix.hh"

View File

@ -130,7 +130,7 @@ endif ()
# parallel computing must be explicitly enabled
# This needs to be in OpmInit as prereqs is called before OpmLibMain is included.
option (USE_MPI "Use Message Passing Interface for parallel computing" OFF)
option (USE_MPI "Use Message Passing Interface for parallel computing" ON)
if (NOT USE_MPI)
set (CMAKE_DISABLE_FIND_PACKAGE_MPI TRUE)
endif ()
@ -144,7 +144,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
# quadmath must be explicitly enabled
# This needs to be in OpmInit as prereqs is called before OpmLibMain is included.
option (USE_QUADMATH "Use high precision floating point library (slow)" OFF)
option (USE_QUADMATH "Search for high precision floating point library (normally not used)" ON)
if (NOT USE_QUADMATH)
set (CMAKE_DISABLE_FIND_PACKAGE_QuadMath TRUE)
endif ()

View File

@ -64,7 +64,7 @@ include (UseThreads)
find_threads (${project})
# SuperLU is optional
option (USE_SUPERLU "Use SuperLU direct solvers" OFF)
option (USE_SUPERLU "Use SuperLU direct solvers for AMG (if umfpack is not found)" ON)
# PETSc is optional
option (USE_PETSC "Use PETSc iterative solvers" OFF)

View File

@ -54,6 +54,12 @@ function (configure_cmake_file name variant version)
foreach (suffix IN LISTS variable_suffices)
set (opm-project_${suffix} "${${name}_${suffix}}")
endforeach (suffix)
if (BUILD_SHARED_LIBS)
# No need to list shared libraries as the linker information is alread
# in the shared lib
string(REGEX REPLACE ";?[^;]*.so" "" opm-project_LIBRARIES "${opm-project_LIBRARIES}")
endif()
set (opm-project_NAME "${${name}_NAME}")
set (opm-project_NAME_UC "${${name}_NAME}")
string(TOUPPER "${opm-project_NAME}" opm-project_NAME_UC)

View File

@ -1,5 +1,4 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8.
.TH COMPAREECL "1" "April 2021" "compareECL 2020.04" "User Commands"
.TH COMPAREECL "1" "April 2022" "compareECL 2022.04" "User Commands"
.SH NAME
compareECL \- Comparator for Eclipse files
.SH DESCRIPTION
@ -11,55 +10,54 @@ The program takes four arguments:
3. Absolute tolerance
4. Relative tolerance (between 0 and 1)
.PP
.SH OPTIONS
.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 spesific 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.
.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
Example usage of the program:
.SH Example usage of the 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
.B compareECL
is maintained as a Texinfo manual. If the
.B info
and
.B compareECL
programs are properly installed at your site, the command
.IP
.B info compareECL
.PP
should give you access to the complete manual.

View File

@ -1,5 +1,4 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8.
.TH CONVERTECL "1" "April 2021" "convertECL 2020.04" "User Commands"
.TH CONVERTECL "1" "April 2022" "convertECL 2022.04" "User Commands"
.SH NAME
convertECL \- Converter for Eclipse files (binary <-> formatted format)
.SH DESCRIPTION
@ -7,18 +6,13 @@ convertECL needs one argument which is the input file to be converted. If this i
.PP
In addition, the program takes these options (which must be given before the arguments):
.PP
.SH OPTIONS
.HP
\fB\-h\fR Print help and exit.
.TP
\fB\-l\fR list report step numbers in the selected restart file.
.TP
\fB\-i\fR Enforce IX standard on output file.
.TP
\fB\-r\fR extract and convert a spesific report time step number from a unified restart file.
.SH "SEE ALSO"
The full documentation for
.B convertECL
is maintained as a Texinfo manual. If the
.B info
and
.B convertECL
programs are properly installed at your site, the command
.IP
.B info convertECL
.PP
should give you access to the complete manual.

View File

@ -1,5 +1,4 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8.
.TH OPMHASH "1" "April 2021" "opmhash 2020.04" "User Commands"
.TH OPMHASH "1" "April 2022" "opmhash 2022.04" "User Commands"
.SH NAME
opmhash \- Hasher for summary keywords in Eclipse files
.SH DESCRIPTION
@ -40,15 +39,3 @@ depends on the keyword order.
\fB\-l\fR : Add filename and linenumber information to each keyword.
.HP
\fB\-s\fR : Short form \- only print the hash of the complete deck.
.SH "SEE ALSO"
The full documentation for
.B opmhash
is maintained as a Texinfo manual. If the
.B info
and
.B opmhash
programs are properly installed at your site, the command
.IP
.B info opmhash
.PP
should give you access to the complete manual.

View File

@ -1,10 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8.
.TH OPMPACK "1" "April 2021" "opmpack 2020.04" "User Commands"
.TH OPMPACK "1" "April 2022" "opmpack 2022.04" "User Commands"
.SH NAME
opmpack \- Validator and printer of deck in Eclipse files without comments
.SH DESCRIPTION
opmpack: invalid option \fB\-\-\fR 'h'
.PP
The opmpack program will load a deck, resolve all include
files and then print it out again on stdout. All comments
will be stripped and the value types will be validated.
@ -28,15 +25,4 @@ opmpack \fB\-o\fR NEW_CASE.DATA path/to/MY_CASE.DATA
As an alternative to the \fB\-o\fR option you can use \fB\-c\fR; that is equivalent to \fB\-o\fR \-
but restart and import files referred to in the deck are also copied. The \fB\-o\fR and
\fB\-c\fR options are mutually exclusive.
.SH "SEE ALSO"
The full documentation for
.B opmpack
is maintained as a Texinfo manual. If the
.B info
and
.B opmpack
programs are properly installed at your site, the command
.IP
.B info opmpack
.PP
should give you access to the complete manual.

View File

@ -1,7 +1,180 @@
.TH RST_DECK
.TH RST_DECK: "1" "April 2022" "rst_deck 2022.04" "User Commands"
.SH NAME
rst_deck \- Create a version of deck ready for restart
rst_deck \- Convert simulation deck to a deck ready for restart
.SH DESCRIPTION
The rst_deck program will load a simulation deck and parameters for a restart
and reformat the deck to become a restart deck. Before the updated deck is
output the program will update the SOLUTION and SCHEDULE sections. All keywords
from the SOLUTION section will be cleared out(1) and a RESTART keyword will be
inserted. In the SCHEDULE section the program can either remove all keywords up
until the restart date, or alternatively insert SKIPREST immediately following
the SCHEDULE keyword.
.PP
When creating the updated restart deck the program can either link to unmodified
include files with INCLUDE statements, create a copy of deck structure in an
alternative location or create one large file with all keywords in the same
file. Apart from the alterations to support restart the output deck will be
equivalent to the input deck, but formatting is not retained and comments have
been stripped away.
.PP
Arguments:
.PP
1. The data file we are starting with.
.PP
2. The restart source; this can either be a basename with an optional path
.IP
prefix and a :N to restart from step N; alternatively you can point to an
existing restart file. If you point to an existing restart file the input
will be validated in several ways:
.IP
a) Unified/multiple files will be checked against the UNIFIN setting of
.IP
the deck.
.IP
b) Formatted/unformatted will be checked against the FMTIn setting of the
.IP
deck.
.IP
c) If a single file like \fI\,/path/to/case/HISTORY.X0067\/\fP is given as argument the
.IP
:N notation to denote report step should not be used.
.IP
If the restart argument is given as the path to an existing file the content
of the RESTART keyword will be updated to contain the correct path from the
location of the restart deck to the location of the restart file. This path
awareness will be fooled if the restart deck is redirected from stdout to a
path different from cwd. If the restart argument is given as an absolute
filename the RESTART keyword will have an absolute path, if the restart
argument is a relative path the RESTART keyword will get a relative path \-
although an absolute path will be used if the restart file and the output
deck have different roots. If the restart argument is given as a string not
pointing to an existing file it will be inserted verbatim in the restart
deck.
.IP
A restart step value of 0 is interpreted as a dry run \- a deck which has not
been set up for restart will be written out.
.PP
3. Basename of the restart deck we create, can optionally contain a path prefix;
.IP
the path will be created if it does not already exist. This argument is
optional, if it is not provided the program will dump a restart deck on
stdout. If the argument corresponds to an existing directory the restart case
will get the same name as the base case.
.SH OPTIONS
\fB\-s\fR: Manipulate the SCHEDULE section by inserting a SKIPREST keyword immediately
.IP
following the SCHEDULE keyword. If the \fB\-s\fR option is not used the SCHEDULE
section will be modified by removing all keywords until we reach the restart
date.
.PP
\fB\-m\fR: [share|inline|copy] The restart deck can reuse the unmodified include files
.IP
from the base case, this is mode 'share' and is the default. With mode
\&'inline' the restart deck will be one long file and with mode 'copy' the
file structure of the base case will be retained. The default if no \fB\-m\fR
option is given is the 'share' mode.
.IP
In the case of 'share' and 'copy' the correct path to include files will be
negotiated based on the path given to the output case in the third argument.
If the restart deck is passed to stdout the include files will be resolved
based on output in cwd.
.PP
Example:
.IP
rst_deck \fI\,/path/to/history/HISTORY.DATA\/\fP rst/HISTORY:30 \fI\,/path/to/rst/RESTART\/\fP \fB\-s\fR
.PP
1: The program has a compiled list of keywords which will be retained in the
.IP
SOLUTION section. The current value of that list is: RPTRST
.PP
\&../../opm\-parallel/bin/rst_deck: invalid option \fB\-\-\fR 'v'
\&../../opm\-parallel/bin/rst_deck: invalid option \fB\-\-\fR 'e'
\&../../opm\-parallel/bin/rst_deck: invalid option \fB\-\-\fR 'r'
\&../../opm\-parallel/bin/rst_deck: invalid option \fB\-\-\fR 'i'
\&../../opm\-parallel/bin/rst_deck: invalid option \fB\-\-\fR 'o'
\&../../opm\-parallel/bin/rst_deck: invalid option \fB\-\-\fR 'n'
.PP
The rst_deck program will load a simulation deck and parameters for a restart
and reformat the deck to become a restart deck. Before the updated deck is
output the program will update the SOLUTION and SCHEDULE sections. All keywords
from the SOLUTION section will be cleared out(1) and a RESTART keyword will be
inserted. In the SCHEDULE section the program can either remove all keywords up
until the restart date, or alternatively insert SKIPREST immediately following
the SCHEDULE keyword.
.PP
When creating the updated restart deck the program can either link to unmodified
include files with INCLUDE statements, create a copy of deck structure in an
alternative location or create one large file with all keywords in the same
file. Apart from the alterations to support restart the output deck will be
equivalent to the input deck, but formatting is not retained and comments have
been stripped away.
.PP
Arguments:
.PP
1. The data file we are starting with.
.PP
2. The restart source; this can either be a basename with an optional path
.IP
prefix and a :N to restart from step N; alternatively you can point to an
existing restart file. If you point to an existing restart file the input
will be validated in several ways:
.IP
a) Unified/multiple files will be checked against the UNIFIN setting of
.IP
the deck.
.IP
b) Formatted/unformatted will be checked against the FMTIn setting of the
.IP
deck.
.IP
c) If a single file like \fI\,/path/to/case/HISTORY.X0067\/\fP is given as argument the
.IP
:N notation to denote report step should not be used.
.IP
If the restart argument is given as the path to an existing file the content
of the RESTART keyword will be updated to contain the correct path from the
location of the restart deck to the location of the restart file. This path
awareness will be fooled if the restart deck is redirected from stdout to a
path different from cwd. If the restart argument is given as an absolute
filename the RESTART keyword will have an absolute path, if the restart
argument is a relative path the RESTART keyword will get a relative path \-
although an absolute path will be used if the restart file and the output
deck have different roots. If the restart argument is given as a string not
pointing to an existing file it will be inserted verbatim in the restart
deck.
.IP
A restart step value of 0 is interpreted as a dry run \- a deck which has not
been set up for restart will be written out.
.PP
3. Basename of the restart deck we create, can optionally contain a path prefix;
.IP
the path will be created if it does not already exist. This argument is
optional, if it is not provided the program will dump a restart deck on
stdout. If the argument corresponds to an existing directory the restart case
will get the same name as the base case.
.PP
\fB\-s\fR: Manipulate the SCHEDULE section by inserting a SKIPREST keyword immediately
.IP
following the SCHEDULE keyword. If the \fB\-s\fR option is not used the SCHEDULE
section will be modified by removing all keywords until we reach the restart
date.
.PP
\fB\-m\fR: [share|inline|copy] The restart deck can reuse the unmodified include files
.IP
from the base case, this is mode 'share' and is the default. With mode
\&'inline' the restart deck will be one long file and with mode 'copy' the
file structure of the base case will be retained. The default if no \fB\-m\fR
option is given is the 'share' mode.
.IP
In the case of 'share' and 'copy' the correct path to include files will be
negotiated based on the path given to the output case in the third argument.
If the restart deck is passed to stdout the include files will be resolved
based on output in cwd.
.PP
Example:
.IP
rst_deck \fI\,/path/to/history/HISTORY.DATA\/\fP rst/HISTORY:30 \fI\,/path/to/rst/RESTART\/\fP \fB\-s\fR
.PP
1: The program has a compiled list of keywords which will be retained in the
.IP
SOLUTION section. The current value of that list is: RPTRST

View File

@ -1,5 +1,4 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.8.
.TH SUMMARY "1" "April 2021" "summary 2020.04" "User Commands"
.TH SUMMARY "1" "April 2022" "summary 2022.04" "User Commands"
.SH NAME
summary \- Printer for summary keys in Eclipse summary files
.SH DESCRIPTION
@ -7,18 +6,10 @@ summary needs a minimum of two arguments. First is smspec filename and then list
.PP
In addition, the program takes these options (which must be given before the arguments):
.PP
.SH OPTIONS
\fB\-h\fR Print help and exit.
.TP
\fB\-l\fR list all summary vectors.
.TP
\fB\-r\fR extract data only for report steps.
.SH "SEE ALSO"
The full documentation for
.B summary
is maintained as a Texinfo manual. If the
.B info
and
.B summary
programs are properly installed at your site, the command
.IP
.B info summary
.PP
should give you access to the complete manual.

View File

@ -5,8 +5,8 @@
Module: opm-common
Description: Open Porous Media Initiative shared infrastructure
Version: 2022.04-pre
Label: 2022.04-pre
Version: 2022.04
Label: 2022.04
Maintainer: opm@opm-project.org
MaintainerName: OPM community
Url: http://opm-project.org

View File

@ -16,7 +16,12 @@ function parseRevisions {
do
if grep -qi "$upstream=" <<< $ghprbCommentBody
then
upstreamRev[$upstream]=pull/`echo $ghprbCommentBody | sed -r "s/.*${upstream,,}=([0-9]+).*/\1/g"`/merge
if test -n "$absolute_revisions"
then
upstreamRev[$upstream]=`echo $ghprbCommentBody | sed -r "s/.*${upstream,,}=([^ ]+).*/\1/g"`
else
upstreamRev[$upstream]=pull/`echo $ghprbCommentBody | sed -r "s/.*${upstream,,}=([0-9]+).*/\1/g"`/merge
fi
fi
done
if grep -q "with downstreams" <<< $ghprbCommentBody
@ -25,8 +30,13 @@ function parseRevisions {
do
if grep -qi "$downstream=" <<< $ghprbCommentBody
then
downstreamRev[$downstream]=pull/`echo $ghprbCommentBody | sed -r "s/.*${downstream,,}=([0-9]+).*/\1/g"`/merge
fi
if test -n "$absolute_revisions"
then
downstreamRev[$downstream]=`echo $ghprbCommentBody | sed -r "s/.*${downstream,,}=([^ ]+).*/\1/g"`
else
downstreamRev[$downstream]=pull/`echo $ghprbCommentBody | sed -r "s/.*${downstream,,}=([0-9]+).*/\1/g"`/merge
fi
fi
done
fi

View File

@ -10,19 +10,23 @@
},
{
"name": "I",
"value_type": "INT"
"value_type": "INT",
"default": 0
},
{
"name": "J",
"value_type": "INT"
"value_type": "INT",
"default": 0
},
{
"name": "K1",
"value_type": "INT"
"value_type": "INT",
"default": 0
},
{
"name": "K2",
"value_type": "INT"
"value_type": "INT",
"default": 0
},
{
"name": "N",

View File

@ -34,7 +34,7 @@ static void printHelp() {
std::cout << "\nList all arrays found in an EclFile specified on the command line. \n\n"
<< "\nThe program have one option which will only work on unified restart files:\n\n"
<< "-h Print help and exit.\n"
<< "-r List array for a spesific report time step number. Option only valied for a unified restart file. \n\n";
<< "-r List array for a spesific report time step number. Option only valid for a unified restart file. \n\n";
}
void print_array_list(const std::vector<EclEntry>& array_list, const std::vector<int>& element_size)

View File

@ -23,6 +23,7 @@
#define BOOST_TEST_MODULE ACTIONX
#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <opm/common/utility/TimeService.hpp>
#include <opm/common/utility/OpmInputError.hpp>
@ -1268,7 +1269,7 @@ TSTEP
const auto& glo = sched.glo(0);
BOOST_CHECK(glo.has_group("PLAT-A"));
const auto& plat_group = glo.group("PLAT-A");
BOOST_CHECK_EQUAL( *plat_group.max_lift_gas(), unitSystem.to_si( UnitSystem::measure::gas_surface_rate, 200000));
BOOST_CHECK_CLOSE( *plat_group.max_lift_gas(), unitSystem.to_si( UnitSystem::measure::gas_surface_rate, 200000), 1e-13);
BOOST_CHECK(!plat_group.max_total_gas().has_value());
}

View File

@ -29,6 +29,7 @@
#define BOOST_TEST_MODULE FieldPropsTests
#include <boost/test/unit_test.hpp>
#include <boost/test/tools/floating_point_comparison.hpp>
#include <opm/common/utility/OpmInputError.hpp>
#include <opm/input/eclipse/Parser/Parser.hpp>
@ -346,7 +347,7 @@ ENDBOX
// k = 0: poro * V
for (std::size_t g = 0; g < 100; g++) {
BOOST_CHECK_EQUAL(porv[g], grid.getCellVolume(g) * poro[g]);
BOOST_CHECK_CLOSE(porv[g], grid.getCellVolume(g) * poro[g], 1e-13);
BOOST_CHECK_EQUAL(porv[g], 0.10);
BOOST_CHECK_EQUAL(poro[g], 0.10);
BOOST_CHECK_EQUAL(ntg[g], 1.0);
@ -355,7 +356,7 @@ ENDBOX
// k = 1: poro * NTG * V
for (std::size_t g = 100; g < 200; g++) {
BOOST_CHECK_EQUAL(porv[g], grid.getCellVolume(g) * poro[g] * ntg[g]);
BOOST_CHECK_CLOSE(porv[g], grid.getCellVolume(g) * poro[g] * ntg[g], 1e-13);
BOOST_CHECK_EQUAL(porv[g], 0.20);
BOOST_CHECK_EQUAL(poro[g], 0.10);
BOOST_CHECK_EQUAL(ntg[g], 2.0);
@ -372,7 +373,7 @@ ENDBOX
// k = 3: poro * V * multpv
for (std::size_t g = 300; g < 400; g++) {
BOOST_CHECK_EQUAL(porv[g], multpv[g] * grid.getCellVolume(g) * poro[g] * ntg[g]);
BOOST_CHECK_CLOSE(porv[g], multpv[g] * grid.getCellVolume(g) * poro[g] * ntg[g], 1e-13);
BOOST_CHECK_EQUAL(porv[g], 0.40);
BOOST_CHECK_EQUAL(poro[g], 0.10);
BOOST_CHECK_EQUAL(ntg[g], 1.0);
@ -381,7 +382,7 @@ ENDBOX
// k = 4: poro * V * MULTREGP
for (std::size_t g = 400; g < 500; g++) {
BOOST_CHECK_EQUAL(porv[g], grid.getCellVolume(g) * poro[g] * 5.0);
BOOST_CHECK_CLOSE(porv[g], grid.getCellVolume(g) * poro[g] * 5.0, 1e-13);
BOOST_CHECK_EQUAL(porv[g], 0.50);
BOOST_CHECK_EQUAL(poro[g], 0.10);
}
@ -671,8 +672,8 @@ OPERATE
const auto& permz = fpm.get_double("PERMZ");
for (std::size_t i = 0; i < 3; i++) {
BOOST_CHECK_EQUAL(permz[i] , 2*permy[i] + to_si(1000));
BOOST_CHECK_EQUAL(permz[i+3], 3*permx[i+3] + to_si(300));
BOOST_CHECK_CLOSE(permz[i] , 2*permy[i] + to_si(1000), 1e-13);
BOOST_CHECK_CLOSE(permz[i+3], 3*permx[i+3] + to_si(300), 1e-13);
}
}
@ -2061,23 +2062,23 @@ MINVALUE
auto a = grid.activeIndex(i,j,k);
if (k==0)
BOOST_CHECK_EQUAL(tranx[a], to_si(0.20));
BOOST_CHECK_CLOSE(tranx[a], to_si(0.20), 1e-13);
else
BOOST_CHECK_EQUAL(tranx[a], to_si(0.10));
BOOST_CHECK_CLOSE(tranx[a], to_si(0.10), 1e-13);
if (k == 0)
BOOST_CHECK_EQUAL(trany[a], to_si(2.0));
BOOST_CHECK_CLOSE(trany[a], to_si(2.0), 1e-13);
else if (k == 1)
BOOST_CHECK_EQUAL(trany[a], to_si(5.0));
BOOST_CHECK_CLOSE(trany[a], to_si(5.0), 1e-13);
else if (k == 2)
BOOST_CHECK_EQUAL(trany[a], to_si(2.0));
BOOST_CHECK_CLOSE(trany[a], to_si(2.0), 1e-13);
if (k==0)
BOOST_CHECK(tranz[a] <= to_si(0));
else if (k == 1)
BOOST_CHECK(tranz[a] >= to_si(3.0));
else if (k == 2)
BOOST_CHECK_EQUAL(tranz[a], to_si(1.0));
BOOST_CHECK_CLOSE(tranz[a], to_si(1.0), 1e-13);
}
}
}
@ -2473,8 +2474,8 @@ OPERATE
const auto& permz = fpm.get_double("PERMZ");
for (std::size_t i = 0; i < 3; i++) {
BOOST_CHECK_EQUAL(permz[i] , 2*permy[i] + to_si(1000));
BOOST_CHECK_EQUAL(permz[i+3], 3*permx[i+3] + to_si(300));
BOOST_CHECK_CLOSE(permz[i] , 2*permy[i] + to_si(1000), 1e-13);
BOOST_CHECK_CLOSE(permz[i+3], 3*permx[i+3] + to_si(300), 1e-13);
}
BOOST_CHECK(permx == fpm.get_double("PERMR"));

View File

@ -30,6 +30,7 @@
#define BOOST_TEST_MODULE ScheduleTests
#include <boost/test/unit_test.hpp>
#include <boost/test/tools/floating_point_comparison.hpp>
#include <opm/common/utility/ActiveGridCells.hpp>
#include <opm/common/utility/TimeService.hpp>
@ -991,14 +992,14 @@ I1 THP 4 /
const auto wpp_2 = well_2.getProductionProperties();
const auto prod_controls = wpp_2.controls(st, 0);
BOOST_CHECK_EQUAL(prod_controls.oil_rate, 1300 * siFactorL);
BOOST_CHECK_EQUAL(prod_controls.water_rate, 1400 * siFactorL);
BOOST_CHECK_EQUAL(prod_controls.gas_rate, 1500.52 * siFactorG);
BOOST_CHECK_EQUAL(prod_controls.liquid_rate, 1600.58 * siFactorL);
BOOST_CHECK_EQUAL(prod_controls.resv_rate, 1801.05 * siFactorL);
BOOST_CHECK_EQUAL(prod_controls.bhp_limit, 1900 * siFactorP);
BOOST_CHECK_EQUAL(prod_controls.thp_limit, 2000 * siFactorP);
BOOST_CHECK_EQUAL(wpp_2.ALQValue.get<double>(), 1234);
BOOST_CHECK_CLOSE(prod_controls.oil_rate, 1300 * siFactorL, 1e-13);
BOOST_CHECK_CLOSE(prod_controls.water_rate, 1400 * siFactorL, 1e-13);
BOOST_CHECK_CLOSE(prod_controls.gas_rate, 1500.52 * siFactorG, 1e-13);
BOOST_CHECK_CLOSE(prod_controls.liquid_rate, 1600.58 * siFactorL, 1e-13);
BOOST_CHECK_CLOSE(prod_controls.resv_rate, 1801.05 * siFactorL, 1e-13);
BOOST_CHECK_CLOSE(prod_controls.bhp_limit, 1900 * siFactorP, 1e-13);
BOOST_CHECK_CLOSE(prod_controls.thp_limit, 2000 * siFactorP, 1e-13);
BOOST_CHECK_CLOSE(wpp_2.ALQValue.get<double>(), 1234, 1e-13);
BOOST_CHECK (wpp_2.hasProductionControl( Opm::Well::ProducerCMode::ORAT) );
BOOST_CHECK (wpp_2.hasProductionControl( Opm::Well::ProducerCMode::RESV) );
@ -1008,9 +1009,9 @@ I1 THP 4 /
const auto wpp_3 = well_3.getProductionProperties();
const auto prod_controls3 = wpp_3.controls(st, 0);
BOOST_CHECK_EQUAL(prod_controls3.oil_rate, 2 * 1300 * siFactorL);
BOOST_CHECK_EQUAL(prod_controls3.water_rate, 4 * 1400 * siFactorL);
BOOST_CHECK_EQUAL(prod_controls3.gas_rate, 3 * 1500.52 * siFactorG);
BOOST_CHECK_CLOSE(prod_controls3.oil_rate, 2 * 1300 * siFactorL, 1e-13);
BOOST_CHECK_CLOSE(prod_controls3.water_rate, 4 * 1400 * siFactorL, 1e-13);
BOOST_CHECK_CLOSE(prod_controls3.gas_rate, 3 * 1500.52 * siFactorG, 1e-13);
const auto& inj_controls2 = schedule.getWell("I1", 2).getInjectionProperties().controls(unitSystem, st, 0);
@ -1212,13 +1213,13 @@ COMPDAT
const auto& cs3 = schedule.getWell("OP_1", 3).getConnections();
const auto& cs4 = schedule.getWell("OP_1", 4).getConnections();
for(size_t i = 0; i < cs2.size(); i++)
BOOST_CHECK_EQUAL(cs2.get( i ).CF() / cs1.get(i).CF(), 1.3);
BOOST_CHECK_CLOSE(cs2.get( i ).CF() / cs1.get(i).CF(), 1.3, 1e-13);
for(size_t i = 0; i < cs3.size(); i++ )
BOOST_CHECK_EQUAL(cs3.get( i ).CF() / cs1.get(i).CF(), (1.3*1.3));
BOOST_CHECK_CLOSE(cs3.get( i ).CF() / cs1.get(i).CF(), (1.3*1.3), 1e-13);
for(size_t i = 0; i < cs4.size(); i++ )
BOOST_CHECK_EQUAL(cs4.get( i ).CF(), cs1.get(i).CF());
BOOST_CHECK_CLOSE(cs4.get( i ).CF(), cs1.get(i).CF(), 1e-13);
auto sim_time1 = TimeStampUTC{ schedule.simTime(1) };
BOOST_CHECK_EQUAL(sim_time1.day(), 10);
@ -1328,20 +1329,20 @@ BOOST_AUTO_TEST_CASE(createDeckModifyMultipleGCONPROD) {
{
auto g = schedule.getGroup("G1", 1);
BOOST_CHECK_EQUAL(g.productionControls(st).oil_target, 1000 * siFactorL);
BOOST_CHECK_CLOSE(g.productionControls(st).oil_target, 1000 * siFactorL, 1e-13);
BOOST_CHECK(g.has_control(Group::ProductionCMode::ORAT));
BOOST_CHECK(!g.has_control(Group::ProductionCMode::WRAT));
BOOST_CHECK_EQUAL(g.productionControls(st).guide_rate, 0);
}
{
auto g = schedule.getGroup("G1", 2);
BOOST_CHECK_EQUAL(g.productionControls(st).oil_target, 2000 * siFactorL);
BOOST_CHECK_CLOSE(g.productionControls(st).oil_target, 2000 * siFactorL, 1e-13);
BOOST_CHECK_EQUAL(g.productionControls(st).guide_rate, 148);
BOOST_CHECK_EQUAL(true, g.productionControls(st).guide_rate_def == Group::GuideRateProdTarget::OIL);
}
auto g2 = schedule.getGroup("G2", 2);
BOOST_CHECK_EQUAL(g2.productionControls(st).oil_target, 2000 * siFactorL);
BOOST_CHECK_CLOSE(g2.productionControls(st).oil_target, 2000 * siFactorL, 1e-13);
auto gh = schedule.getGroup("H1", 1);
@ -4807,7 +4808,7 @@ WCONPROD
auto dim = sched.getUnits().getDimension(UnitSystem::measure::gas_surface_rate);
const auto& controls2 = well2.productionControls(st);
BOOST_CHECK_EQUAL(controls2.alq_value, dim.convertRawToSi(123));
BOOST_CHECK_CLOSE(controls2.alq_value, dim.convertRawToSi(123), 1e-13);
BOOST_CHECK(!sched[0].has_gpmaint());
}

View File

@ -321,7 +321,7 @@ BOOST_AUTO_TEST_CASE(TestERst_5a) {
BOOST_CHECK_EQUAL(rst1.hasReportStepNumber(2), true);
BOOST_CHECK_EQUAL(rst1.hasReportStepNumber(0), false);
// invalied report step number
// invalid report step number
BOOST_CHECK_THROW(rst1.hasLGR("LGR1", 99) , std::invalid_argument );
BOOST_CHECK_EQUAL(rst1.hasLGR("LGR1", 2), true);
@ -369,7 +369,7 @@ BOOST_AUTO_TEST_CASE(TestERst_5b) {
BOOST_CHECK_EQUAL(rst1.hasReportStepNumber(1), true);
BOOST_CHECK_EQUAL(rst1.hasReportStepNumber(5), false);
// invalied report step number
// invalid report step number
BOOST_CHECK_THROW(rst1.hasLGR("LGR1", 99) , std::invalid_argument );
BOOST_CHECK_EQUAL(rst1.hasLGR("LGR1", 2), true);

View File

@ -24,6 +24,7 @@
#define BOOST_TEST_MODULE NonuniformTableLinearTests
#include <boost/test/unit_test.hpp>
#include <boost/test/tools/floating_point_comparison.hpp>
#include <opm/common/utility/numeric/NonuniformTableLinear.hpp>
@ -63,9 +64,9 @@ BOOST_AUTO_TEST_CASE(table_operations)
for (int i = 0; i < numvals; ++i) {
BOOST_CHECK_EQUAL(t1(xv[i]), yv[i]);
}
BOOST_CHECK_EQUAL(t1(2.6), 3.5);
BOOST_CHECK_EQUAL(t1(4.0), 3.0);
BOOST_CHECK_EQUAL(t1.derivative(4.0), -1.0);
BOOST_CHECK_CLOSE(t1(2.6), 3.5, 1e-13);
BOOST_CHECK_CLOSE(t1(4.0), 3.0, 1e-13);
BOOST_CHECK_CLOSE(t1.derivative(4.0), -1.0, 1e-13);
// Derivatives at endpoints.
BOOST_CHECK_CLOSE(t1.derivative(-1.0), 1.0/3.0, 1e-13);
BOOST_CHECK_CLOSE(t1.derivative(5.0), -1.0, 1e-13);
@ -83,6 +84,6 @@ BOOST_AUTO_TEST_CASE(table_operations)
for (int i = 0; i < numvals; ++i) {
BOOST_CHECK_EQUAL(t1((xv[i] + 1.0)*20.0 - 100.0), yv[i]);
}
BOOST_CHECK_EQUAL(t1(0.0), 3.0);
BOOST_CHECK_CLOSE(t1(0.0), 3.0, 1e-13);
BOOST_CHECK(std::fabs(t1.derivative(0.0) + 1.0/20.0) < 1e-11);
}

View File

@ -23,6 +23,7 @@
#define BOOST_TEST_MODULE UniformTableLinearTests
#include <boost/test/unit_test.hpp>
#include <boost/test/tools/floating_point_comparison.hpp>
#include <opm/common/utility/numeric/UniformTableLinear.hpp>
@ -50,7 +51,7 @@ BOOST_AUTO_TEST_CASE(table_operations)
}
BOOST_CHECK_EQUAL(t1(2.25), 0.0);
BOOST_CHECK_EQUAL(t1(9.75), 3.0);
BOOST_CHECK_EQUAL(t1.derivative(9.75), -2.0/xdelta);
BOOST_CHECK_CLOSE(t1.derivative(9.75), -2.0/xdelta, 1e-13);
// Until we implement anything but the ClosestValue end policy, we only test that.
BOOST_CHECK_EQUAL(t1(xmin - 1.0), yv[0]);
BOOST_CHECK_EQUAL(t1(xmax + 1.0), yv.back());