Amendments to support upcoming DUNE 2.10 release
DUNE 2,10 moves a step closer to being used by just using find_package(dune-module) with targets. It is not completely there as upstream still sets up the targets in dune_finalize_project.
Unfortunately, it sets the (unused since 2.7) alias HAVE_UMFPACK in a included header. The compiler warns about this as we explicitly set it 1 instead of HAVE_SUITESPARSE_UMFPACK. Hence we remove it in OPM.
It also set HAVE_DUNE_MODULE to TRUE in the CMake package configuration files. This causes compile errors because we get a #define HAVE_DUNE_ISTL TRUE in config.h but TRUE is not defined. Therefore reset the value before we do the out compile check.
Still needs to be battle-tested, but works on my system.
Related PRs:
- OPM/opm-grid#758
- OPM/opm-simulators#5585
jenkins build this opm-grid=758 opm-simulators=5585 please
I really do not understand, why line FlexibleSolver_impl.hpp#L202 works with master.
Matrix type is Dune::BCRSMatrix<Opm::MatrixBlock<double, 1, 1>> and I doubt that the compiler would accept usage of UMFPack<Dune::BCRSMatrix<Opm::MatrixBlock<double, 1, 1>>> because there is no specialization of UMFPackVectorChooser for a BCRSMatrix with block type Opm::MatrixBlock<double, 1, 1> in DUNE or OPM. That one seems needed when looking at: dune/istl/umfpack.hh#L172, because UMFPack is derived from InverseOperator<UMFPackVectorChooser<MatrixType>::doman_type, UMFPackVectorChooser<MatrixType>::range_type>
I must be missing something important, here.
I must be missing something important, here.
Indeed the trick is in matrixblock.hh lines 272-290:
#if HAVE_UMFPACK
/// \brief UMFPack specialization for Opm::MatrixBlock to make AMG happy
///
/// Without this the empty default implementation would be used.
template <typename T, typename A, int n, int m>
class UMFPack<BCRSMatrix<Opm::MatrixBlock<T, n, m>, A> >
: public UMFPack<BCRSMatrix<FieldMatrix<T, n, m>, A> >
{
using Base = UMFPack<BCRSMatrix<FieldMatrix<T, n, m>, A> >;
using Matrix = BCRSMatrix<FieldMatrix<T, n, m>, A>;
public:
using RealMatrix = BCRSMatrix<Opm::MatrixBlock<T, n, m>, A>;
UMFPack(const RealMatrix& matrix, int verbose, bool)
: Base(reinterpret_cast<const Matrix&>(matrix), verbose)
{}
};
#endif
jenkins build this opm-grid=758 opm-simulators=5585 please
Indeed. I just thought it would have more patches. Seems I lost speed in the process and stop adding things here to save time...
More Debian patches will be coming here...
Well if we are to learn from history you should take your approval and get the bits you can in ;)
Seems like the other patches were in PRs without the DUNE 2.10 flag and are already part of master. :sweat_smile:
I'll check the other modules, then.
jenkins build this opm-grid=758 opm-simulators=5585 please
jenkins build this opm-grid=858 opm-simulators=5585 please
With the addtional cleanups (about UMFPACK and superluous version macros for old DUNE versions), this should work jenkins now. Would be cool if @akva2 would review the new commits.
jenkins build this opm-grid=858 opm-simulators=5585 please
Still looks fine.
Someone needs to double check my jenkins skills. Jenkins seems to use the master branch for all downstream modules,
my fault. if somebody comments between triggering and jenkins starting the job, jenkins see the last comment instead of the trigger text..
jenkins build this opm-grid=858 opm-simulators=5585 please
jenkins build this opm-grid=858 opm-simulators=5585 please