mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
add some timing blocks
This commit is contained in:
parent
57d846f563
commit
90821b5a45
@ -27,6 +27,8 @@
|
||||
#ifndef EWOMS_ECL_CP_GRID_VANGUARD_HH
|
||||
#define EWOMS_ECL_CP_GRID_VANGUARD_HH
|
||||
|
||||
#include <opm/common/TimingMacros.hpp>
|
||||
|
||||
#include <opm/models/common/multiphasebaseproperties.hh>
|
||||
|
||||
#include "eclbasevanguard.hh"
|
||||
@ -182,6 +184,7 @@ protected:
|
||||
|
||||
void allocTrans() override
|
||||
{
|
||||
OPM_TIMEBLOCK(allocateTrans);
|
||||
globalTrans_.reset(new TransmissibilityType(this->eclState(),
|
||||
this->gridView(),
|
||||
this->cartesianIndexMapper(),
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include <opm/input/eclipse/Schedule/Schedule.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Well/Well.hpp>
|
||||
|
||||
#include <opm/common/TimingMacros.hpp>
|
||||
#include <opm/common/utility/ActiveGridCells.hpp>
|
||||
|
||||
#include <dune/grid/common/mcmgmapper.hh>
|
||||
@ -125,9 +126,13 @@ doLoadBalance_(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
auto loadBalancerSet = static_cast<int>(externalLoadBalancer.has_value());
|
||||
this->grid_->comm().broadcast(&loadBalancerSet, 1, 0);
|
||||
|
||||
const auto faceTrans = ((loadBalancerSet == 0) || partitionJacobiBlocks)
|
||||
? this->extractFaceTrans(gridView)
|
||||
: std::vector<double>{};
|
||||
std::vector<double> faceTrans;
|
||||
{
|
||||
OPM_TIMEBLOCK(extractTrans);
|
||||
if (loadBalancerSet == 0 || partitionJacobiBlocks) {
|
||||
faceTrans = this->extractFaceTrans(gridView);
|
||||
}
|
||||
}
|
||||
|
||||
const auto wells = ((mpiSize > 1) || partitionJacobiBlocks)
|
||||
? schedule.getWellsatEnd()
|
||||
@ -162,6 +167,7 @@ doLoadBalance_(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
template<class ElementMapper, class GridView, class Scalar>
|
||||
void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::distributeFieldProps_(EclipseState& eclState1)
|
||||
{
|
||||
OPM_TIMEBLOCK(distributeFProps);
|
||||
const auto mpiSize = this->grid_->comm().size();
|
||||
|
||||
if (mpiSize == 1) {
|
||||
@ -265,6 +271,7 @@ distributeGrid(const Dune::EdgeWeightMethod edgeWeightsMethod,
|
||||
ParallelEclipseState* eclState,
|
||||
EclGenericVanguard::ParallelWellStruct& parallelWells)
|
||||
{
|
||||
OPM_TIMEBLOCK(gridDistribute);
|
||||
const auto isIORank = this->grid_->comm().rank() == 0;
|
||||
|
||||
const auto* eclGrid = isIORank
|
||||
@ -316,7 +323,7 @@ void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::doCreateGrids_(Ecl
|
||||
global_porv = eclState.fieldProps().porv(true);
|
||||
OpmLog::info("\nProcessing grid");
|
||||
}
|
||||
|
||||
OPM_TIMEBLOCK(createGrids);
|
||||
#if HAVE_MPI
|
||||
this->grid_ = std::make_unique<Dune::CpGrid>(EclGenericVanguard::comm());
|
||||
#else
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <opm/simulators/utils/readDeck.hpp>
|
||||
|
||||
#include <opm/common/ErrorMacros.hpp>
|
||||
#include <opm/common/TimingMacros.hpp>
|
||||
#include <opm/common/OpmLog/EclipsePRTLog.hpp>
|
||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||
#include <opm/common/utility/OpmInputError.hpp>
|
||||
@ -240,6 +241,7 @@ namespace {
|
||||
const std::optional<int>& outputInterval,
|
||||
Opm::ErrorGuard& errorGuard)
|
||||
{
|
||||
OPM_TIMEBLOCK(readDeck);
|
||||
if (((schedule == nullptr) || (summaryConfig == nullptr)) &&
|
||||
(parseContext == nullptr))
|
||||
{
|
||||
@ -253,6 +255,7 @@ namespace {
|
||||
*parseContext, treatCriticalAsNonCritical, errorGuard);
|
||||
|
||||
if (eclipseState == nullptr) {
|
||||
OPM_TIMEBLOCK(createEclState);
|
||||
eclipseState = createEclipseState(comm, deck);
|
||||
}
|
||||
|
||||
@ -540,6 +543,7 @@ void Opm::readDeck(Opm::Parallel::Communication comm,
|
||||
parseSuccess = comm.min(parseSuccess);
|
||||
try {
|
||||
if (parseSuccess) {
|
||||
OPM_TIMEBLOCK(eclBcast);
|
||||
eclStateBroadcast(comm, *eclipseState, *schedule,
|
||||
*summaryConfig, *udqState, *actionState, *wtestState);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user