Merge pull request #2923 from blattms/fix-segfault-parallel-multflt

Fixes parallel segfault for MULTFLT
This commit is contained in:
Markus Blatt
2022-01-10 20:49:53 +01:00
committed by GitHub
3 changed files with 17 additions and 2 deletions

View File

@@ -51,6 +51,9 @@ public:
void apply_schedule_keywords(const std::vector<DeckKeyword>& keywords);
/// \brief Whether we can call methods on the manager
bool is_usable() const;
/*
The number of cells in the fields managed by this FieldPropsManager.
Initially this will correspond to the number of active cells in the grid

View File

@@ -395,8 +395,15 @@ AquiferConfig load_aquifers(const Deck& deck, const TableManager& tables, NNC& i
OpmLog::info(fmt::format("Apply transmissibility multiplier: {}", keyword.name()));
}
this->field_props.apply_schedule_keywords(keywords);
this->applyMULTXYZ();
// After loadbalancing field_props is a nullptr on all processes except
// the one with rank zero. Currently, the simulator should to take care
// about communicating the field properties. I does not seem to do that,
// though. Only the transmissibility multipliers will get broadcasted.
if (this->field_props.is_usable())
{
this->field_props.apply_schedule_keywords(keywords);
this->applyMULTXYZ();
}
}

View File

@@ -47,6 +47,11 @@ void FieldPropsManager::reset_actnum(const std::vector<int>& actnum) {
this->fp->reset_actnum(actnum);
}
bool FieldPropsManager::is_usable() const
{
return static_cast<bool>(this->fp);
}
void FieldPropsManager::apply_schedule_keywords(const std::vector<DeckKeyword>& keywords) {
this->fp->handle_schedule_keywords(keywords);
}