mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-25 10:40:21 -06:00
Merge pull request #2612 from blattms/fix-flexible-parallel-verbosity
Make only rank zero honor verbosity in flexible solvers.
This commit is contained in:
commit
df58d44f70
@ -143,11 +143,11 @@ private:
|
||||
scalarproduct_ = std::make_shared<Dune::SeqScalarProduct<VectorType>>();
|
||||
}
|
||||
|
||||
void initSolver(const boost::property_tree::ptree& prm)
|
||||
void initSolver(const boost::property_tree::ptree& prm, bool isMaster)
|
||||
{
|
||||
const double tol = prm.get<double>("tol", 1e-2);
|
||||
const int maxiter = prm.get<int>("maxiter", 200);
|
||||
const int verbosity = prm.get<int>("verbosity", 0);
|
||||
const int verbosity = isMaster? prm.get<int>("verbosity", 0) : 0;
|
||||
const std::string solver_type = prm.get<std::string>("solver", "bicgstab");
|
||||
if (solver_type == "bicgstab") {
|
||||
linsolver_.reset(new Dune::BiCGSTABSolver<VectorType>(*linearoperator_,
|
||||
@ -190,7 +190,7 @@ private:
|
||||
const std::function<VectorTypeT()> weightsCalculator, const Comm& comm)
|
||||
{
|
||||
initOpPrecSp(matrix, prm, weightsCalculator, comm);
|
||||
initSolver(prm);
|
||||
initSolver(prm, comm.communicator().rank()==0);
|
||||
}
|
||||
|
||||
std::shared_ptr<AbstractOperatorType> linearoperator_;
|
||||
|
Loading…
Reference in New Issue
Block a user