Skip to content

MueLu: Missing output when proc 0 drops out

James Willenbring requested to merge cgcgcg:rebalancingOutput into develop

Created by: cgcgcg

@trilinos/muelu

Description

MueLu is handling which messages get printed on which rank itself, in MueLu_VerboseObject. There, we set the default output stream of the underlying Teuchos object to a staticly defined stream, and set it to output on all ranks. However, in MueLu_HierarchyManager we take that stream and set it to output on rank 0 only. Teuchos states that the behavior of calling setOutputToRootOnly more than once is undefined. What happens is that all but rank 0 irreversibly replace their streams with blackhole streams. This means that all MueLu objects everywhere except on rank 0 do not print anymore. This can also happen when setOutputToRootOnly is called from somewhere else on the Teuchos default stream.

With the changes in this PR, we do not set the output stream used by MueLu to be the default Teuchos output stream in order to that somewhere else setOutputToRootOnly is called on it.

The change was tested by running

mpirun -np 2 ./MueLu_Driver.exe --matrixType=Laplace3D --xml=scaling.xml --nx=34 --ny=34 --nz=34 --rebuild=1 --solver=none --notimings

Related Issues

Merge request reports