This commit broadens the scope of commit 2ad332e0b (PR #922) to
apply to all compilers/libraries, not just Clang/libc++, which do
not have support for floating-point types in std::from_chars().
While hopefully a transient situation, this enables building the
parameter system with GCC versions prior to GCC 11. We expect to
require version 11 in the not too distant future, though. At that
point we should revert this commit.
We use a configure-time feature test of the compiler (CMake command
'try_compile') to detect whether or not the compiler supports
floating-point overloads of std::from_chars() and emit the result to
config.h as the new preprocessor symbol
HAVE_FLOATING_POINT_FROM_CHARS
We use std::strtod() as the fall-back alternative for floating point
conversion if this symbol is defined to false (zero).
Now building will no longer fail if PETSc isn't available, and it correctly
degrades if it cannot find an available MPI. It should now behave similarly as
other optionals, such as SuperLU.
the reason is that the tools for profiling and for coverage analysis
(i.e., gprof and gcov) have trouble with this and crash. if you want
this to be enabled for whatever reason, use the cmake flag
-DSTRIP_DEBUGGING_SYMBOLS=ON or pass configure the
--enable-strip-debug option.
first this makes the test very slow, second (and more importantly) it
makes the test fail on dune master as the header relies on the
presence of the DUNE_GRID_VERSION* macros which are not present at the
configure stage of the build...
as far as I can see, it provided M4 macros for autotools based
projects which wanted to use OPM. I have severe doubts that this was
used by anyone because it most likely does not even work. (e.g. the M4
macros does not seem to specify the ERT and opm-parser prerequisites.)
Note that I'm not 100% sure of the above, so if I'm wrong, state so
loudly and I'll close the PR...
Removes a lot of the conditionals in the makefile. As reflected in the
comments, find_* won't run if the target variable is already set, and appending
empty list elements changes nothing. In order to make reading the file easier
these conditionals have mostly been removed.
Allows a specific PETSC_ROOT to override and replace default search paths. Now,
if PETSC_ROOT is passed and the find_library calls cannot find the libraries,
the makefile will only search in user provided directories.
When building with USE_MPI=ON the FindPetsc now uses the system provided
MPI if available. Falls back to looking for the PETSc provided unimpi for
sequential builds.
Removed the NO_DEFAULT_PATH flag as this really isn't working for most systems
(where PETSc will be installed from a repository and in /usr or /). Path suffix
parameters extended to accept more version-less configs too, to be compatible
with a default PETSc (debian style) install.
The FindPetsc module would check for a PETSC_ROOT and not attempt to look for
mpi and the petsc header if this was not set, which it in most cases won't be.
If the variable is set then the conditional include is redundant, as it will
search the explicitly passed paths first anyways.
this is now done by a config.h macro. The reason is that quite a bit
of code depends on boundary IDs which are only available as an
"experimental" grid extension in recent Dune releases...
this is required for GCC >= 4.8 to support the 'Q' suffix for floating
point literals (which are used in the quadmath.h header)
In order to prevent compilers which eat the flag but do not support it
from complaining constantly, it is tested for with "-Werror" enabled...
this is required to make the opm-core build succeed if ERT was build
with -DBUILD_SHARED_LIBS=OFF . (without it, I get errors like
/home/and/src/ert/devel/libert_util/src/thread_pool_posix.c:328: error: undefined reference to 'pthread_create'
this is basically the dune-grid grid manager for ALUGrid properly
out-sourced into an own module. (it does not require an external
library anymore, so it simplifies the build quite a bit.) Also, the
DUNE-ALUGrid module has quite a few new features and performance
improvements compared to the old code from dune-grid. For details, see
http://users.dune-project.org/projects/dune-alugrid
de facto, this does not change anything because opm-parser is required
and it has a hard dependency on ERT. It is good style to declare all
prerequisites explicitly in each module, though. Thanks to [at]bska
for the catch.
this is required for regex-matching keywords. Once GCC 4.9 is the
minimum compiler version to be supported, this can be dropped in favor
of std::regex ...
this is required for regex-matching keywords. Once GCC 4.9 is the
minimum compiler version to be supported, this can be dropped in favor
of std::regex ...
This changeset disables the effect of commit 778e87d. There appears
to be an unforeseen interaction between the calls to
Find_Package (Boost)
that are implied by module 'opm-parser-prereqs.cmake' and the one
that's directly invoked in 'Findopm-parser.cmake'. Until the
situation can be fully analysed and a complete solution implemented,
this is a temporary measure to restore the build of opm-core and
downstream OPM modules.