Merge pull request #6660 from svenn-t/blocksize_7

Increase block sizes to 7
This commit is contained in:
Arne Morten Kvarving authored and GitHub committed 2025-12-05 08:42:54 +01:00
commit 24b5a26f30
31 files changed
+131 -21

No files matched your search

+2
View File
@@ -167,6 +167,7 @@ list (APPEND MAIN_SOURCE_FILES
opm/simulators/linalg/FlexibleSolver4.cpp
opm/simulators/linalg/FlexibleSolver5.cpp
opm/simulators/linalg/FlexibleSolver6.cpp
opm/simulators/linalg/FlexibleSolver7.cpp
opm/simulators/linalg/FlowLinearSolverParameters.cpp
opm/simulators/linalg/ISTLSolver.cpp
opm/simulators/linalg/MILU.cpp
@@ -178,6 +179,7 @@ list (APPEND MAIN_SOURCE_FILES
opm/simulators/linalg/PreconditionerFactory4.cpp
opm/simulators/linalg/PreconditionerFactory5.cpp
opm/simulators/linalg/PreconditionerFactory6.cpp
opm/simulators/linalg/PreconditionerFactory7.cpp
opm/simulators/linalg/PropertyTree.cpp
opm/simulators/linalg/setupPropertyTree.cpp
opm/simulators/timestepping/AdaptiveSimulatorTimer.cpp
+35
View File
@@ -0,0 +1,35 @@
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*
Copyright 2025 NORCE AS
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
Consult the COPYING file in the top-level source directory of this
module for the precise wording of the license and the list of
copyright holders.
*/
#include "config.h"
#include <opm/simulators/linalg/FlexibleSolver_impl.hpp>
INSTANTIATE_FLEXIBLESOLVER(double, 7)
#if FLOW_INSTANTIATE_FLOAT
INSTANTIATE_FLEXIBLESOLVER(float, 7)
#endif
+2 -1
View File
@@ -184,7 +184,8 @@ using CommunicationType = Dune::Communication<int>;
INSTANTIATE_FLEX(T,3) \
INSTANTIATE_FLEX(T,4) \
INSTANTIATE_FLEX(T,5) \
INSTANTIATE_FLEX(T,6)
INSTANTIATE_FLEX(T,6) \
INSTANTIATE_FLEX(T,7)
INSTANTIATE_TYPE(double)
@@ -274,7 +274,8 @@ using PolyHedralGrid3D = Dune::PolyhedralGrid<3, 3>;
INSTANTIATE(T,3) \
INSTANTIATE(T,4) \
INSTANTIATE(T,5) \
INSTANTIATE(T,6)
INSTANTIATE(T,6) \
INSTANTIATE(T,7)
INSTANTIATE_TYPE(double)
+2 -1
View File
@@ -283,7 +283,8 @@ void milun_decomposition(const M& A, int n, MILU_VARIANT milu, M& ILU,
INSTANTIATE_DIM(T,3) \
INSTANTIATE_DIM(T,4) \
INSTANTIATE_DIM(T,5) \
INSTANTIATE_DIM(T,6)
INSTANTIATE_DIM(T,6) \
INSTANTIATE_DIM(T,7)
INSTANTIATE_TYPE(double)
@@ -52,7 +52,8 @@ namespace Opm
INSTANTIATE(T,3) \
INSTANTIATE(T,4) \
INSTANTIATE(T,5) \
INSTANTIATE(T,6)
INSTANTIATE(T,6) \
INSTANTIATE(T,7)
INSTANTIATE_TYPE(double)
@@ -0,0 +1,37 @@
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*
Copyright 2025 NORCE AS
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
Consult the COPYING file in the top-level source directory of this
module for the precise wording of the license and the list of
copyright holders.
*/
#include "config.h"
#include <opm/simulators/linalg/PreconditionerFactory_impl.hpp>
namespace Opm {
INSTANTIATE_PF(double, 7)
#if FLOW_INSTANTIATE_FLOAT
INSTANTIATE_PF(float, 7)
#endif
}
@@ -308,7 +308,8 @@ analyzeAggregateMaps()
template class CprCreation<T,3>; \
template class CprCreation<T,4>; \
template class CprCreation<T,5>; \
template class CprCreation<T,6>;
template class CprCreation<T,6>; \
template class CprCreation<T,7>;
INSTANTIATE_TYPE(double)
@@ -370,7 +370,8 @@ initWellContributions([[maybe_unused]] WellContributions<Scalar>& wellContribs,
INSTANTIATE_GPU_FUNCTIONS(T,3) \
INSTANTIATE_GPU_FUNCTIONS(T,4) \
INSTANTIATE_GPU_FUNCTIONS(T,5) \
INSTANTIATE_GPU_FUNCTIONS(T,6)
INSTANTIATE_GPU_FUNCTIONS(T,6) \
INSTANTIATE_GPU_FUNCTIONS(T,7)
INSTANTIATE_TYPE(double)
@@ -434,7 +434,8 @@ solve_system(std::shared_ptr<BlockedMatrix<Scalar>> matrix,
template class amgclSolverBackend<T,3>; \
template class amgclSolverBackend<T,4>; \
template class amgclSolverBackend<T,5>; \
template class amgclSolverBackend<T,6>;
template class amgclSolverBackend<T,6>; \
template class amgclSolverBackend<T,7>;
INSTANTIATE_TYPE(double)
@@ -78,7 +78,8 @@ void amgclSolverBackend<Scalar,block_size>::solve_cuda(Scalar* b)
template void amgclSolverBackend<T,3>::solve_cuda(T*); \
template void amgclSolverBackend<T,4>::solve_cuda(T*); \
template void amgclSolverBackend<T,5>::solve_cuda(T*); \
template void amgclSolverBackend<T,6>::solve_cuda(T*);
template void amgclSolverBackend<T,6>::solve_cuda(T*); \
template void amgclSolverBackend<T,7>::solve_cuda(T*);
INSTANTIATE_TYPE(double)
@@ -724,7 +724,8 @@ solve_system(std::shared_ptr<BlockedMatrix<Scalar>> matrix,
template class cusparseSolverBackend<T,3>; \
template class cusparseSolverBackend<T,4>; \
template class cusparseSolverBackend<T,5>; \
template class cusparseSolverBackend<T,6>;
template class cusparseSolverBackend<T,6>; \
template class cusparseSolverBackend<T,7>;
INSTANTIATE_TYPE(double)
@@ -998,6 +998,7 @@ INSTANTIATE_GPU_FUNCTIONS(3);
INSTANTIATE_GPU_FUNCTIONS(4);
INSTANTIATE_GPU_FUNCTIONS(5);
INSTANTIATE_GPU_FUNCTIONS(6);
INSTANTIATE_GPU_FUNCTIONS(7);
#undef INSTANTIATE_GPU_FUNCTIONS
@@ -340,7 +340,8 @@ void openclBILU0<Scalar,block_size>::apply(const cl::Buffer& y, cl::Buffer& x, [
template class openclBILU0<T,3>; \
template class openclBILU0<T,4>; \
template class openclBILU0<T,5>; \
template class openclBILU0<T,6>;
template class openclBILU0<T,6>; \
template class openclBILU0<T,7>;
INSTANTIATE_TYPE(double)
@@ -359,7 +359,8 @@ void openclBISAI<Scalar,block_size>::apply(const cl::Buffer& y, cl::Buffer& x, [
template class openclBISAI<T,3>; \
template class openclBISAI<T,4>; \
template class openclBISAI<T,5>; \
template class openclBISAI<T,6>;
template class openclBISAI<T,6>; \
template class openclBISAI<T,7>;
INSTANTIATE_TYPE(double)
@@ -320,7 +320,8 @@ void openclCPR<Scalar,block_size>::apply(const cl::Buffer& y, cl::Buffer& x, Wel
template class openclCPR<T,3>; \
template class openclCPR<T,4>; \
template class openclCPR<T,5>; \
template class openclCPR<T,6>;
template class openclCPR<T,6>; \
template class openclCPR<T,7>;
INSTANTIATE_TYPE(double)
@@ -67,7 +67,8 @@ setOpencl(std::shared_ptr<cl::Context>& context_,
template class openclPreconditioner<T,3>; \
template class openclPreconditioner<T,4>; \
template class openclPreconditioner<T,5>; \
template class openclPreconditioner<T,6>;
template class openclPreconditioner<T,6>; \
template class openclPreconditioner<T,7>;
INSTANTIATE_TYPE(double)
@@ -713,7 +713,8 @@ solve_system(std::shared_ptr<BlockedMatrix<Scalar>> matrix,
template class openclSolverBackend<T,3>; \
template class openclSolverBackend<T,4>; \
template class openclSolverBackend<T,5>; \
template class openclSolverBackend<T,6>;
template class openclSolverBackend<T,6>; \
template class openclSolverBackend<T,7>;
INSTANTIATE_TYPE(double)
@@ -243,7 +243,8 @@ solve_system(std::shared_ptr<BlockedMatrix<Scalar>> matrix,
template class rocalutionSolverBackend<T,3>; \
template class rocalutionSolverBackend<T,4>; \
template class rocalutionSolverBackend<T,5>; \
template class rocalutionSolverBackend<T,6>;
template class rocalutionSolverBackend<T,6>; \
template class rocalutionSolverBackend<T,7>;
INSTANTIATE_TYPE(double)
@@ -472,7 +472,8 @@ apply(const Scalar& y, Scalar& x, [[maybe_unused]] WellContributions<Scalar>& we
template class rocsparseBILU0<T,3>; \
template class rocsparseBILU0<T,4>; \
template class rocsparseBILU0<T,5>; \
template class rocsparseBILU0<T,6>;
template class rocsparseBILU0<T,6>; \
template class rocsparseBILU0<T,7>;
INSTANTIATE_TYPE(double)
@@ -518,7 +518,8 @@ apply(const Scalar& y,
template class rocsparseCPR<T,3>; \
template class rocsparseCPR<T,4>; \
template class rocsparseCPR<T,5>; \
template class rocsparseCPR<T,6>;
template class rocsparseCPR<T,6>; \
template class rocsparseCPR<T,7>;
INSTANTIATE_TYPE(double)
@@ -83,7 +83,8 @@ setJacMat(const BlockedMatrix<Scalar>& jMat)
template class rocsparsePreconditioner<T,3>; \
template class rocsparsePreconditioner<T,4>; \
template class rocsparsePreconditioner<T,5>; \
template class rocsparsePreconditioner<T,6>;
template class rocsparsePreconditioner<T,6>; \
template class rocsparsePreconditioner<T,7>;
INSTANTIATE_TYPE(double)
@@ -678,7 +678,8 @@ solve_system(std::shared_ptr<BlockedMatrix<Scalar>> matrix,
template class rocsparseSolverBackend<T,3>; \
template class rocsparseSolverBackend<T,4>; \
template class rocsparseSolverBackend<T,5>; \
template class rocsparseSolverBackend<T,6>;
template class rocsparseSolverBackend<T,6>; \
template class rocsparseSolverBackend<T,7>;
INSTANTIATE_TYPE(double)
@@ -551,6 +551,7 @@ INSTANTIATE_CUDILU_DUNE(double, 3);
INSTANTIATE_CUDILU_DUNE(double, 4);
INSTANTIATE_CUDILU_DUNE(double, 5);
INSTANTIATE_CUDILU_DUNE(double, 6);
INSTANTIATE_CUDILU_DUNE(double, 7);
INSTANTIATE_CUDILU_DUNE(float, 1);
INSTANTIATE_CUDILU_DUNE(float, 2);
@@ -558,3 +559,4 @@ INSTANTIATE_CUDILU_DUNE(float, 3);
INSTANTIATE_CUDILU_DUNE(float, 4);
INSTANTIATE_CUDILU_DUNE(float, 5);
INSTANTIATE_CUDILU_DUNE(float, 6);
INSTANTIATE_CUDILU_DUNE(float, 7);
@@ -334,6 +334,7 @@ INSTANTIATE_GPUSEQILU0_DUNE(double, 3);
INSTANTIATE_GPUSEQILU0_DUNE(double, 4);
INSTANTIATE_GPUSEQILU0_DUNE(double, 5);
INSTANTIATE_GPUSEQILU0_DUNE(double, 6);
INSTANTIATE_GPUSEQILU0_DUNE(double, 7);
template class ::Opm::gpuistl::GpuSeqILU0<Opm::gpuistl::GpuSparseMatrixWrapper<double>,
::Opm::gpuistl::GpuVector<double>,
::Opm::gpuistl::GpuVector<double>>;
@@ -344,6 +345,7 @@ INSTANTIATE_GPUSEQILU0_DUNE(float, 3);
INSTANTIATE_GPUSEQILU0_DUNE(float, 4);
INSTANTIATE_GPUSEQILU0_DUNE(float, 5);
INSTANTIATE_GPUSEQILU0_DUNE(float, 6);
INSTANTIATE_GPUSEQILU0_DUNE(float, 7);
template class ::Opm::gpuistl::GpuSeqILU0<Opm::gpuistl::GpuSparseMatrixWrapper<float>,
::Opm::gpuistl::GpuVector<float>,
::Opm::gpuistl::GpuVector<float>>;
@@ -448,6 +448,7 @@ INSTANTIATE_GPUILU_DUNE(double, 3);
INSTANTIATE_GPUILU_DUNE(double, 4);
INSTANTIATE_GPUILU_DUNE(double, 5);
INSTANTIATE_GPUILU_DUNE(double, 6);
INSTANTIATE_GPUILU_DUNE(double, 7);
INSTANTIATE_GPUILU_DUNE(float, 1);
INSTANTIATE_GPUILU_DUNE(float, 2);
@@ -455,3 +456,4 @@ INSTANTIATE_GPUILU_DUNE(float, 3);
INSTANTIATE_GPUILU_DUNE(float, 4);
INSTANTIATE_GPUILU_DUNE(float, 5);
INSTANTIATE_GPUILU_DUNE(float, 6);
INSTANTIATE_GPUILU_DUNE(float, 7);
@@ -194,12 +194,14 @@ INSTANTIATE_KERNEL_WRAPPERS_WITH_SCALAR_AND_BLOCKSIZE(float, 3);
INSTANTIATE_KERNEL_WRAPPERS_WITH_SCALAR_AND_BLOCKSIZE(float, 4);
INSTANTIATE_KERNEL_WRAPPERS_WITH_SCALAR_AND_BLOCKSIZE(float, 5);
INSTANTIATE_KERNEL_WRAPPERS_WITH_SCALAR_AND_BLOCKSIZE(float, 6);
INSTANTIATE_KERNEL_WRAPPERS_WITH_SCALAR_AND_BLOCKSIZE(float, 7);
INSTANTIATE_KERNEL_WRAPPERS_WITH_SCALAR_AND_BLOCKSIZE(double, 1);
INSTANTIATE_KERNEL_WRAPPERS_WITH_SCALAR_AND_BLOCKSIZE(double, 2);
INSTANTIATE_KERNEL_WRAPPERS_WITH_SCALAR_AND_BLOCKSIZE(double, 3);
INSTANTIATE_KERNEL_WRAPPERS_WITH_SCALAR_AND_BLOCKSIZE(double, 4);
INSTANTIATE_KERNEL_WRAPPERS_WITH_SCALAR_AND_BLOCKSIZE(double, 5);
INSTANTIATE_KERNEL_WRAPPERS_WITH_SCALAR_AND_BLOCKSIZE(double, 6);
INSTANTIATE_KERNEL_WRAPPERS_WITH_SCALAR_AND_BLOCKSIZE(double, 7);
#define INSTANTIATE_KERNEL_WRAPPER_WITH_SCALAR(T) \
template Opm::gpuistl::GpuBuffer<T*> Opm::gpuistl::detail::getDiagPtrs<T>( \
@@ -247,7 +247,8 @@ validateVectorMatrixSizes(size_t vectorSize, size_t matrixBlockSize, size_t matr
INSTANTIATE_SPARSE_MATRIX_DUNE_OPERATIONS(CLASS_NAME, T, 3); \
INSTANTIATE_SPARSE_MATRIX_DUNE_OPERATIONS(CLASS_NAME, T, 4); \
INSTANTIATE_SPARSE_MATRIX_DUNE_OPERATIONS(CLASS_NAME, T, 5); \
INSTANTIATE_SPARSE_MATRIX_DUNE_OPERATIONS(CLASS_NAME, T, 6)
INSTANTIATE_SPARSE_MATRIX_DUNE_OPERATIONS(CLASS_NAME, T, 6); \
INSTANTIATE_SPARSE_MATRIX_DUNE_OPERATIONS(CLASS_NAME, T, 7);
} // namespace Opm::gpuistl::detail
@@ -747,12 +747,14 @@ INSTANTIATE_KERNEL_WRAPPERS(float, 3);
INSTANTIATE_KERNEL_WRAPPERS(float, 4);
INSTANTIATE_KERNEL_WRAPPERS(float, 5);
INSTANTIATE_KERNEL_WRAPPERS(float, 6);
INSTANTIATE_KERNEL_WRAPPERS(float, 7);
INSTANTIATE_KERNEL_WRAPPERS(double, 1);
INSTANTIATE_KERNEL_WRAPPERS(double, 2);
INSTANTIATE_KERNEL_WRAPPERS(double, 3);
INSTANTIATE_KERNEL_WRAPPERS(double, 4);
INSTANTIATE_KERNEL_WRAPPERS(double, 5);
INSTANTIATE_KERNEL_WRAPPERS(double, 6);
INSTANTIATE_KERNEL_WRAPPERS(double, 7);
#define INSTANTIATE_SOLVE_LEVEL_SET_SPLIT(blocksize, LinearSolverScalar, MatrixScalar, DiagonalScalar) \
template void solveUpperLevelSetSplit<blocksize, LinearSolverScalar, MatrixScalar, DiagonalScalar>( \
@@ -785,5 +787,6 @@ INSTANTIATE_SOLVE_LEVEL_SET_SPLIT_ALL(3);
INSTANTIATE_SOLVE_LEVEL_SET_SPLIT_ALL(4);
INSTANTIATE_SOLVE_LEVEL_SET_SPLIT_ALL(5);
INSTANTIATE_SOLVE_LEVEL_SET_SPLIT_ALL(6);
INSTANTIATE_SOLVE_LEVEL_SET_SPLIT_ALL(7);
} // namespace Opm::gpuistl::detail::DILU
@@ -512,7 +512,8 @@ LUFactorizationSplit(InputScalar* srcReorderedLowerMat,
INSTANTIATE_KERNEL_WRAPPERS(T, 3); \
INSTANTIATE_KERNEL_WRAPPERS(T, 4); \
INSTANTIATE_KERNEL_WRAPPERS(T, 5); \
INSTANTIATE_KERNEL_WRAPPERS(T, 6);
INSTANTIATE_KERNEL_WRAPPERS(T, 6); \
INSTANTIATE_KERNEL_WRAPPERS(T, 7);
INSTANTIATE_BLOCK_SIZED_KERNEL_WRAPPERS(float)
INSTANTIATE_BLOCK_SIZED_KERNEL_WRAPPERS(double)
@@ -554,4 +555,5 @@ INSTANTIATE_MIXED_PRECISION_KERNEL_WRAPPERS(3);
INSTANTIATE_MIXED_PRECISION_KERNEL_WRAPPERS(4);
INSTANTIATE_MIXED_PRECISION_KERNEL_WRAPPERS(5);
INSTANTIATE_MIXED_PRECISION_KERNEL_WRAPPERS(6);
INSTANTIATE_MIXED_PRECISION_KERNEL_WRAPPERS(7);
} // namespace Opm::gpuistl::detail::ILU0
@@ -78,11 +78,13 @@ INSTANTIATE_KERNEL_WRAPPERS(float, 3);
INSTANTIATE_KERNEL_WRAPPERS(float, 4);
INSTANTIATE_KERNEL_WRAPPERS(float, 5);
INSTANTIATE_KERNEL_WRAPPERS(float, 6);
INSTANTIATE_KERNEL_WRAPPERS(float, 7);
INSTANTIATE_KERNEL_WRAPPERS(double, 1);
INSTANTIATE_KERNEL_WRAPPERS(double, 2);
INSTANTIATE_KERNEL_WRAPPERS(double, 3);
INSTANTIATE_KERNEL_WRAPPERS(double, 4);
INSTANTIATE_KERNEL_WRAPPERS(double, 5);
INSTANTIATE_KERNEL_WRAPPERS(double, 6);
INSTANTIATE_KERNEL_WRAPPERS(double, 7);
} // namespace Opm::gpuistl::detail::JAC