Commit Graph

10295 Commits

Author SHA1 Message Date
Markus Blatt
77050e5042 Moved settings of CMake_STANDARD stuff to OPMInit.cmake
That makes it usable from *prereqs and helps preventing
multiple -std=c++xx options when compiling (at least for
pybind11)
2021-03-18 15:06:00 +01:00
Markus Blatt
55bdaaa9f9 Do not set unnecessary COMPILE_DEFINTIONS.
The ones set for DUNE are for very old unsupported versions.
2021-03-18 15:06:00 +01:00
Markus Blatt
18ccbcfa03
Merge pull request #2362 from blattms/use-add-compile-definitions
Use add_compile_definitions to add defintions
2021-03-18 15:04:34 +01:00
Joakim Hove
b206a7542e
Merge pull request #2365 from bska/ancon-accum-effective-face-area
Accumulate Effective Aquifer Connection Face Area
2021-03-18 11:00:34 +01:00
Bård Skaflestad
3c6c827a75 Accumulate Effective Aquifer Connection Face Area
We need this information to form part of the per-connection restart
output to the "SCAQ" array.  The accumulation uses the same
procedure as for the total influx coefficient, but is always based
on the geometric face area instead of the tabulated aquifer influx
coefficient.
2021-03-17 21:04:30 +01:00
Markus Blatt
05128745cf Some modules may still export definitions using -D, strip it. 2021-03-17 17:27:26 +01:00
Markus Blatt
213f0c0afa Only add -D for older CMake versions. 2021-03-17 16:57:00 +01:00
Joakim Hove
a3984dbcb6
Merge pull request #2364 from blattms/remove-boost-python-include
Removes inclusion of boost-python header
2021-03-17 16:55:10 +01:00
Markus Blatt
6cf4250f18 Removes inclusion of boost-python header 2021-03-17 16:02:41 +01:00
Markus Blatt
6d9a924930 Add -D qualifier to DEFINITIONS if missing for old CMake. 2021-03-17 15:36:24 +01:00
Joakim Hove
fe99038df6
Merge pull request #2363 from joakim-hove/action-wells-specified
Make sure action results contain well for fully specified condition
2021-03-17 13:44:09 +01:00
Markus Blatt
a4f73a3a7c Use add_compile_definitions for newer CMake versions.
add_definitions is deprecated.
Note the new command does not need the -D qualifier but will detect
if there is one and act accordingly. This helps with package
configuration files that have "-DVAR" in their COMPILE_DEFINTIONS

As some packages actually already add the -D qualifier we now detect
that to be able to support old CMake version without
add_compile_definitions. In this case we prevent adding another -D
and use add_definitions.
2021-03-17 11:16:13 +01:00
Joakim Hove
d02ae5e650 Make sure action results contain well for fully specified condition 2021-03-17 10:08:35 +01:00
Markus Blatt
66ed9bcf75
Merge pull request #2360 from blattms/fix-docker-pypi
Determine Python include directory to fix docker pypi builds
2021-03-16 22:05:00 +01:00
Markus Blatt
ee11a57b6c Honor PYTHON_EXECUTABLE even if we use Python3. 2021-03-16 20:32:50 +01:00
Markus Blatt
9bc0536d13 Do not use the imported Python3 library directly.
It just a hassle (need to search for Python3 downstream,
cannot be backwards compatible).
2021-03-16 20:32:50 +01:00
Markus Blatt
1ed6166f1f Determine Python include directory to fix docker pypi builds
Whenever OPM_ENABLE_PYTHON is on we need to set PYTHON_INCLUDE_DIRS
as it is needed to find Python.h (shouldn't we even need to link the
library?).

This could (in theory) be done by using by issuing
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
or
find_package(PythonLibs REQUIRED).

Unfortunately, both do not work (for yet unknown reasons) when we
build pypi packages in docker (even with setting the PYTHON_EXECUTABLE
or Python3_EXECUTABLE correctly).

Hence we now use python manually to determine these.
2021-03-16 20:32:36 +01:00
Tor Harald Sandve
5f30a969f0 clean-up the interface of the guiderates 2021-03-16 15:53:35 +01:00
Joakim Hove
39a8233238
Merge pull request #2358 from joakim-hove/test-remove-special
Remove special mnemomics from testing
2021-03-16 14:01:03 +01:00
Joakim Hove
17639d821d Remove special mnemomics from testing 2021-03-15 22:33:16 +01:00
Joakim Hove
b189cc907f
Merge pull request #2356 from atgeirr/minor-fixes
Minor fixes
2021-03-15 22:31:54 +01:00
Joakim Hove
eb652ac232
Merge pull request #2353 from joakim-hove/remove-unneeded-cmake-include
Remove cmake include of pybind11 CMakeLists.txt
2021-03-15 16:41:24 +01:00
Atgeirr Flø Rasmussen
675cb40dd4 Silence a few warnings. 2021-03-15 14:19:15 +01:00
Joakim Hove
ae7edda588
Merge pull request #2351 from joakim-hove/remove-find-cwrap
Removed cmake module FindCwrap
2021-03-15 13:39:52 +01:00
Markus Blatt
b7ce9c0fe2
Merge pull request #2348 from blattms/external-fmtlib-2
Enable usage of fmtlib on the system.
2021-03-15 13:26:23 +01:00
Atgeirr Flø Rasmussen
6518e5d905 Add missing <string> include. 2021-03-15 12:57:57 +01:00
Tor Harald Sandve
8941cc7c02 Add guiderate for injection groups 2021-03-15 12:29:20 +01:00
Joakim Hove
2a2ce8c826
Merge pull request #2354 from blattms/python-libs-only-for-embedded
Only search for Python libs if OPM_ENABLE_EMBEDDED_PYTHON is ON.
2021-03-15 12:28:04 +01:00
Markus Blatt
0455c48d2f Only search for Python libs if OPM_ENABLE_EMBEDDED_PYTHON is ON.
Apparently it is not needed in the other cases.
Fixes an issue that arose from #2344 and restores the old behaviour
concerning the libraries.
2021-03-15 10:19:10 +01:00
Joakim Hove
52caefae34 Remove cmake include of pybind11 CMakeLists.txt 2021-03-15 09:27:19 +01:00
Joakim Hove
0ae020cb8b Removed cmake module FindCwrap 2021-03-13 16:22:16 +01:00
Joakim Hove
8d11fc5458
Merge pull request #2344 from blattms/search-for-python3
Explictly search for python3 (CMake >= 3.12.0) and send error if only python2 is found
2021-03-13 16:20:04 +01:00
Markus Blatt
af3c825588 Make sure any python search finds Python3.
FindCWrap issues another find_package(PythonInterpret).
By setting the PYTHON_EXECUTABLE variable we make sure it
will find python3

This also fixes the CMake confusions about multiple linker paths

```
Make Warning at cmake/Modules/OpmSatellites.cmake:320 (add_executable):
  Cannot generate a safe linker search path for target test_ERft because
  files in some directories may conflict with libraries in implicit
  directories:

    link library [libpython3.7m.so] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /usr/lib/python3.7/config-3.7m-x86_64-linux-gnu

  Some of these libraries may not be found correctly.
```
2021-03-12 16:48:26 +01:00
Markus Blatt
9a25b78b98 Cater for missing FindPython3 in CMake version < 3.12.0
For these we need to use the old approach. At least we
now produce an error if only python2 is found.

Needed e.g. for Ubuntu LTS 18.04.
2021-03-12 16:47:27 +01:00
Markus Blatt
504aed72eb Enable usage of fmtlib on the system.
If fmtlib is present on the system we used that one
in the normal mode (not header only). Otherwise we
fallback to the embedded one header only.
2021-03-12 14:47:15 +01:00
Markus Blatt
f8ab960d97
Merge pull request #2346 from blattms/recover-external-cjson-support
Recover external cjson library support.
2021-03-12 14:42:44 +01:00
Kai Bao
df0fdb7169
Merge pull request #2349 from GitPaean/using_map_for_numerical_aquifers
using std::map for m_aquifers of NumericalAquifers
2021-03-12 13:14:51 +01:00
Kai Bao
e56865cafe using std::map for m_aquifers of NumericalAquifers
to make sure the same order when traversing the m_aquifers during
parallel running.
2021-03-12 10:01:22 +01:00
Markus Blatt
2e0bc4f17a Recover external cjson library support.
This was somehow deactivated when merging opm-parser to opm-common.
2021-03-11 16:21:46 +01:00
Joakim Hove
654a78a541
Merge pull request #2339 from joakim-hove/sched-state-sim-step
Sched state sim step
2021-03-11 15:23:02 +01:00
Markus Blatt
c98f74c206 Make imported Python3 targets available downstream 2021-03-11 12:50:48 +01:00
Markus Blatt
974f7da6a1 Use python3 for setup scripts, too 2021-03-11 11:50:27 +01:00
Joakim Hove
fda9601ecc
Merge pull request #2345 from GitPaean/adding_missing_init_pressure
adding init_pressure in the serilization of NumericalAquiferCell
2021-03-11 08:43:49 +01:00
Kai Bao
16fd8997fa adding init_pressure in the serilization of NumericalAquiferCell
it was missing.
2021-03-10 23:40:46 +01:00
Bård Skaflestad
2782bff479
Merge pull request #2342 from joakim-hove/gen-source-dep-fixup
Gen source dep fixup

Fixes #2340.
2021-03-10 21:47:03 +01:00
Joakim Hove
56d3d1a7d3
Merge pull request #2335 from totto82/addInjectionTypeChangedEvent
Add event for injection type changed
2021-03-10 15:58:59 +01:00
Markus Blatt
164f451124 Explictly search for python3 and use that instead PythonInterpret et al.
Otherwise python2 might be found, but OPM needs python3.
2021-03-10 15:57:01 +01:00
Joakim Hove
122f15006c Check OPM_ENABLE_PYTHON and OPM_ENABLE_EMBEDDED_PYTHON 2021-03-10 15:44:45 +01:00
Joakim Hove
d6aa829197 Avoid spurious dependencies if Python is not enabled 2021-03-10 15:44:43 +01:00
Joakim Hove
f8fb46ed84 Source generator should only optionally generate Python binding code 2021-03-10 15:44:18 +01:00