Commit Graph

3611 Commits

Author SHA1 Message Date
Markus Blatt
cefd7e7702 Extracts the full compiler path and feeds it to cmake.
Previously, specifying the compiler name with a variable
to configure ("configure CC=gcc") lead to CMake complaining
that <builddir>/$CC was not a valid path. This patch fixes
this by extracting the full path with "which <compiler>".
Should fix issue #355.
2013-09-02 18:03:05 +02:00
Bård Skaflestad
0b9834be56 Merge pull request #331 from rolk/331_sync
Provide protocol for exchanging state with client
2013-08-30 07:41:14 -07:00
Roland Kaufmann
5348ffd467 Provide protocol for exchanging state with client
The state that is passed to the simulator object is directly
accessible without any encapsulation towards the client. After
the notification callback was introduced, this allows the client
to observe the state in the middle of a simulation.

However, it may be that the simulator has some internal state
which is not reflected in the state object because there is a
cost associated by flushing it into the TwophaseState format.

The notification is called back on every timestep, not just the
ones that will do reporting. It may even be that reporting is
done dynamically and is not known at the time of setup. (It is
more like a condition variable).

Consequently, flushing the state in every timestep is a bad
idea. This patch sets up a new method sync() which it is expected
that the notification will call if it needs the state for
reporting purposes.

Currently it is a no-op. It just establishes a protocol that
other, compatible implementations can also use.
2013-08-30 15:14:22 +02:00
Bård Skaflestad
76a7cba75e Merge pull request #351 from rolk/351_cxx
Alternate compiler cannot be set with environment variables
2013-08-28 04:10:39 -07:00
Bård Skaflestad
cf90e27830 Merge pull request #350 from rolk/350_dunemod
Dune.module is searched for in the wrong directory
2013-08-28 03:53:08 -07:00
Roland Kaufmann
23e1896e40 Mimic Autotools way to specify non-standard Boost
If Boost is installed in say /usr/include/boost141 and
/usr/lib64/boost141, then there is no root you can specify to pick
them both up. However, whereas Autotools uses --with-boost and
--with-boost-libdir, FindBoost in CMake changes to using two different
variables: BOOST_INCLUDEDIR and BOOST_LIBRARYDIR. Using the header
directory for BOOST_ROOT will not work (in particularily not with
old CMake versions).
2013-08-28 11:03:15 +02:00
Roland Kaufmann
976c5c54a2 Print version number in log together with location 2013-08-28 09:47:52 +02:00
Roland Kaufmann
c26ea374ea Special handling for some recognized env. vars.
CMake does not like that you specify the compiler with the environment
variables, instead preferring that you set them as cache variables.
This layer translate between the names of the the two.
2013-08-28 00:27:41 +02:00
Roland Kaufmann
47b2c64675 Always search for dune.module in no-arch lib-dir
The previous version may have ended up in lib64/ instead of lib/;
now we remove the arch-specific suffix from the path, and always
use the no-arch version.
2013-08-27 23:18:36 +02:00
Roland Kaufmann
1065ca3589 Noarch lib-dir was only used in one wrong place
dune.module does not contain any paths to architecture-specific
binaries. It is therefore always installed in no-arch lib/ directory.
Thus, there is no need to have a variable for this, and there was
no other users of this variable either.
2013-08-27 22:26:21 +02:00
Bård Skaflestad
d5f36f14ac Merge pull request #349 from rolk/349_ertver
Test ERT for a newer API level
2013-08-27 07:36:08 -07:00
Roland Kaufmann
8131f70434 Test ERT for a newer API level
We use an ERT version which needs to know whether at least this
function signature exists. The earlier implementation covers too
many versions.
2013-08-27 14:37:14 +02:00
Roland Kaufmann
78e1fe14d4 Merge pull request #348 from rolk/348_ssroot
Allow build tree of SuiteSparse to be used as root
2013-08-27 00:17:33 -07:00
Roland Kaufmann
476aff4697 Allow build tree of SuiteSparse to be used as root
With this changeset, the build tree of SuiteSparse can be used as the
root; the package does not have to be installed.
2013-08-27 09:05:04 +02:00
Bård Skaflestad
74380b0964 Merge pull request #335 from rolk/335_multiver
Support multi-versioned installation
2013-08-26 06:08:36 -07:00
Bård Skaflestad
8b98840a72 Merge pull request #346 from andlaus/fix_superlu_and_quadmath
Fix superlu and quadmath
2013-08-26 06:07:22 -07:00
Bård Skaflestad
0522184cfb Merge pull request #334 from rolk/334_macver
Support configuration on MacOS X using Apple toolchain
2013-08-26 06:05:38 -07:00
Bård Skaflestad
3c465de5be Merge pull request #340 from rolk/340_suitesparse
Remove subdirectory from SuiteSparse include
2013-08-26 06:04:21 -07:00
Bård Skaflestad
5edf6be8aa Merge pull request #342 from rolk/342_signals
Provide event mechanism using C++11 instead of Boost::Signals
2013-08-26 05:59:32 -07:00
Roland Kaufmann
ccf4fcae12 Change from pass-by-value to pass-by-const-ref
The object is copied when put into the list, so there should be no
danger of dangling references.
2013-08-26 14:33:23 +02:00
Bård Skaflestad
372ed60f3c Merge pull request #339 from andlaus/alugrid_parallel_found_no_list
avoid to make ALUGRID_PARALLEL_FOUND a list
2013-08-26 04:22:14 -07:00
Bård Skaflestad
1d28905cb1 Merge pull request #341 from rolk/341_known
Mark known feature variables as used
2013-08-26 04:17:15 -07:00
Roland Kaufmann
542d607674 Remove dependency on Boost::Signals
The functionality has been replaced with equivalents from C++11.
2013-08-26 13:11:25 +02:00
Bård Skaflestad
e9ac0eaade Merge pull request #343 from andlaus/ewoms_add_opm_material
add opm-material to the eWoms prerequisites
2013-08-26 04:09:27 -07:00
Roland Kaufmann
e9bd8464b2 Replace old timestep completed event with new scheme 2013-08-26 13:08:49 +02:00
Andreas Lauser
980a1b6eb9 add opm-material to the eWoms prerequisites
this is needed by the imminent switch of eWoms to the OPM build
system.
2013-08-26 13:06:34 +02:00
Roland Kaufmann
3156d0749a Add classes for event-handling
The new classes Event and EventSource can be used as a simple mechanism
for implementing event-based callbacks in the simulators.
2013-08-26 12:52:03 +02:00
Bård Skaflestad
0c03c6e733 Merge pull request #329 from andlaus/unquoted_config_vars
cmake: support defining unquoted variables for config.h
2013-08-26 03:25:11 -07:00
Andreas Lauser
3abbe0ef52 cmake: fix the SuperLU test
for me, it was completely broken. (it worked fine if you did not want
to use it, though.) Now it (hopefully) follows the standard OPM
variable naming conventions, allows to use the internal SuperLU BLAS
library, and works fine if superLU is not installed on a system-wide
basis.

v2: cache the POST_2005 variable to make writing it to config.h more
    reliable (on my kubuntu 13.04 system it did not work without it)
v3: re-add a proper "post 2005" check from newer versions of the dune tests
2013-08-25 22:44:30 +02:00
Roland Kaufmann
90df601050 Remove bash4-isms from configuration script
Getting uppercase of a string can be done in a way that is compatible
with Bash 3.2. This creates a dependency on the `tr` utility, but I
reckon it will/can be available everywhere Bash 3.2 is.
2013-08-25 14:27:09 +02:00
Roland Kaufmann
b78deb0982 Use libc++ runtime if necessary for C++11 compliance
If we are using the Apple toolchain on MacOS X, we must use the
newer runtime and not the old GCC 4.2 fork, in order to get the
C++11 library features (such as std::shared_ptr).
2013-08-25 10:49:09 +02:00
Roland Kaufmann
b6d7eb6364 Mark known feature variables as used
Some features, such as the Fortran wrappers, are enabled by options,
and it may be usable to have those set in a common definition file.

However, as these features are included conditionally based on use,
their option variables may not exist in other projects, giving a CMake
warning for them.

Here we list such variables too. Reading them at the end corresponds
to the Autotools convention of ignoring unknown --enable-xxx options.
2013-08-25 09:49:42 +02:00
Roland Kaufmann
e41c56d0da Remove subdirectory from SuiteSparse include
SuiteSparse may or may not be installed in a suitesparse/ directory.

FindSuiteSparse will look in a suitesparse/ subdirectory when trying
to locate umfpack.h, but it will add the full directory to the compiler
command-line (e.g. `-I/usr/include/suitesparse`) and not that of the
parent. Since the parent is usually included too, it is not noticed
that it is advertedly using another include paths than its own.

However, if we have SuiteSparse installed in a non-system location,
using the subdirectory in the `#include` statement may now cause an
error, even though configuration actually found SuiteSparse!
2013-08-25 09:35:51 +02:00
Roland Kaufmann
e8ec217c52 Remove linker command from compiler command-line
There is no SuiteSparse headers or libraries in
/System/Library/Frameworks/Accelerate.framework on MacOS X, so adding
this directive won't contribute anything other than compiler warnings.
2013-08-25 09:26:21 +02:00
Roland Kaufmann
bb19cecf72 Always keep debug bundle near executable on Mac OS X
There isn't a /usr/lib/debug directory as on Linux.
2013-08-25 01:25:55 +02:00
Roland Kaufmann
74fdd3e25b Strip debug symbols to separate file on MacOS X
The standard Xcode toolchain on MacOS X uses strip and dsymutil, not
objcopy as the GNU toolchain does.
2013-08-25 01:25:26 +02:00
Roland Kaufmann
8337669389 Refactor code to separate extensions from filename
The earlier code assumed that the version information always follows
the full file path; this code splits the path up into various parts
so that this may be changed.
2013-08-25 00:51:30 +02:00
Roland Kaufmann
f9551f9dc7 Only install debug symbols if they are in separate file
If the strip utility is not present, debug symbols won't be in a
separate file and subsequently cannot be installed.
2013-08-24 22:36:11 +02:00
Roland Kaufmann
cb111bc07b Report version of Mac OS X in configuration log
If we are building on Mac OS X, use the official operating system
version (e.g. 10.8) instead of the kernel version (e.g. 12.4).
2013-08-24 22:26:42 +02:00
Andreas Lauser
b29d5ceb65 avoid to make ALUGRID_PARALLEL_FOUND a list
because -- at least on one of my systems -- a list evaluates to false,
even if all entries are true...
2013-08-24 12:54:08 +02:00
Bård Skaflestad
889f8d7e49 Merge pull request #337 from rolk/337_boost
Fix prerequisite Boost components across modules
2013-08-23 15:37:19 -07:00
Roland Kaufmann
6aec9fc64b opm-autodiff needs filesystem component of Boost
Also, it really should be the same as the rest to make sure that we
pick up the right components when we look for the Boost library.
2013-08-23 23:24:47 +02:00
Roland Kaufmann
0f8e9aad2a Alert package maintainer about versioned dir option
If someone is going to backport these packages, they may have an
interest in using versioned directories. These will most likely
attempt to set directories on the build command line, thus it is
most natural to insert a suggestion about this option there.
2013-08-23 22:46:12 +02:00
Roland Kaufmann
844705eb0c Allow spec of not commonly rooted incl and lib dir
Header and library directory may be specified separately by using the
variables e.g. OPM_CORE_INCLUDE_DIR and OPM_CORE_LIB_DIR. These override
even the OPM_CORE_ROOT. This allows us to use a backported version which
uses versioned directory names.
2013-08-23 22:40:25 +02:00
Roland Kaufmann
6deeb5dfa5 Support installation in a versioned directory
If the option USE_VERSIONED_DIR is set to ON (default is OFF), then
most files are installed in a ${suite}-${label}/ subdirectory
(e.g. header files go in "/usr/include/opm-2013.03/"). This enables
us to easily install backports of newer versions on systems which
have a system package for an older one, without getting conflicts.
2013-08-23 22:28:43 +02:00
Andreas Lauser
48ec4f0754 cmake: do not quote variables for config.h anymore
v2: incorporate Roland's nitpicks (I hope)
v3: It was decided that it's better to change the default behavior
v4: make sure the CMake syntax is correct even if the value of the
    variable contains spaces (if it contains double quotes it's a
    different matter, but that's pretty much a corner case, IMHO)
v5: properly escape backslash and double quote characters in the cmake
    syntax
2013-08-23 21:10:02 +02:00
Bård Skaflestad
089e755735 Merge pull request #330 from rolk/330_underscore
Simplify creation of Fortran function wrappers
2013-08-23 11:43:48 -07:00
Roland Kaufmann
ae49042e91 Simplify creation of Fortran function wrappers
The old version invoked a Fortran compiler to figure out the bindings
necessary to link to a Fortran function. This creates a dependency on
having a Fortran compiler, even though the project may not have any
Fortran source it needs to compile!

Also, the Fortran compiler that is installed on the system may not be
the same as was used to compile the library anyway, so we are not even
sure that this is correct!

Furthermore, FindLAPACK operates on the assumption that names in that
library is suffixed with a single underscore, so if that is not correct,
we won't find any of the functions in that library anyway!

Thus, this patch enables us to assume that appending an underscore is
the right thing to do without using the compiler. This option is off by
default, but can be activated with USE_UNDERSCORING=ON (named after the
GFortran option).
2013-08-23 12:57:17 +02:00
Bård Skaflestad
7b882ceaca Merge pull request #328 from rolk/328_warn
Issue a CMake warning if client project is incompatible
2013-08-21 13:03:53 -07:00
Bård Skaflestad
6f4e663346 Merge pull request #325 from rolk/325_eigen
Make probe for Eigen3 part of the common build system
2013-08-21 09:46:18 -07:00