Commit Graph

177 Commits

Author SHA1 Message Date
Arne Morten Kvarving
cce99878d5 changed: use common check-commits target from opm-cmake 2015-05-28 10:05:23 +02:00
Arne Morten Kvarving
3a6d83fe49 added: look for opm-cmake in sibling directory 2015-05-27 11:47:20 +02:00
Arne Morten Kvarving
f409555b89 changed: locate opm-cmake using config mode 2015-05-27 09:59:39 +02:00
Joakim Hove
9cb13141ba Changed logic for finding cmake modules.
The loading of opm related cmake modules now follows the following
logic:

 1. Try include( OpmInit )
 2. Update the cmake load path with OPM_CMAKE_ROOT and try again.
 3. Bail out.
2015-05-08 10:49:54 +02:00
Markus Blatt
566aee7896 Added methods for computing global reductions.
We need to compute quite a few global reductions in the
Newton method of opm-autodiff. This commit adds the functionality
to compute several reductions combined using only one global
communication. Compiles and test succeeds with one or more process.
2015-01-21 16:19:35 +01:00
Atgeirr Flø Rasmussen
060a2fea0f Merge pull request #702 from jorgekva/linsolver_petsc
PETSc support in OPM
2014-12-19 11:25:58 +01:00
Arne Morten Kvarving
be2ab082ad add check-commits target 2014-10-20 14:52:52 +02:00
Robert Kloefkorn
39e0a2b7c4 Make code compile with dune trunk version (ie 3.0-git). This should include support for
dune 2.3.
2014-08-06 14:00:54 +02:00
Liu Ming
f9eecfb015 if no petsc installed, we should remove petsc related files from cmake file
list.
2014-07-08 11:02:07 +08:00
Arne Morten Kvarving
457ea2c44f added: hook for conditionally compiled files
backport from opm-upscaling PR#100
2014-06-16 14:40:52 +02:00
Bård Skaflestad
1fca44fb03 Explicitly group conditions
For some reason I was unable to produce correct criteria without
inserting explicit parentheses.  I don't know why that is, but
better safe than sorry.
2014-04-07 20:01:18 +02:00
Bård Skaflestad
a154887a2b Exclude "test_parallel_linearsolver" from non-MPI builds
The "sources_hook" runs after "OpmFiles" in "OpmLibMain".
Therefore, we must search the "tests_SOURCES" to exclude particular
tests from the build.

This fixes a build problem in the non-MPI case.
2014-04-07 20:01:18 +02:00
Markus Blatt
aa5ac90fa6 Removed superfluous export of HAVE_DUNE_ISTL.
With the last patch HAVE_DUNE_ISTL will already be
defined in config.h
2014-03-27 11:47:35 +01:00
Markus Blatt
1e205adcf1 Added support for the parallel solvers of dune-istl.
To support this the solveSystem methods of the LinearSolverInterface gets
an optional additional template parameter of type boost::any. It can hold any
copy constructable object. In our case it is used to pass the information about
the parallelization into the solvers of dune-istl without the compiler needing to know
their type. Inside of LinearSolverIstl::solveSystem we check whether the type stored inside of
boost::any is the new ParallelIstlInformation. If this is the case we extract the information
and use the parallel solvers if available, otherwise we solve serial/sequential.

The new ParallelIstlInformation is needed as the OwnerOverlapCopyCommunication is not copy
constructable. This is indeed a design flaw that should and will fixed upstream, but for the
time being we need ParallelIstlInformation to transfer the ParallelIndexSet and RemoteIndices
objects.
2014-03-20 21:59:29 +01:00
Markus Blatt
1ad8381b04 [cmake] do not export dune-istl version but use module local detection.
According to @rolk defines should only be exported in
cmake/Modules/<module>-prereqs.cmake if they are used in the
headers. This is not the case for the dune-istl version macros and
therefore we use opm_need_version_of in the config_hook in the top
level CMakefile with this patch.
2014-03-19 15:15:55 +01:00
Bård Skaflestad
ed3552cfb5 Merge pull request #319 from rolk/319_confvar
Trim unnecessary config.h defines from prerequisite list
2013-08-17 05:37:35 -07:00
Roland Kaufmann
e14cb185ad Add a small bootstrapper to locate build system
Currently this bootstrapper only finds the macros that are located
in the cmake/ tree in this project. Projects that don't carry their
own build system can specify search locations here.
2013-08-15 00:03:17 +02:00
Roland Kaufmann
1922201a31 Show how to install CMake macros together with code
Currently this is disabled because no other project needs them (they
have their own copy in the source tree)
2013-08-14 21:19:41 +02:00
Roland Kaufmann
8e4225fbb9 Add defines that are used in compilation modules
This define is used in a opm/*.c* file, but only there, and should
therefore be in config.h, but not added to the list that only clients
must also provide.
2013-08-14 20:49:52 +02:00
Roland Kaufmann
ada41cc792 Remove bindings to AGMG from library
AGMG is now under a closed-source license, meaning that results
obtained with this solver is not freely reproducible by others.
Its use is therefore discouraged.

As of version 2.3, the DUNE AMG parts are competitive, so there
is a free and open alternative.
2013-08-13 23:25:04 +02:00
Bård Skaflestad
c50b62fe5a Merge pull request #308 from rolk/308_agmg
Resurrect support for AGMG library

This is an interim milestone that may serve as point from which to 
resurrect the AGMG suppert fully if the AGMG author ever decides to 
re-release the software under an open licence.
2013-08-13 14:17:38 -07:00
Roland Kaufmann
39833dc591 Don't add AGMG in an ad-hoc way
Use the standard prerequisite list instead.
2013-08-07 00:11:40 +02:00
Roland Kaufmann
22a70f1438 Give template for adding version requirement 2013-08-05 21:09:09 +02:00
Roland Kaufmann
fa5344ec3e Move old files into the attic
The attic are the place where files which we don't use right now, but
which we acknowledge some amount of valuable time has been spent on and
which may be usable some day in the future, so we don't have the
conscience to right out delete them.

These files are not expected to compile, and certainly not to run and
produce sensible results, anymore. However, with some work they can
possibly be converted into proper unit tests or examples.
2013-08-02 20:31:06 +02:00
Roland Kaufmann
58d9e09d02 Added note about where to make likely modifications
People will head for CMakeLists.txt when making modifications (such
as adding a new file). This note directs them to where they should
rather look.
2013-07-30 14:20:34 +02:00
Roland Kaufmann
5ae4d44e54 Read project properties from dune.module
We cannot generate dune.module because that file is read by dunecontrol
before the build starts. It therefore make sense to let it be the
original and let the build system read it instead of duplicating the
information in CMakeLists.txt

This module is a adaption of Andreas Lauser's OpmParseDuneModule
in opm-material, modified to handle the more sparse info provided by
the other modules as well.
2013-07-30 14:11:26 +02:00
Roland Kaufmann
3f4695794d Eliminate _MODULE_DIR variable
It is only used in one place, where it can easily be replaced by its
expansion. The reason for removing it is that it depends on the name
of the project, and I intend to read this using a routine it the very
directory it is including, hence the need for a different approach.
2013-07-30 13:26:16 +02:00
Roland Kaufmann
9853407ded Refer to other project-specific files at top-level
Having the include statements here will hopefully lead to others
quickly finding the list of prerequisite files needed to build.
2013-07-05 00:58:29 +02:00
Roland Kaufmann
501e5ad0e9 Project-specific hooks no longer needs an extra arg.
This change is already implemented in its own commit, but the
CMakeLists.txt change is in its own commit to make it easier to
distribute the changes to other projects without merge conflicts.
2013-06-29 22:10:48 +02:00
Roland Kaufmann
df6c17a9c4 Use common library code and define customization in macros
Only the code that is special for this particular project is retained
in the main file; all the common code is imported from the cmake/
directory.
2013-06-25 23:55:58 +02:00
Bård Skaflestad
2b4298f366 Merge pull request #261 from rolk/261_parse
Sideport of OPM/opm-material@48f6d4d to opm-core
2013-06-20 04:55:27 -07:00
Bård Skaflestad
e3577085c2 Add CMake backwards compatibility for version < 2.8.3
Add features that aren't available in early versions of the 2.8.x
release series, enabling use of 2.8.0 if needed (e.g. Ubuntu 10.04)
2013-06-20 13:30:57 +02:00
Roland Kaufmann
4cd16438ea Recognize lib dirs that may be used later
This let you specify a bunch of directory names on the command line
to *all* packages, without getting annoying warnings that they are
defined but not used.
2013-06-15 22:11:14 +02:00
Roland Kaufmann
1ae1405c21 Notify callbacks when a timestep has completed
Client code can do additional processing for the output of each
timestep.
2013-05-14 11:36:13 +02:00
Roland Kaufmann
2386325e57 Allow user to override our non-standard defaults
CMake loads option defaults from the platform file and then usually
proceeds to write these to the cache, so it is not possible to see
if an option was specified by the user, or was the default.

By setting CMAKE_NOT_USING_CONFIG_FLAGS, we regain control over the
options and can then set this to what we think is suitable, provided
that the user hasn't specified something for us.
2013-04-05 00:14:26 +02:00
Atgeirr Flø Rasmussen
22c46acbf0 Fix tinyxml exclusion. 2013-03-22 08:00:00 +01:00
Atgeirr Flø Rasmussen
9a2f2c48fd Fixed conditional compilation issues with UMFPACK.
This should fix the issue reported in #208 introduced in #203.
2013-03-19 10:30:27 +01:00
Roland Kaufmann
4fb05162cb Only use MPI if explicitly enabled
Running with MPI on a regular workstation will probably not increase
performance, so this should be disabled as default.
2013-03-15 11:38:45 +01:00
Roland Kaufmann
8dcca4cf9b Use camel-case in SuperLU's name
Originally, I added FindSuperLU with uppercase since the variables it
returned had that case. Now the scripts should be patched so that it
searched for uppercase amongst the variables as well, so the module
name can retain its original case (and for compatibility with DUNE)
2013-03-15 01:24:06 +01:00
Roland Kaufmann
54c89146d7 Enable CMake < 2.8.5 clients to report Git version 2013-03-13 01:02:03 +01:00
Roland Kaufmann
52a6b00752 Add direct dependency on dune-common
We need to link to the library provided by dune-common, but dune-istl
does not pull this one in transitively.
2013-03-13 00:02:54 +01:00
Atgeirr Flø Rasmussen
fc2d6ee81f Merge pull request #181 from rolk/182_openmp
Probe explicitly for OpenMP
2013-03-07 05:47:25 -08:00
Roland Kaufmann
406874bf6b Probe explicitly for OpenMP
opm-core contains code which has #pragma omp. Earlier, OpenMP was
detected as part of the probe for ERT. However, that probe got
smarter, and as a result doesn't probe for more than it needs. Thus,
we need to check for OpenMP explicitly in opm-core. (It is disabled
by default)
2013-03-07 13:51:57 +01:00
Roland Kaufmann
3ae89d0754 Print compiler version number when configuring 2013-03-07 11:23:51 +01:00
Roland Kaufmann
252d853147 Disable use of OpenMP by default
If support for OpenMP should be added, it must be specified by
setting an option. If not, then warnings for unknown pragmas are
disabled, so that the code can have #pragma omp witout getting
messages during build.
2013-03-07 00:17:46 +01:00
Roland Kaufmann
4942763ddd Use temp file for config vars to avoid rebuild
When generating the config.h configuration file, write to a temporary
first and then rename afterward to avoid touching the file and thus
triggering a complete rebuild (of everything that includes config.h)
unnecessarily.
2013-03-04 14:00:06 +01:00
Roland Kaufmann
234be65229 Specify source files explicitly rather than with glob
Files which constitutes compilation units are now specified explicitly
in the file CMakeLists_files.cmake rather than identified through a
glob. If this file is updated, a reconfigure should be triggered.

This also enables us to specify exactly which headers that should be
distributed as part of the installation package, and which programs
that should be used for unit testing.
2013-03-04 12:25:20 +01:00
Atgeirr Flø Rasmussen
0bfe185d43 Merge pull request #164 from atgeirr/remove-gnumakefile
Remove confusing GNUmakefile and document cmake building process.
2013-03-04 01:20:24 -08:00
Roland Kaufmann
dc3d94e985 Activate Fortran interface on demand
Not only if we need to compile Fortran code, but also if we need to call
some functions from a Fortran library from C code.
2013-03-04 09:46:32 +01:00
Atgeirr Flø Rasmussen
c5ccf7e093 Remove GNUmakefile, document cmake building.
The README now suggests using nice and make -j for multicore machines.
2013-02-25 17:45:22 +01:00