Commit Graph
100 Commits
Author SHA1 Message Date
Markus Blatt 03a94c1cde Got rid of false warning for empty opm_common_DIR. 2017-09-26 16:39:50 +02:00
Markus Blatt 54acb69d7a Drop support for OPM_COMMON_ROOT.
Users should either rely in sibling search, use opm-common_DIR, or
set CMAKE_PREFIX_PATH correctly to find opm-common.
2017-09-25 14:03:01 +02:00
Markus Blatt a26cec6a6c Allow arbitrary clone directories and <prefix><module-name><postfix> build directories 2017-09-25 13:54:04 +02:00
Markus Blatt 0b83f68cdc Warn if OPM_COMMON_ROOT and opm-common_DIR are set and use the latter. 2017-09-25 13:53:34 +02:00
Markus Blatt f6db28eb5d Changed find_package call to require opm-common.
Previously, QUIET was passed to opm-common which would
not even print a message if there is a problem. Now cmake
will fail if OPM_COMMON_ROOT is not set, and neither guessing
opm_common_DIR did  work nor searching in the default locations.
2017-09-25 13:53:34 +02:00
Markus Blatt e59084c540 Added deprecation warning if OPM_COMMON_ROOT is used 2017-09-25 13:53:34 +02:00
Markus Blatt b2c6092127 Added warning if opm-common_DIR is not an existing directory. 2017-09-25 13:53:29 +02:00
Markus Blatt 149d531c68 Added sibling search mechanism using ${PROJECT_BINARY_DIR} for opm-common
If sibling search is activated and opm-common_DIR is not set, then
we try to determine the build directory layout from ${PROJECT_BINARY_DIR}.
The following two possibilities are supported:
 + <modules-build-dir>/<project-name>
 + <project-name>/<build-dir>
where <project-name> is the case sensitive module name (in this case
opm-common).

This results in the following search precedence:
1. User set opm-common_DIR
2. sibling directories search (if the directories exist)
3. Default (system) CMake search path
2017-09-15 15:26:53 +02:00
Markus Blatt da86d1c0bd Introduced mandatory call to project in top level CMakeLists.txt
Somehow this was never called in the OPM modules. But the CMake documentation
actually says:
"The top-level ``CMakeLists.txt`` file for a project must contain a
literal, direct call to the ``project()`` command; loading one
through the ``include()`` command is not sufficient.  If no such
call exists CMake will implicitly add one to the top that enables the
default languages (``C`` and ``CXX``).
"

Without it some variables (like CMAKE_PROJECT_NAME) are not correctly defined.
2017-09-15 15:26:53 +02:00
Markus Blatt a1f960b467 Reallow logging fatal errors for well convergence on all ranks 2017-09-07 14:45:00 +00:00
Markus Blatt 5d1eff5107 Log debug messages about wells only on master.
Previously all ranks logged the message and did clutter the
output files quite a bit.
2017-09-07 14:17:56 +00:00
Markus Blatt 7b3b99f692 Output bubble/dew point computation problems only on rank 0.
We do this by switching to output the global index of the cells.
In a first step the problematic cell indices are gather on process 0.
Then they are logged there.

This should prevent spurious ouput at the end of PRT and DEBUG files after the
simulation time is printed. This happened previously for some parallel
runs of model 2. Unfortunately, it seems these problems do not appear any
more for the current master. At least I could not reproduce them.
2017-08-14 21:34:54 +02:00
Markus Blatt 900fec427d Cleaned up bogus documentation and whitespace 2017-07-20 12:37:01 +02:00
Markus Blatt c06e5b7cf8 Removed boolean parameter indicating initial write to writeTimeStep.
Instead we use the timer to determine whether this is the initial write.
2017-07-20 12:12:41 +02:00
Markus Blatt b89aa1fa4a Added initialStep to SimulatorTimerInterface 2017-07-20 12:11:11 +02:00
Markus Blatt 1939453adb Write the initial OIP values if requested.
This is when writing the first time step as is this is
the first step when OIP is available.
2017-07-19 22:06:08 +02:00
Markus Blatt 542f181f7e Narrow down the possible Matrix types for ParallelOverlappingILU0
It now has to be a BCRSMatrix, but the block type is flexible and
needs to this way. flow_legacy uses MatrixBlock, and flow_ebos uses
FieldMatrix.
2017-07-03 13:50:21 +02:00
Markus Blatt 1bb0968283 Work around unstable matrix inversion in DUNE 2.[34]
The versions are missing the specialized code for inverting
a 3x3 matrix that makes the algorithms quite a bit more stable.
With this patch we fall back to using our own MatrixBlock that does
not suffer from this deficiency.
2017-07-03 10:20:23 +02:00
Markus Blatt 8759c3a89a Set defines in *.cpp files.
That way we can keep the old order of includes which seems to be needed for compilation.
2017-06-27 10:00:31 +00:00
Markus Blatt e8d89bcf48 Fix lookup of std::cerr by including iostream 2017-06-27 10:00:31 +00:00
Markus Blatt f913baa66e Make use of template argument deduction for createAMGPreconditionerPointer 2017-06-27 10:00:31 +00:00
Markus Blatt 59ca0b4424 Fix the PR that said it activated AMG.
Actually, it did not as it did set the define eith wrong
or the wrong locations. This commit fixes this and finally
makes AMG available.
2017-06-27 10:00:31 +00:00
Markus Blatt a6175942fd Make lambda C++11 compliant 2017-06-20 15:49:13 +02:00
Markus Blatt e6c2ab47b3 Equalize if statements governing step_timing.txt output 2017-06-20 15:46:04 +02:00
Markus Blatt 75561a0da7 Some cleanup concerning spaces, const, simplified logic. 2017-06-20 15:27:05 +02:00
Markus Blatt e5b8cddfa8 Reactivate no_debug_log to indicate whether .CASE.DEBUG should be written
This switch only has an effect if output is not equal to none.
2017-06-20 13:36:22 +02:00
Markus Blatt d7c2d58853 write init stuff only if output=all or output=true. 2017-06-20 13:21:26 +02:00
Markus Blatt 58948521bb Do not activate output writer for when output=log 2017-06-20 13:16:50 +02:00
Markus Blatt 1f8b747299 Removed leftover getDefault("output", ...) where bool was expected. 2017-06-20 13:11:16 +02:00
Markus Blatt 9c6e9b3715 Use option output to activate or (partly) deactivate output to files.
Possible values are none, log, and all. The first does not do any logging
to files. The second does log to files but does not create and log to
the DEBUG file. The latter uses all possible files.
2017-06-20 11:57:47 +02:00
Markus Blatt 588111d135 Allow a flow_ebos run without creating a debug or prt file.
Adds two switches no_prt_log, and no_debug_log that deactivate
writing to PRT and DEBUG file.
One can now run flow_ebos without creating any output by
passing "output=false no_prt_log=true no_debug_log=true"
on the command line.
2017-06-20 08:33:47 +02:00
Markus Blatt e0a7ced256 Only create step_timing.txt file if it gets written to.
If output=false is requested we created an empty file.
Now that file will only be created if output was requested
and it will only be opened on one rank in a parallel run.
2017-06-19 17:51:26 +02:00
Markus Blatt c2129185ae Store columns of ParallelOverlappingILU0::upper in descending order
This is the order used by ILU in dune-istl
2017-06-14 10:06:33 +00:00
Markus Blatt 138eb2c91b Merge pull request #1193 from dr-robertk/PR/fix-mpi-deadlock-in-output
Bugfix: fix MPI deadlock in output when asyncOutput is enabled.
2017-05-30 11:33:54 +02:00
Markus Blatt 79799a5c5c Use pressure for guiding coarsening in flow_ebos, too.
For flow_legacy the first component a block is used, which is the
oil pressure. As flow_ebos uses different indices this commit
explicitly uses BlackoilIndices::pressureSwitchIdx to tell the AMG
at which index the pressure is stored.
2017-05-22 12:09:58 +02:00
Markus Blatt 5a6ace9063 Resort to setting one define for AMG support in the main simulator 2017-05-22 11:34:20 +02:00
Markus Blatt 98e2eeb4dc Allow usage of AMG if flow_ebos is used and UMFPack is available.
This was previously deactivated because of the single precision support
of flow_legacy and missing single-precision support for UMFPack.

As flow_ebos does not use single precision this commit allows using amg
at least for flow_ebos.
2017-05-22 11:32:02 +02:00
Markus Blatt 9f5a904382 Removes deadlocks in the case where only few processes have wells.
The problem was that updateWellControls was not called on all
processes. But this is mandatory as the well switching output
requires global communication.
2017-04-12 17:37:34 +02:00
Markus Blatt b5612806ac Revert to using standard algorithms instead of using masks.
This is now possible as the values stored for ghost/overlap elements
(minimum where we compute the maxiumum, zero where we sum up)
will not influence the result of the computation any more.
2017-04-12 13:42:02 +02:00
Markus Blatt 0db663fe51 Only compute convergence markers for interior elements. 2017-04-12 13:42:02 +02:00
Markus Blatt b72a167c76 Correctly compute maximum in a parallel flow_ebos run. 2017-04-12 13:42:02 +02:00
Markus Blatt 9ed02b33bc Fix verbosity parameter used for parallel istl solvers.
These are not aware whether they are parallel or not. Therefore
the user should only specify a verbose verbosity only on one rank.
With this commit we do this on the process responsible for terminal
output.
2017-04-06 12:11:26 +02:00
Markus Blatt 30f3d4e2d0 Get rid off TypeTag system in StandardWellsDense.
Previously, we kind of hard coded the problem using the TypeTag system.
Instead of this we now simply pass the only additional thing needed, the
ElementContext, as an additional template parameter.

Removes the include of removed header BlackoilModelEbosTypeTags.hpp.
2017-04-04 11:08:17 +02:00
Markus Blatt 312aa24f86 Revert "Factor out ewoms typetag system to separate header."
This reverts commit 05c70491257a615472e68fb44776bcd7effb60b8.
2017-04-04 11:08:17 +02:00
Markus Blatt 2bf7f8efa7 Revert "Moved copyright notice to top of header BlackoilModelEbosTypeTags.hpp"
This reverts commit d341de0d8b796b66f7bd6d871c84e1c2db265ff1.
2017-04-04 11:08:17 +02:00
Markus Blatt e56e2cae15 Added requested braces. 2017-04-04 11:08:17 +02:00
Markus Blatt 6b8b8b971e Use global wellsActive to see whether wells are active at all.
This bug must have sneaked in during rebasing. Kudos to Atgeirr for
spotting this.
2017-04-04 11:08:17 +02:00
Markus Blatt cde162b3d6 Use the global number of cells for the average.
This number is still wrong in master but well become correct once
PR #1107 is merged.
2017-04-04 11:07:57 +02:00
Markus Blatt a6f6e4806e Moved copyright notice to top of header BlackoilModelEbosTypeTags.hpp 2017-04-04 11:06:41 +02:00
Markus Blatt 29fb281406 Updated Copyright stuff 2017-04-04 11:06:41 +02:00
Markus Blatt 781eadb561 Removed unused method detail::convergenceReduction 2017-04-04 11:06:41 +02:00
Markus Blatt 0e83496740 Make getWellConvergence parallel and omit unnecessary computations.
detail::getConvergence computes a lot more than we actually need.
We only need the average over B and the maximum of the well residual.

Therefore we now compute these quantities in getWellConvergence and
do the global reductions manually.
2017-04-04 11:05:50 +02:00
Markus Blatt 4768bc9e90 Remove usage of cachedIntensiveQuantities from getWellConvergence 2017-04-04 11:05:50 +02:00
Markus Blatt f6153f8133 Factor out ewoms typetag system to separate header.
We will need the typetag information also for the wells.
If it is not in a separate header we get problems
with recursive inclusion of the headers (BlackoilEbos.hpp
includes the header that also needs the typetag information).
2017-04-04 11:05:50 +02:00
Markus Blatt 2b0a9351d5 Iterate over Interior_Partition instead of All_Partition and if-clause 2017-03-24 12:25:28 +01:00
Markus Blatt 863bef4722 Fix superfluous dereferencing that broke compilation. 2017-03-24 08:22:32 +01:00
Markus Blatt 30e8753288 Use Interior_Partition when iterating over grid instead of if(..) continue.
Makes the code a bit cleaner.
2017-03-22 11:51:52 +01:00
Markus Blatt 990ea7c44c Remove unused variable warning for endElementIt.
It was redefined and initialized in an inner scope.
2017-03-20 19:53:27 +01:00
Markus Blatt ad1fe8fac0 Prevent using dangling references in BlackoilModelEbos::getConvergence.
Using cachedIntensiveQuantities on parallel grids will cause/is causing
dereferencing a null pointer here. Therefore we resort to iterating over
the grid and using the element Context.

If this turns out ot be performance regression @andlaus owes me a beer!
2017-03-20 16:46:10 +01:00
Markus Blatt aa5940a2ff Prevent using dangling references in BlackoilModelEbos::updateState.
Using cachedIntensiveQuantities on parallel grids will cause/is causing
dereferencing a null pointer here. Therefore we resort to iterating over
the grid and using the element Context.

If this turns out ot be performance regression @andlaus owes me a beer!

Closes #1110
2017-03-20 16:46:00 +01:00
Markus Blatt 13956625b6 Removed duplicate output writer setup.
The cat must have dragged that in during some of the various rebases of this branch.
This introduced a segmentation fault as for the second setup eclIO was already null.
2017-03-17 11:08:55 +01:00
Markus Blatt bb7934b1a2 [Ebos,bugfix] Correctly compute the global number of cells.
Currently, all parallel DUNE grid store some cells in addition to
interior cells. Therefore assuming that the global number of cells
(i.e. the number of cells a sequential grid needs to cover the same
whole domain with indentical cells) is not the sum of the number of
cells of the local grid. Previously, the latter was used.
2017-03-17 10:26:00 +01:00
Markus Blatt 0650f9b42e Deactivate gather code when MPI is not available.
In this case some of the used classes do not exist.
2017-03-16 14:52:59 +01:00
Markus Blatt 35ff439ee1 Make ParallelDebugOutput constructable with global or distributed grid view.
That makes coding a little more me/fool proof.
2017-03-16 14:52:59 +01:00
Markus Blatt 03cb9f4afa ParalleDebugOutput needs the distributed grid.
Because for the global grid the communicator sees just one process.
Unfortunately this is not documented.
2017-03-16 14:52:59 +01:00
Markus Blatt 2f95e33d59 Do not use the equilGrid in Ebos as it is deleted after the constructor.
Instead we create our own global grid representation.
2017-03-16 14:52:59 +01:00
Markus Blatt fd3e3596a9 Setup output writer and write initial values in parallel correctly.
Before this commit only the solution of process 0 was written.
To fix this we make the equilGrid of Ebos available. It is used
for the output writer. The properties written initially are gathered from
all processes first using the new gather/scatter utility.
2017-03-16 14:52:59 +01:00
Markus Blatt 45cee3d9f4 Added missing header include. 2017-03-16 14:52:59 +01:00
Markus Blatt aacbdb1777 Switch off non-owner entries during accumulation.
Previously entries attached to cells that are present
on multiply processes were acumulated several times.
2017-01-11 12:20:32 +01:00
Markus Blatt 86209139db Make StandardWells support cases with no wells.
Dense case was handled in PR #1002. I was not aware that the same
regression was in the legacy code. wells_manager.c_wells() might return
a null pointer if there are no wells in the domain of a process.
2017-01-09 16:12:07 +01:00
Markus Blatt 7c91be92a9 Added missing global sum for FIP totals. 2017-01-09 15:55:39 +01:00
Markus Blatt fb55aedf4b Fix unit conversion of fip totals (pav) again.
This was (accidentally?) introduced in c880efae5b (labelled
"mostly eliminate Eigen in the FIP and VFP code"). As it is neither
present in flow_ebos nor in flow_mpi and was previously removed in
ccec17f8 (labelled "Fixed missing unit conversion for total fluid in place")
I assume that this is a bug.
2017-01-09 15:31:40 +01:00
Markus Blatt 0a904deb02 Only try to merge files from a parallel run if ouptput requested.
If it is not requested then output_dir is not created and boost
will throw an exception if we try to read from a non existing
directory.
2017-01-09 12:09:49 +01:00
Markus Blatt 601dc77a37 Fix typo in exception message 2017-01-09 11:41:34 +01:00
Markus Blatt 6b2c33978e Implement parallel fip total computation.
Up to now parallel runs aborted due to an exception with
the message "FIP not yet implemented for MPI". With this
commit we do the computation in parallel, too. And flow_ebos
runs a bit longer...
2017-01-09 11:40:57 +01:00
Markus Blatt 5bcdb01f5a Make StandardWellsDense support cases with no wells.
In that case `wells_manager.c_wells()` returns a null pointer
which made `updateListEconLimited` segfault. With this commit
we treat a null wells_struct as having zero wells.

With this this and #1001 opm-data/equilibrium at least runs
through in parallel. Results will be checked next.
2017-01-09 11:36:12 +01:00
Markus Blatt 51dabf36f2 Only log messages about failed timesteps on one processes.
This OPM_THROW was introduced lately and results in all processes
logging the failure. With this commit the message is logged only once.
2016-12-16 11:30:04 +01:00
Markus Blatt dcb3a20f7a Specialize direct solver for Dune::MatrixBlock.
In upstream they expect to be used with FielMatrix as
the block type only. Thus it it is impossible to use AMG
with a direct coarse solver within OPM. With this patch
it would be possible if we did not use field type float.
2016-12-02 15:34:31 +01:00
Markus Blatt 0179a17704 Gather well controll, too. 2016-11-21 21:20:47 +01:00
Markus Blatt f601ac4013 Gather perforation phase rates, too.
To do this we needed to switch from WellState to WellStateFullyImplicitBlackoil
as only the latter stores this information.
2016-11-21 21:19:51 +01:00
Markus Blatt 88e118d76a Consistently use WellStateFullyImplicitBlackoil in output
Otherwise we cannot write out all the data in a parallel run.
2016-11-21 21:19:51 +01:00
Markus Blatt a6c323c48b Read and write rate and pressure per well perforation when gathering. 2016-11-21 21:19:39 +01:00
Markus Blatt a16bce8785 Fixes unsused parameter warnings for ebos stuff 2016-11-21 15:23:12 +01:00
Markus Blatt 80bbabc0b6 Start with a clean globalCellData_ for each data gathering.
Otherwise there might entries from the last call that should
either not be there this time or might have a different size.
2016-11-16 21:21:51 +01:00
Markus Blatt 098bd8f9fc Added assertion that entry was added to globalCellData_ for pack/unpack 2016-11-16 21:20:14 +01:00
Markus Blatt 00440ab344 Use data::Solution to gather cell data including user requested data.
Previously only the cell data registered with SimulationDataContainer
war gathered during parallel output. User requested data was neglected
and a warning was issued. With this commit we intialize the local view
of data::Solution on all processes with the data registered in
SimulationDataContainer and add cell data requested by the user. This is
then gathered on the IO process, and used for the output layer. To
rudimentarily support matlab we also create a global view of
SimulationDataContainer for it.
2016-11-16 17:11:24 +01:00
Markus Blatt 5ad813b4bd Warn about broken parallel matlab output.
If this is a parallel run and matlab output is requested then
we issue a warning that it is broken because of wrong velocities.
2016-11-16 17:09:53 +01:00
Markus Blatt b91f747a3e Removed second implementation of matlab output.
There is already a generic one with the Grid implementation
being the template parameter in the header file. The other
implementation using UnstructuredGrid does exactly the same.
Therefore we remove it with this commit.
2016-11-16 12:16:40 +01:00
Markus Blatt 55362ecdc2 Fix spelling in warning about unhandled parallel ouput. 2016-11-15 12:08:58 +01:00
Markus Blatt 1882d3315a Do not throw for unrecognized file when merging log files.
The regex we are using might also consider a file named bla.2.blub.
In that case it is not nice to throw an exception. Instead we print
a message to std::cerr.
2016-11-11 12:00:49 +01:00
Markus Blatt 8632c71cef Do not populate cellData but issue a warning in parallel.
This will lead to some data missing in the parallel runs
but will allow successful runs.
2016-11-10 17:46:49 +01:00
Markus Blatt 747c93e898 Removed ternary operator in inline initialization.
This made the code rather hard to read. Now we do the initialization
in the constructor body if needed.
2016-11-10 13:28:21 +01:00
Markus Blatt 3eba3353d0 Correctly mark transfer of ownership for ouptut writer 2016-11-10 13:04:30 +01:00
Markus Blatt 85c0bbcc10 Indent nested #if 2016-11-09 10:08:56 +00:00
Markus Blatt 3f7f81ef03 Cater variable name change in BCRSMatrix of DUNE 2.5
One of the variables now has a trailing underline.
2016-11-08 18:59:08 +00:00
Markus Blatt 077dc02481 Fix using local active cells for writing eclipse files in parallel.
Previously, the eclipseGrid used by EclipseWriter was constructed from
the one in the EclipseState with the current CpGrid. Unfortunately the
latter was the distributed version resembling only the local part that
the processor works on. Therefore the information about the active cells
was wrong when writing results (which raised an exception in the writer).

With this commit we construct the EclipseWriter before distributing the grid
and use this writer later on in the OutputWriter.
2016-11-07 19:35:53 +01:00
Markus Blatt a7cc4962e2 Let only one rank write to step_timing.txt
All ranks were still writing to step_timing.txt at the same time.
This made it unusable for parallel runs. With this commit only
one processes writes to this file.
2016-10-14 11:14:54 +02:00
Markus Blatt a424516639 Do not refer users to issue tracker if multiple procs log.
This is currently still happening due to the implementation of
OPM_THROW whenever the linear solver does not converge. This
happens quite often and we might not want to get overwhelmed by
the issue tracker.
2016-10-14 10:47:16 +02:00
Markus Blatt 828f118801 Do not store collective communication in the wells object.
Instead of this we rely on the default constructor of
WellSwitchingLogger. This finally fixes the compile
issues with DUNE 2.3.
2016-10-07 10:46:54 +02:00
Markus Blatt 3e6b1949ea Make sure that updateWellControls is called on each process.
The new WellSwitchingLogger within updateWellControls uses
collective communication with all processes. Therefore all
of them need to enter the function as other flow_mpi will deadlock.
Therefore this commit calls the method even with non local wells
active.
2016-10-05 23:53:43 +02:00