Commit Graph

194 Commits

Author SHA1 Message Date
Markus Blatt
742d8943ca Move policy settings to OpmInit and into a macro OpmSetPolicies().
OpmInit.cmake is one of the first includes and most importantly before
the opm-*-prereqs.cmake files are include. The macro is needed to make
the policies set in all CMakefiles. OpmSetPolicies should be called in
the toplevel CMakeLists.txt file.

This fixes a lot of warnings experienced in downstream modules that
got triggered by the opm-*-prereqs.cmake files. At some calls the
policies were at other not.

On the other hand new warnings about soon to be deprecated policies
CMP0026 and CMP0048 appear at least for cmake version 3.13.4.
But that should be fixed in another PR.
2020-04-15 14:17:53 +02:00
Joakim Hove
1c84c4c3f3 Add new keyword EXIT
The keyword EXIT is a opm only keyword which can be used to terminate the whole
simulation as part of the ACTIONX keyword.
2020-04-14 16:32:52 +02:00
Joakim Hove
4b687e3368 Fix bug in CMakeLists.txt - mock simulator tests were not built 2020-03-24 07:23:31 +01:00
Arne Morten Kvarving
8233ae200c
Merge pull request #1515 from akva2/python_debian_packaging
Add debian packaging of python bindings
2020-02-26 12:22:01 +01:00
Arne Morten Kvarving
6e0a581764 remove unused cmake option 2020-02-26 11:57:37 +01:00
Arne Morten Kvarving
c765b769fa fixed: set LD_LIBRARY_PATH so python tests can find the library
necessary when building shared lib
2020-02-26 11:56:02 +01:00
Bård Skaflestad
df21acfc49
Merge pull request #1492 from akva2/conditional_test_suite
changed: disable building of test suite if Boost::test is not found
2020-02-24 20:30:53 -06:00
Joakim Hove
269802ae48 Add comment about locating shared library while testing Python 2020-02-19 12:33:50 +01:00
Arne Morten Kvarving
f76daabbb4 changed: disable building of test suite if Boost::test is not found 2020-02-19 12:25:32 +01:00
Joakim Hove
6b0073455b Pass RPATH to the python setup.py based build system 2020-02-06 10:15:40 +01:00
Arne Morten Kvarving
8cf1497ccb fixed: use PROJECT_XXX instead of CMAKE_XXX
make it work fine with the 'super-build' CMakeLists.txt
2020-01-13 13:38:47 +01:00
Joakim Hove
3c6a60c4a9 Code genereator will create many source files 2020-01-02 15:27:54 +01:00
Joakim Hove
c3a038c2b6 Refactor code generation to facilitate multiple source files 2020-01-02 15:27:54 +01:00
Joakim Hove
885093d472 Use DEST_PREFIX when installing python code 2019-11-27 23:46:32 +01:00
Torbjørn Skille
59e0c39558 New program summary based on OPM I/O classes 2019-11-12 13:27:26 +01:00
Joakim Hove
d66852d8de Rewrite EclFile wrapping
- Include the eclipse_io.cpp file in existing extension library - do not create
   a new library.

 - Remove Python class EclFile - just expose the C++ through Pybind1, include
   some monkey-patching of the class to ensure proper Python strings for CHAR
   keywords.

 - Remove string based keyword lookup.

 - Use standard Python methods __len__, __getitem__ and __contains__; get() is
   an equivalent alternative to __getitem__().

 - Add property arrays in addition to getListOfArrays()
2019-11-06 09:59:07 +01:00
Torbjørn Skille
7cacc734e8 python binding for EclFile 2019-11-06 09:59:07 +01:00
Joakim Hove
0b8a42fd1f Fix cmake find pythonlibs 2019-11-06 09:59:07 +01:00
Joakim Hove
0d2f57354a
Merge pull request #1184 from joakim-hove/python-dep
Add Python library to opm-common_LIBRARIES cmake variable
2019-11-04 13:16:32 +01:00
Joakim Hove
a7187abc17 Initial implementation of 3D properties 2019-10-31 11:18:55 +01:00
Joakim Hove
176e7f75ed Add Python library to opm-common_LIBRARIES cmake variable 2019-10-31 07:07:07 +01:00
Arne Morten Kvarving
95a129cbed fixed: let's not copy the files twice 2019-10-29 14:59:08 +01:00
Joakim Hove
9d1b7a83d9 Changes in Python build:
- Use python/install.py to copy from source tree to build tree
- List Cxx source files in CMakeLists_files.cmake
2019-10-28 21:42:57 +01:00
Joakim Hove
d382c57145 Add small python script to determine extension suffix 2019-10-28 20:30:39 +01:00
Joakim Hove
162d0e0902 Minor change to python enable script 2019-10-25 08:54:40 +02:00
Arne Morten Kvarving
93ac533373 changed: put the generated ParserKeywords.cpp first in list
this improves build throughput on jenkins since building this
large file will overlap more with other build tasks.
2019-10-17 11:40:48 +02:00
Joakim Hove
e815194e21
Merge pull request #1112 from stefoss23/remove_common_state
Remove common state
2019-10-17 06:58:25 +02:00
Arne Morten Kvarving
247b5685cc remove libecl from buildsystem, jenkins and packaging 2019-10-16 20:03:08 -05:00
Steinar Foss
0e5c14568e removed common_state. 2019-10-16 13:59:00 +02:00
Joakim Hove
5269f52291
Merge pull request #1075 from joakim-hove/python-install
Add Python copy/install hack
2019-10-14 18:46:48 +02:00
Joakim Hove
7dc77d1ca3 Install PYTHON Modules when running jenkins 2019-10-14 15:53:31 +02:00
Joakim Hove
59b73a0667 Change the python installation code
- Main cmake based python installation is based on small script install.py and
  not setup.py
- Python installation is guarded by cmake switch OPM_INSTALL_PYTHON
- Configure convenience shell script setup-install.sh for setup.py based
  installation.
- Remove PYTHONPATH hacks from setup.py
2019-10-14 13:13:09 +02:00
Steinar Foss
c0bd19c59e python: added class UnitSystem. 2019-10-11 22:02:54 +02:00
Joakim Hove
204ea1a1a2 Use ${PYTHON_EXECUTABLE} instead of 'python' in CMakeLists.txt 2019-10-04 20:14:27 +02:00
Joakim Hove
69ddffc966 Expose C++ objects to Python runtime 2019-09-23 21:31:45 +02:00
Joakim Hove
230c4494ed Add Python wrapping for OpmLog 2019-09-23 14:35:25 +02:00
Steinar Foss
dd4cce4e9a python: removed group_tree. 2019-09-21 11:52:44 +02:00
Joakim Hove
d2ff536cf3 Renamed python/cxx/common -> python/cxx/export 2019-09-13 09:40:13 +02:00
Arne Morten Kvarving
16d38c3245 fix python link for dependents 2019-09-09 11:16:58 +02:00
Arne Morten Kvarving
97ad4baa99 quell warnings 2019-09-09 11:16:58 +02:00
Joakim Hove
ab2ea1acf3 Add basic manager class fro Python interpreter 2019-09-09 10:58:26 +02:00
Joakim Hove
7984d2a0f4 Expose the Parser class properly to Python 2019-09-05 08:44:47 +02:00
Joakim Hove
723113b3b9 Add small shell script templates to simplify Python development 2019-09-05 08:44:47 +02:00
Steinar Foss
554ceb87dd setup.py will install python packages.
setup.py install to CMAKE_INSTALL_PREFIX.

cmake will create python install dir.
2019-08-15 17:00:43 +02:00
Steinar Foss
c94ed2f643 renaming python/cxx/sunbeam*.* -> common *.* 2019-08-15 11:19:18 +02:00
Steinar Foss
e25416c236 renamed python pkg sunbeam -> opm.
setup.py: test_suite -> tests_suite .

libsunbeam -> libopmcommon_python.

sunbeam -> opm: test_connection ok.

test_deck ok.

test_group_tree ok.

test_grupnet ok.

test_parse_deck.py ok.

test_parse.py ok.

python all tests ok.
2019-08-15 11:02:09 +02:00
Arne Morten Kvarving
ca42ca5968 changed: use a custom output to avoid rebuilds
currently, the python bindings are built on every make invocation,
including the 'make install' command.

this improves on this situation by tracking whether or not the target
needs to be rebuilt through a custom output and dependencies.

the list of dependencies is not very pretty, but necessary when
linking two build systems like this.
2019-08-13 15:56:45 +02:00
Arne Morten Kvarving
86b1a93b0e fixed: clean python bindings with 'make clean' 2019-08-13 15:56:45 +02:00
Steinar Foss
c208a59597 Sunbeam will be compiled with setuptools.
setup.py moved to python/python.

moved python tests to python/python.

added __init__.py under python/tests.

added 'test_' before all python test names.

test_ prefix added to tests.

setup.py and python tests moved back to python base.

setuptools executes from root python.

python: tests run from root python w/ setup.py.

python tests: temp reduced to test_deck only.

python setup.py: manually linked opmcommon.

setup.py: linked ecl.

setup.py linked boost_filesystem.

setup.py: linked boost_regex.

python all tests run.

removec usr/local from setup.py ext_module.

cmake make copies entire python dir to build.

setup.py can execute from build.

setup.py executes from build/python.

python tests run under setup.py.

setup.py library_dirs and include-dirs set by cmake command.

removed cmake files from sunbeam.

sunbeam: added code for install.

setup.py: removed 'import ecl'.

python/src -> python->src_sunbeam.

setup.py: discontinued use of glob, all files listed instead.

build-opm_module.sh: added prefix_path to opm.

build-opm-module.sh: changed spell error for EXTRA_MODULE_FLAGS[opm-common].

setup.py: infer include directories from cmake target

CMakeLists.txt: under python: align install statement.

CMakeLists build python: removed find_package.

src_sunbeam -> cxx.

setup.py: test_suite as string.

setup.py: tests_suite -> test_suite.

setup.py: added exception if 'build_ext' not used.

temporarily moved files to python/sunbeam.
2019-08-09 10:40:33 +02:00
Joakim Hove
7c856f681d Use new classes Group2 and GTNode 2019-08-06 22:59:16 +02:00
Joakim Hove
dc4aa882be Integration testing of Group2 in Schedule constructor 2019-07-30 09:36:57 +02:00
Arne Morten Kvarving
6a7191c376 fixed: sources should include the extension 2019-07-10 09:03:36 +02:00
Joakim Hove
dba43a4a5e Rename cmake symbol ENABLE_PYTHON -> OPM_ENABLE_PYTHON 2019-06-27 15:19:03 +02:00
Steinar Foss
143c73cdd0 ENABLE_PYTHON OFF. 2019-06-27 12:31:38 +02:00
Steinar Foss
ef936afeaa opm set to PIC with PYTHON ON. 2019-06-27 12:10:02 +02:00
Steinar Foss
da1fb0b744 python compiles directly. 2019-06-20 10:05:53 +02:00
Steinar Foss
d45731a205 added option ENABLE_PYTHON. 2019-06-14 13:20:51 +02:00
Joakim Hove
2682eef9b3
Merge pull request #788 from joakim-hove/remove-welltest
Removed well testing from Schedule constructor
2019-05-27 20:13:45 +02:00
Joakim Hove
35a70310c6 Removed well testing from Schedule constructor 2019-05-27 17:47:55 +02:00
Bård Skaflestad
e654915069 Move ECLIPSE I/O Into Main OPM Common Library
This makes the facility usable for the restart read/write code.

Specifically, import the I/O classes into namespace Opm::ecl, and
place the files in physical location opm/io/eclipse, and move the
test utilities to new top-level directory 'test_util/'.  While here,
discontinue the 'testutil' static library since most of its features
are now available in the main 'opmcommon' library.  This does entail
compiling a few of the test_util/ CPP files multiple times, and
adding the objects to each executable independently.
2019-05-23 10:23:01 +02:00
Torbjørn Skille
135f2d491a remove unused summary comparison classes 2019-04-08 11:38:34 +02:00
Torbjørn Skille
fbfac1f797 update compareECL to use new ECL I/O classes 2019-04-08 11:38:34 +02:00
Torbjørn Skille
4768f72400 added: new utility convertECL
for converting between formatted and binary ecl files
2019-04-08 11:36:20 +02:00
Torbjørn Skille
db142f698b added: ESmry class for reading summary data from ECL files 2019-04-08 11:36:20 +02:00
Torbjørn Skille
c54cb2195b added: ERst class for reading restart simulation data from ECL files 2019-04-08 11:36:20 +02:00
Torbjørn Skille
24a8efb2e3 added: ERft class for reading RFT simulation data from ECL files 2019-04-08 11:36:20 +02:00
Torbjørn Skille
181eeffbdb added: EGrid class for reading GRID data from ECL files 2019-04-08 11:36:20 +02:00
Torbjørn Skille
46f2542487 finish class EclFile
this is a base class for ECL I/O classes
2019-04-08 11:36:20 +02:00
Torbjørn Skille
6d1b2f3f4f added: EclOutput class for writing ECL files 2019-04-08 11:36:20 +02:00
Torbjørn Skille
188f78f2d6 add some common utilities used by Ecl IO classes 2019-04-08 11:36:20 +02:00
Joakim Hove
c910a51359 Add optional code for well testing 2019-03-19 16:51:46 +01:00
Arne Morten Kvarving
7c3aacd118 some cleanup in buildsystem 2019-02-15 11:03:08 +01:00
Joakim Hove
d82be29745 ACTIONX: Works with WELOPEN and msim 2019-02-02 17:35:56 +01:00
Joakim Hove
a8db1f155c Default building of MOCK simulator to ON 2019-01-22 13:12:06 +01:00
Joakim Hove
984a308e24 Add skeleton for mock simulator 2018-10-17 17:21:11 +02:00
Arne Morten Kvarving
564f064392 added: cmake glue for adding bash tab completion for an installed product 2018-09-25 12:31:11 +02:00
Joakim Hove
9f9041dcae Fix build of tests when using shared library 2018-09-10 18:33:47 +02:00
Arne Morten Kvarving
cb525c5c75 changed: fold compareSummary into compareECL application 2018-09-10 08:42:26 +02:00
Arne Morten Kvarving
7a034ffd01 changed: split ECL(Integration|Regression)Test classes to separate files
to unify code with the summary comparison classes
2018-09-07 15:33:46 +02:00
Arne Morten Kvarving
bee4590aaa changed: move the comparison classes out of libopmcommon
these classes are really not made for reusability.
thus they should only be built into the applications.
2018-09-07 14:38:03 +02:00
Joakim Hove
ce5c617f41 Add cmake variable $OPM_PACK_COMMAND 2018-08-07 22:50:56 +02:00
Markus Blatt
760d0d70b4 Export ENABLE_ECL_INPUT as it is used in opm-common-prereq.cmake 2018-07-12 12:25:21 +02:00
Markus Blatt
5b5d895380 Fix calling function from OpmPackage in package configuration file.
Find package_deps is called from <opm-module-name>-prereqs.cmake that is
included in our package configuration files. So it has to be defined early on.
We do this in the package confguration file of opm-common which needs to
be found before any other OPM module.

This fixes the CMake Error seen be e.g. dumux:
CMake Error at opm-grid/opm-grid-prereqs.cmake:37 (find_package_deps):
  Unknown CMake command "find_package_deps".
2018-07-06 11:02:15 +02:00
Arne Morten Kvarving
e823b0a93e changed: replace opm-data with new opm-tests repository 2018-03-27 12:09:09 +02:00
Arne Morten Kvarving
932cece7d3 add imported parser/output sources to build system
use -DENABLE_ECL_INPUT=0 to disable input (and output) support
use -DENABLE_ECL_OUTPUT=0 to disable output support

both default to on
2018-03-06 11:18:03 +01:00
Arne Morten Kvarving
fdb0ec1e71 fixed: add missing project declaration 2018-01-19 14:35:58 +01:00
Arne Morten Kvarving
8d8e612356 fix path written to in-tree config file 2017-04-07 11:20:37 +02:00
Arne Morten Kvarving
0b321d31ef fixed: we need different paths in installed and in-tree config file
fixes #44
2015-09-21 14:21:21 +02:00
Arne Morten Kvarving
aefbe0bf17 fixed: install cmake macros 2015-09-09 16:23:37 +02:00
Arne Morten Kvarving
9df2e0adc9 fixed: properly generate config file for opm-common 2015-09-09 16:23:26 +02:00
Andreas Lauser
8e13912b2b add CMakeLists.txt and CMakeLists_files.cmake and remove dummy Makefile
as for the patch before, this will only strictly required once c++
code is added to the repo.
2015-09-08 14:34:59 +02:00
Arne Morten Kvarving
ea3126feb4 changed: rename to opm-common 2015-09-08 10:14:00 +02:00
Arne Morten Kvarving
0bcb1210d9 added: generate config mode file for opm-cmake
changes install to prefix/share/opm by default
2015-05-26 13:59:10 +02:00
Joakim Hove
85752f0f90 Added CMakeLists.txt file to install modules. 2015-05-08 17:20:03 +02:00