Merge pull request #3209 from atgeirr/backport-of-pr-3198

Backport of pr 3198
This commit is contained in:
Atgeirr Flø Rasmussen 2022-11-01 23:33:12 +01:00 committed by GitHub
commit 325da26722
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 71 additions and 141 deletions

View File

@ -1,4 +1,4 @@
/* Userspesific CSS for doxygen */
/* Userspecific CSS for doxygen */
body, table, div, p, dl {
font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
font-size: 16px;

11
docs/man1/arraylist.1 Normal file
View File

@ -0,0 +1,11 @@
.TH SUMMARY "1" "October 2022" "arraylist 2022.10" "User Commands"
.SH NAME
summary \- Printer for list of arrays in Eclipse summary files
.SH DESCRIPTION
List all arrays found in an EclFile specified on the command line.
.PP
.SH OPTIONS
\fB\-h\fR Print help and exit.
.TP
\fB\-r\fR List array for a specific report time step number. Option only valid for a unified restart file.
.PP

View File

@ -1,4 +1,4 @@
.TH COMPAREECL "1" "April 2022" "compareECL 2022.04" "User Commands"
.TH COMPAREECL "1" "October 2022" "compareECL 2022.10" "User Commands"
.SH NAME
compareECL \- Comparator for Eclipse files
.SH DESCRIPTION
@ -32,7 +32,7 @@ The integration test compares SGAS, SWAT and PRESSURE in unified restart files,
.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.
\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
@ -50,6 +50,9 @@ Compare two RFT files (.RFT).
.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

View File

@ -1,4 +1,4 @@
.TH CONVERTECL "1" "April 2022" "convertECL 2022.04" "User Commands"
.TH CONVERTECL "1" "October 2022" "convertECL 2022.10" "User Commands"
.SH NAME
convertECL \- Converter for Eclipse files (binary <-> formatted format)
.SH DESCRIPTION
@ -14,5 +14,5 @@ In addition, the program takes these options (which must be given before the arg
.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.
\fB\-r\fR extract and convert a specific report time step number from a unified restart file.
.PP

View File

@ -1,4 +1,4 @@
.TH OPMHASH "1" "April 2022" "opmhash 2022.04" "User Commands"
.TH OPMHASH "1" "October 2022" "opmhash 2022.10" "User Commands"
.SH NAME
opmhash \- Hasher for summary keywords in Eclipse files
.SH DESCRIPTION
@ -39,3 +39,11 @@ 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.
.HP
\fB\-S\fR : Silent form \- will not print any deck output.
.PP
It is possible to add multiple deck arguments, they are then scanned repeatedly,
and the decks are compared. In the case of multiple deck arguments the exit
status of the program will be zero if all are equal and nonzero in case of
differences.

View File

@ -1,4 +1,4 @@
.TH OPMPACK "1" "April 2022" "opmpack 2022.04" "User Commands"
.TH OPMPACK "1" "October 2022" "opmpack 2022.10" "User Commands"
.SH NAME
opmpack \- Validator and printer of deck in Eclipse files without comments
.SH DESCRIPTION

View File

@ -1,4 +1,4 @@
.TH RST_DECK: "1" "April 2022" "rst_deck 2022.04" "User Commands"
.TH RST_DECK: "1" "October 2022" "rst_deck 2022.10" "User Commands"
.SH NAME
rst_deck \- Convert simulation deck to a deck ready for restart
.SH DESCRIPTION
@ -86,95 +86,3 @@ rst_deck \fI\,/path/to/history/HISTORY.DATA\/\fP rst/HISTORY:30 \fI\,/path/to/rs
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,4 +1,4 @@
.TH SUMMARY "1" "April 2022" "summary 2022.04" "User Commands"
.TH SUMMARY "1" "October 2022" "summary 2022.10" "User Commands"
.SH NAME
summary \- Printer for summary keys in Eclipse summary files
.SH DESCRIPTION

View File

@ -287,12 +287,12 @@ void ECLRegressionTest::checkSpesificKeyword(std::vector<std::string>& keywords1
std::vector<eclArrType>& arrayType2,
const std::string& reference)
{
auto search1 = std::find(keywords1.begin(), keywords1.end(), spesificKeyword);
auto search2 = std::find(keywords2.begin(), keywords2.end(), spesificKeyword);
auto search1 = std::find(keywords1.begin(), keywords1.end(), specificKeyword);
auto search2 = std::find(keywords2.begin(), keywords2.end(), specificKeyword);
if (search1 == keywords1.end() && search2 == keywords2.end()) {
std::cout << "Testing specific keyword \"" << spesificKeyword << "\" in " << reference << ". Keyword not found in any of the cases ." << std::endl;
OPM_THROW(std::runtime_error, "\nTesting spesific keyword \"" << spesificKeyword << "\" in " << reference << ". Keyword not found in any of the cases .");
std::cout << "Testing specific keyword \"" << specificKeyword << "\" in " << reference << ". Keyword not found in any of the cases ." << std::endl;
OPM_THROW(std::runtime_error, "\nTesting specific keyword \"" << specificKeyword << "\" in " << reference << ". Keyword not found in any of the cases .");
}
eclArrType arrType;
@ -301,23 +301,23 @@ void ECLRegressionTest::checkSpesificKeyword(std::vector<std::string>& keywords1
arrType = arrayType1[ind];
if (search2 == keywords2.end()) {
std::cout << "Testing spesific kewyword in " << reference << ". Keyword found in fist case but not in second case." << std::endl;
OPM_THROW(std::runtime_error, "\nTesting spesific kewyword in " << reference << ". Keyword found in fist case but not in second case.");
std::cout << "Testing specific kewyword in " << reference << ". Keyword found in fist case but not in second case." << std::endl;
OPM_THROW(std::runtime_error, "\nTesting specific kewyword in " << reference << ". Keyword found in fist case but not in second case.");
}
keywords1.clear();
arrayType1.clear();
keywords1.push_back(spesificKeyword);
keywords1.push_back(specificKeyword);
arrayType1.push_back(arrType);
keywords2.clear();
arrayType2.clear();
keywords2.push_back(spesificKeyword);
keywords2.push_back(specificKeyword);
arrayType2.push_back(arrType);
} else {
if (search2 != keywords2.end()) {
std::cout << "Testing spesific kewyword in " << reference << ". Keyword not found in fist case but found in second case." << std::endl;
OPM_THROW(std::runtime_error, "\nTesting spesific kewyword in " << reference << ". Keyword not found in fist case but found in second case.");
std::cout << "Testing specific kewyword in " << reference << ". Keyword not found in fist case but found in second case." << std::endl;
OPM_THROW(std::runtime_error, "\nTesting specific kewyword in " << reference << ". Keyword not found in fist case but found in second case.");
}
keywords1.clear();
@ -585,7 +585,7 @@ void ECLRegressionTest::results_init()
} else {
std::cout << "\nComparing init files \n" << std::endl;
if (spesificKeyword.empty()) {
if (specificKeyword.empty()) {
if (keywords1.size() == keywords2.size() && keywords1 != keywords2) {
/*
If the keywords come in different order in the two files
@ -693,23 +693,23 @@ void ECLRegressionTest::results_rst()
deviations.clear();
if (spesificSequence > -1) {
auto search1 = std::find(seqnums1.begin(), seqnums1.end(), spesificSequence);
auto search2 = std::find(seqnums2.begin(), seqnums2.end(), spesificSequence);
if (specificSequence > -1) {
auto search1 = std::find(seqnums1.begin(), seqnums1.end(), specificSequence);
auto search2 = std::find(seqnums2.begin(), seqnums2.end(), specificSequence);
if (search1 == seqnums1.end()) {
OPM_THROW(std::runtime_error, "\nSpecified sequence " << spesificSequence << " not found in restart files for case 1");
OPM_THROW(std::runtime_error, "\nSpecified sequence " << specificSequence << " not found in restart files for case 1");
}
if (search2 == seqnums2.end()) {
OPM_THROW(std::runtime_error, "\nSpecified sequence " << spesificSequence << " not found in restart files for case 2");
OPM_THROW(std::runtime_error, "\nSpecified sequence " << specificSequence << " not found in restart files for case 2");
}
seqnums1.clear();
seqnums1.push_back(spesificSequence);
seqnums1.push_back(specificSequence);
seqnums2.clear();
seqnums2.push_back(spesificSequence);
seqnums2.push_back(specificSequence);
} else if (onlyLastSequence) {
@ -791,7 +791,7 @@ void ECLRegressionTest::results_rst()
if (printKeywordOnly) {
printComparisonForKeywordLists(keywords1, keywords2, arrayType1, arrayType2);
} else {
if (spesificKeyword.empty()) {
if (specificKeyword.empty()) {
compareKeywords(keywords1, keywords2, reference);
} else {
checkSpesificKeyword(keywords1, keywords2, arrayType1, arrayType2, reference);
@ -946,7 +946,7 @@ void ECLRegressionTest::results_smry()
printMissingKeywords(keywords1, keywords2);
}
} else {
if (spesificKeyword.empty()) {
if (specificKeyword.empty()) {
compareKeywords(keywords1, keywords2, reference);
} else {
checkSpesificKeyword(keywords1, keywords2, arrayType1, arrayType2, reference);
@ -1114,7 +1114,7 @@ void ECLRegressionTest::results_rft()
if (printKeywordOnly) {
printComparisonForKeywordLists(keywords1, keywords2, arrayType1, arrayType2);
} else {
if (spesificKeyword.empty()) {
if (specificKeyword.empty()) {
compareKeywords(keywords1, keywords2, reference);
} else {
checkSpesificKeyword(keywords1, keywords2, arrayType1, arrayType2, reference);

View File

@ -80,10 +80,10 @@ public:
}
void compareSpesificKeyword(std::string keyword) {
this->spesificKeyword = std::move(keyword);
this->specificKeyword = std::move(keyword);
}
void compareSpesificRstReportStepNumber(int seqn) {
this->spesificSequence = seqn;
this->specificSequence = seqn;
}
void setLoadBaseRunData(bool loadArg) {
@ -177,11 +177,11 @@ private:
bool loadBaseRunData = false;
// spesific keyword to be compared
std::string spesificKeyword;
// specific keyword to be compared
std::string specificKeyword;
// spesific restart sequence to be compared
int spesificSequence = -1;
// specific restart sequence to be compared
int specificSequence = -1;
// Accept extra keywords in the restart file of the 'new' simulation.
bool acceptExtraKeywords = false;

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 valid for a unified restart file. \n\n";
<< "-r List array for a specific 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

@ -42,14 +42,14 @@ static void printHelp() {
<< "-l Only do comparison for the last Report Step. This option is only valid for restart files.\n"
<< "-n Do not throw on errors.\n"
<< "-p Print keywords in both cases and exit.\n"
<< "-r compare a spesific report time step number in a restart file.\n"
<< "-r compare a specific report time step number in a restart file.\n"
<< "-t Specify ECLIPSE filetype to compare, (default behaviour is that all files are compared if found). Different possible arguments are:\n"
<< " -t UNRST \t Compare two unified restart files (.UNRST). This the default value, so it is the same as not passing option -t.\n"
<< " -t EGRID \t Compare two EGrid files (.EGRID).\n"
<< " -t INIT \t Compare two initial files (.INIT).\n"
<< " -t RFT \t Compare two RFT files (.RFT).\n"
<< " -t SMRY \t Compare two cases consistent of (unified) summary files.\n"
<< " -t RSM \t Compare RSM file agaist a summary file.\n"
<< " -t RSM \t Compare RSM file against a summary file.\n"
<< "-x Allow extra keywords in case number 2. These additional keywords (not found in case number1) will be ignored in the comparison.\n"
<< "\nExample usage of the program: \n\n"
<< "compareECL -k PRESSURE <path to first casefile> <path to second casefile> 1e-3 1e-5\n"
@ -216,7 +216,7 @@ int main(int argc, char** argv) {
if (integrationTest && specificFileType) {
if (fileTypeString=="EGRID" || fileTypeString=="INIT" || fileTypeString=="RFT") {
std::cerr << "Integration test and spesific file type, only valid for UNRST and SMRY" << std::endl;
std::cerr << "Integration test and specific file type, only valid for UNRST and SMRY" << std::endl;
return EXIT_FAILURE;
}
}

View File

@ -119,7 +119,7 @@ static void printHelp() {
<< "-h Print help and exit.\n"
<< "-l List report step numbers in the selected restart file.\n"
<< "-i Enforce IX standard on output file.\n"
<< "-r Extract and convert a spesific report time step number from a unified restart file. \n\n";
<< "-r Extract and convert a specific report time step number from a unified restart file. \n\n";
}
int main(int argc, char **argv) {

View File

@ -499,18 +499,18 @@ BOOST_AUTO_TEST_CASE(results_init_1) {
// should fail, even though using accept extra keywords option
BOOST_CHECK_THROW(test1a.results_init(),std::runtime_error);
// check with spesific kewyword PORV, found in both cases and should be ok
// check with specific kewyword PORV, found in both cases and should be ok
test1a.setAcceptExtraKeywords(false);
test1a.compareSpesificKeyword("PORV");
test1a.results_init();
// check with spesific kewyword PORO, found in second case only, should throw exeption
// check with specific kewyword PORO, found in second case only, should throw exeption
test1a.compareSpesificKeyword("PORO");
BOOST_CHECK_THROW(test1a.results_init(),std::runtime_error);
// check with spesific kewyword not found in any of the cases, should throw exeption
// check with specific kewyword not found in any of the cases, should throw exeption
test1a.compareSpesificKeyword("XXXXX");
BOOST_CHECK_THROW(test1a.results_init(),std::runtime_error);
@ -723,20 +723,20 @@ BOOST_AUTO_TEST_CASE(results_unrst_1) {
test2a.setAcceptExtraKeywords(true);
test2a.results_rst();
// checking for spesific keyword PRESSURE, found in both cases
// checking for specific keyword PRESSURE, found in both cases
test2a.setAcceptExtraKeywords(false);
test2a.compareSpesificKeyword("PRESSURE");
// test should be ok
test2a.results_rst();
// checking for spesific keyword RS, only present in one of the cases
// checking for specific keyword RS, only present in one of the cases
test2a.compareSpesificKeyword("RS");
// should fail
BOOST_CHECK_THROW(test2a.results_rst(),std::runtime_error);
// checking for spesific keyword XXXX, not found in any of the cases
// checking for specific keyword XXXX, not found in any of the cases
test2a.compareSpesificKeyword("XXXX");
// should fail
@ -926,7 +926,7 @@ BOOST_AUTO_TEST_CASE(results_unrst_3) {
ECLRegressionTest test2("TMP1", "TMP2", 1e-3, 1e-3);
BOOST_CHECK_THROW(test2.results_rst(),std::runtime_error);
// check spesific keyword RS, should be OK
// check specific keyword RS, should be OK
test2.compareSpesificKeyword("RS");
test2.results_rst();
@ -1231,7 +1231,7 @@ BOOST_AUTO_TEST_CASE(results_rft_1) {
test1b.results_rft();
// accept extra keyword to false, but check for spesific keyword (PRESSSURE)
// accept extra keyword to false, but check for specific keyword (PRESSSURE)
test1b.setAcceptExtraKeywords(false);
test1b.compareSpesificKeyword("PRESSURE");