mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add output of linear system sizes to DBG file.
This commit is contained in:
parent
8c6a92356f
commit
30a9e02998
@ -31,6 +31,8 @@
|
|||||||
#include <opm/simulators/linalg/ParallelIstlInformation.hpp>
|
#include <opm/simulators/linalg/ParallelIstlInformation.hpp>
|
||||||
#include <opm/simulators/utils/ParallelCommunication.hpp>
|
#include <opm/simulators/utils/ParallelCommunication.hpp>
|
||||||
|
|
||||||
|
#include <fmt/format.h>
|
||||||
|
|
||||||
#if COMPILE_BDA_BRIDGE
|
#if COMPILE_BDA_BRIDGE
|
||||||
#include <opm/simulators/linalg/bda/BdaBridge.hpp>
|
#include <opm/simulators/linalg/bda/BdaBridge.hpp>
|
||||||
#include <opm/simulators/linalg/bda/WellContributions.hpp>
|
#include <opm/simulators/linalg/bda/WellContributions.hpp>
|
||||||
@ -123,6 +125,24 @@ void FlexibleSolverInfo<Matrix,Vector,Comm>::create(const Matrix& matrix,
|
|||||||
[[maybe_unused]] Comm& comm)
|
[[maybe_unused]] Comm& comm)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
// Write sizes of linear systems on all ranks to debug log.
|
||||||
|
{
|
||||||
|
auto basic_comm = comm.communicator();
|
||||||
|
std::ostringstream os;
|
||||||
|
os << "Linear system ";
|
||||||
|
if (basic_comm.size() > 1) {
|
||||||
|
os << fmt::format("on MPI rank: {} ", basic_comm.rank());
|
||||||
|
}
|
||||||
|
os << fmt::format("blocksize: {} size: {:7d} block nonzeroes: {:9d}",
|
||||||
|
Matrix::block_type::rows, matrix.N(), matrix.nonzeroes());
|
||||||
|
DeferredLogger local_logger;
|
||||||
|
local_logger.debug(os.str());
|
||||||
|
auto global_logger = gatherDeferredLogger(local_logger, basic_comm);
|
||||||
|
if (basic_comm.rank() == 0) {
|
||||||
|
global_logger.logMessages();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::function<Vector()> weightsCalculator =
|
std::function<Vector()> weightsCalculator =
|
||||||
getWeightsCalculator<Vector>(prm, matrix, pressureIndex, trueFunc);
|
getWeightsCalculator<Vector>(prm, matrix, pressureIndex, trueFunc);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user