Merge pull request #2220 from andrthu/owners-first

[For testing] Enable "owners first" ordering. Altered SpMV, SP and ILU.
This commit is contained in:
Markus Blatt
2020-03-13 17:48:22 +01:00
committed by GitHub
6 changed files with 287 additions and 19 deletions

View File

@@ -78,6 +78,7 @@ NEW_PROP_TAG(EclOutputInterval);
NEW_PROP_TAG(IgnoreKeywords);
NEW_PROP_TAG(EnableExperiments);
NEW_PROP_TAG(EdgeWeightsMethod);
NEW_PROP_TAG(OwnerCellsFirst);
SET_STRING_PROP(EclBaseVanguard, IgnoreKeywords, "");
SET_STRING_PROP(EclBaseVanguard, EclDeckFileName, "");
@@ -86,6 +87,7 @@ SET_BOOL_PROP(EclBaseVanguard, EnableOpmRstFile, false);
SET_BOOL_PROP(EclBaseVanguard, EclStrictParsing, false);
SET_BOOL_PROP(EclBaseVanguard, SchedRestart, true);
SET_INT_PROP(EclBaseVanguard, EdgeWeightsMethod, 1);
SET_BOOL_PROP(EclBaseVanguard, OwnerCellsFirst, false);
END_PROPERTIES
@@ -133,6 +135,8 @@ public:
"When restarting: should we try to initialize wells and groups from historical SCHEDULE section.");
EWOMS_REGISTER_PARAM(TypeTag, int, EdgeWeightsMethod,
"Choose edge-weighing strategy: 0=uniform, 1=trans, 2=log(trans).");
EWOMS_REGISTER_PARAM(TypeTag, bool, OwnerCellsFirst,
"Order cells owned by rank before ghost/overlap cells.");
}
/*!
@@ -265,6 +269,7 @@ public:
std::string fileName = EWOMS_GET_PARAM(TypeTag, std::string, EclDeckFileName);
edgeWeightsMethod_ = Dune::EdgeWeightMethod(EWOMS_GET_PARAM(TypeTag, int, EdgeWeightsMethod));
ownersFirst_ = EWOMS_GET_PARAM(TypeTag, bool, OwnerCellsFirst);
// Skip processing of filename if external deck already exists.
if (!externalDeck_)
@@ -451,6 +456,13 @@ public:
*/
Dune::EdgeWeightMethod edgeWeightsMethod() const
{ return edgeWeightsMethod_; }
/*!
* \brief Parameter that decide if cells owned by rank are ordered before ghost cells.
*/
bool ownersFirst() const
{ return ownersFirst_; }
/*!
* \brief Returns the name of the case.
*
@@ -619,6 +631,7 @@ private:
Opm::SummaryConfig* eclSummaryConfig_;
Dune::EdgeWeightMethod edgeWeightsMethod_;
bool ownersFirst_;
protected:
/*! \brief The cell centroids after loadbalance was called.

View File

@@ -159,6 +159,7 @@ public:
}
Dune::EdgeWeightMethod edgeWeightsMethod = this->edgeWeightsMethod();
bool ownersFirst = this->ownersFirst();
// convert to transmissibility for faces
// TODO: grid_->numFaces() is not generic. use grid_->size(1) instead? (might
@@ -204,7 +205,7 @@ public:
PropsCentroidsDataHandle<Dune::CpGrid> handle(*grid_, eclState, eclGrid, this->centroids_,
cartesianIndexMapper());
defunctWellNames_ = std::get<1>(grid_->loadBalance(handle, edgeWeightsMethod, &wells, faceTrans.data()));
defunctWellNames_ = std::get<1>(grid_->loadBalance(handle, edgeWeightsMethod, &wells, faceTrans.data(), ownersFirst));
}
catch(const std::bad_cast& e)
{

View File

@@ -309,8 +309,9 @@ private:
// store intersection, this might be costly
const auto& intersection = *isIt;
// ignore boundary intersections for now (TODO?)
if (intersection.boundary())
continue; // ignore boundary intersections for now (TODO?)
else if (!intersection.neighbor()) //processor boundary but not domain boundary
continue;
const auto& inside = intersection.inside();