mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Bug fix: remove dep rocm & cuda on opencl for blockJacobi ILU
This commit is contained in:
parent
a7ee48c2d5
commit
0fcad4b0fc
@ -89,12 +89,12 @@ struct EdgeWeightsMethod {
|
|||||||
using type = UndefinedProperty;
|
using type = UndefinedProperty;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if HAVE_OPENCL || HAVE_ROCSPARSE
|
#if HAVE_OPENCL || HAVE_ROCSPARSE || HAVE_CUDA
|
||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
struct NumJacobiBlocks {
|
struct NumJacobiBlocks {
|
||||||
using type = UndefinedProperty;
|
using type = UndefinedProperty;
|
||||||
};
|
};
|
||||||
#endif // HAVE_OPENCL || HAVE_ROCSPARSE
|
#endif
|
||||||
|
|
||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
struct OwnerCellsFirst {
|
struct OwnerCellsFirst {
|
||||||
@ -156,12 +156,12 @@ struct EdgeWeightsMethod<TypeTag, TTag::FlowBaseVanguard> {
|
|||||||
static constexpr int value = 1;
|
static constexpr int value = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if HAVE_OPENCL || HAVE_ROCSPARSE
|
#if HAVE_OPENCL || HAVE_ROCSPARSE || HAVE_CUDA
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct NumJacobiBlocks<TypeTag, TTag::FlowBaseVanguard> {
|
struct NumJacobiBlocks<TypeTag, TTag::FlowBaseVanguard> {
|
||||||
static constexpr int value = 0;
|
static constexpr int value = 0;
|
||||||
};
|
};
|
||||||
#endif // HAVE_OPENCL || HAVE_ROCSPARSE
|
#endif
|
||||||
|
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct OwnerCellsFirst<TypeTag, TTag::FlowBaseVanguard> {
|
struct OwnerCellsFirst<TypeTag, TTag::FlowBaseVanguard> {
|
||||||
@ -256,7 +256,7 @@ public:
|
|||||||
EWOMS_REGISTER_PARAM(TypeTag, int, EdgeWeightsMethod,
|
EWOMS_REGISTER_PARAM(TypeTag, int, EdgeWeightsMethod,
|
||||||
"Choose edge-weighing strategy: 0=uniform, 1=trans, 2=log(trans).");
|
"Choose edge-weighing strategy: 0=uniform, 1=trans, 2=log(trans).");
|
||||||
|
|
||||||
#if HAVE_OPENCL || HAVE_ROCSPARSE
|
#if HAVE_OPENCL || HAVE_ROCSPARSE || HAVE_CUDA
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, int, NumJacobiBlocks,
|
EWOMS_REGISTER_PARAM(TypeTag, int, NumJacobiBlocks,
|
||||||
"Number of blocks to be created for the Block-Jacobi preconditioner.");
|
"Number of blocks to be created for the Block-Jacobi preconditioner.");
|
||||||
#endif
|
#endif
|
||||||
@ -302,7 +302,7 @@ public:
|
|||||||
fileName_ = EWOMS_GET_PARAM(TypeTag, std::string, EclDeckFileName);
|
fileName_ = EWOMS_GET_PARAM(TypeTag, std::string, EclDeckFileName);
|
||||||
edgeWeightsMethod_ = Dune::EdgeWeightMethod(EWOMS_GET_PARAM(TypeTag, int, EdgeWeightsMethod));
|
edgeWeightsMethod_ = Dune::EdgeWeightMethod(EWOMS_GET_PARAM(TypeTag, int, EdgeWeightsMethod));
|
||||||
|
|
||||||
#if HAVE_OPENCL || HAVE_ROCSPARSE
|
#if HAVE_OPENCL || HAVE_ROCSPARSE || HAVE_CUDA
|
||||||
numJacobiBlocks_ = EWOMS_GET_PARAM(TypeTag, int, NumJacobiBlocks);
|
numJacobiBlocks_ = EWOMS_GET_PARAM(TypeTag, int, NumJacobiBlocks);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
int numJacobiBlocks() const
|
int numJacobiBlocks() const
|
||||||
{
|
{
|
||||||
#if HAVE_OPENCL || HAVE_ROCSPARSE
|
#if HAVE_OPENCL || HAVE_ROCSPARSE || HAVE_CUDA
|
||||||
return numJacobiBlocks_;
|
return numJacobiBlocks_;
|
||||||
#else
|
#else
|
||||||
return 0;
|
return 0;
|
||||||
@ -285,9 +285,9 @@ protected:
|
|||||||
std::string fileName_;
|
std::string fileName_;
|
||||||
Dune::EdgeWeightMethod edgeWeightsMethod_;
|
Dune::EdgeWeightMethod edgeWeightsMethod_;
|
||||||
|
|
||||||
#if HAVE_OPENCL || HAVE_ROCSPARSE
|
#if HAVE_OPENCL || HAVE_ROCSPARSE || HAVE_CUDA
|
||||||
int numJacobiBlocks_{0};
|
int numJacobiBlocks_{0};
|
||||||
#endif // HAVE_OPENCL || HAVE_ROCSPARSE
|
#endif
|
||||||
|
|
||||||
bool ownersFirst_;
|
bool ownersFirst_;
|
||||||
#if HAVE_MPI
|
#if HAVE_MPI
|
||||||
|
@ -206,14 +206,14 @@ doLoadBalance_(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
|||||||
// first cell of a well (e.g. for pressure). Hence this is now
|
// first cell of a well (e.g. for pressure). Hence this is now
|
||||||
// skipped. Rank 0 had everything even before.
|
// skipped. Rank 0 had everything even before.
|
||||||
|
|
||||||
#if HAVE_OPENCL
|
#if HAVE_OPENCL || HAVE_ROCSPARSE || HAVE_CUDA
|
||||||
if (partitionJacobiBlocks) {
|
if (partitionJacobiBlocks) {
|
||||||
this->cell_part_ = this->grid_->
|
this->cell_part_ = this->grid_->
|
||||||
zoltanPartitionWithoutScatter(&wells, faceTrans.data(),
|
zoltanPartitionWithoutScatter(&wells, faceTrans.data(),
|
||||||
numJacobiBlocks,
|
numJacobiBlocks,
|
||||||
zoltanImbalanceTol);
|
zoltanImbalanceTol);
|
||||||
}
|
}
|
||||||
#endif // HAVE_OPENCL
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ public:
|
|||||||
ParentType::prepare(M,b);
|
ParentType::prepare(M,b);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_OPENCL
|
#if HAVE_OPENCL || HAVE_ROCSPARSE || HAVE_CUDA
|
||||||
// update matrix entries for solvers.
|
// update matrix entries for solvers.
|
||||||
if (firstcall && bdaBridge_) {
|
if (firstcall && bdaBridge_) {
|
||||||
// model will not change the matrix object. Hence simply store a pointer
|
// model will not change the matrix object. Hence simply store a pointer
|
||||||
|
Loading…
Reference in New Issue
Block a user