precice / openfoam-adapter

OpenFOAM-preCICE adapter
https://precice.org/adapter-openfoam-overview.html
GNU General Public License v3.0
135 stars 83 forks source link

Too verbose debug output #89

Open MakisH opened 5 years ago

MakisH commented 5 years ago

@uekerman observed that the output of the OpenFOAM adapter is too verbose in general, reducing readability.

We provide a preprocessor flag ADAPTER_DEBUG_MODE to toggle the verbosity, with the goal to improve performance.

In "release" mode, we get the following kind of output (click!):

``` Starting time loop ---[preciceAdapter] The preciceAdapter was loaded. ---[preciceAdapter] Reading the adapter's YAML configuration file /home/makish/adapter/tutorials/CHT/flow-over-plate/buoyantPimpleFoam-laplacianFoam/Fluid/precice-adapter-config.yml... (0) 18:49:18 [impl::SolverInterfaceImpl]:101 in configure: This is preCICE version 1.5.1 (0) 18:49:18 [impl::SolverInterfaceImpl]:102 in configure: Configuring preCICE with configuration: "precice-config.xml" (0) 18:49:18 [impl::SolverInterfaceImpl]:145 in configure: Run in coupling mode (0) 18:49:18 [impl::SolverInterfaceImpl]:214 in initialize: Setting up master communication to coupling partner/s (0) 18:49:18 [impl::SolverInterfaceImpl]:219 in initialize: Masters are connected (0) 18:49:18 [partition::ProvidedPartition]:36 in communicate: Gather mesh Fluid-Mesh (0) 18:49:18 [partition::ProvidedPartition]:62 in communicate: Send global mesh Fluid-Mesh (0) 18:49:18 [partition::ProvidedPartition]:79 in compute: Compute partition for mesh Fluid-Mesh (0) 18:49:18 [impl::SolverInterfaceImpl]:223 in initialize: Setting up slaves communication to coupling partner/s (0) 18:49:18 [impl::SolverInterfaceImpl]:228 in initialize: Slaves are connected (0) 18:49:18 [impl::SolverInterfaceImpl]:254 in initialize: it 1 of 200 | dt# 1 | t 0 of 1 | dt 0.01 | max dt 0.01 | ongoing yes | dt complete no | write-iteration-checkpoint | (0) 18:49:18 [cplschemes::SerialCouplingSchemes]:109 in initializeData: initializeData is skipped since no data has to be initialized ---[preciceAdapter] preCICE was configured and initialized ---[preciceAdapter] Setting the solver's endTime to infinity to prevent early exits. Only preCICE will control the simulation's endTime. Any functionObject's end() method will be triggered by the adapter. Yo u may disable this behavior in the adapter's configuration. ---[preciceAdapter] Setting the solver's endTime to infinity to prevent early exits. Only preCICE will control the simulation's endTime. Any functionObject's end() method will be triggered by the adapter. Yo u may disable this behavior in the adapter's configuration. Courant Number mean: 0.0837143 max: 0.403668 Time = 0.01 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 PIMPLE: iteration 1 DILUPBiCGStab: Solving for Ux, Initial residual = 1, Final residual = 1.17224e-07, No Iterations 2 DILUPBiCGStab: Solving for Uy, Initial residual = 1, Final residual = 9.27306e-07, No Iterations 2 DILUPBiCGStab: Solving for h, Initial residual = 1, Final residual = 8.83693e-07, No Iterations 15 DICPCG: Solving for p_rgh, Initial residual = 0.826826, Final residual = 0.00777972, No Iterations 87 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 6.94502e-05, global = -1.44705e-07, cumulative = -1.44705e-07 DICPCG: Solving for p_rgh, Initial residual = 0.311219, Final residual = 9.37315e-09, No Iterations 215 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 7.66604e-10, global = -6.21739e-10, cumulative = -1.45326e-07 ExecutionTime = 0.22 s ClockTime = 0 s (0) 18:49:18 [impl::SolverInterfaceImpl]:378 in advance: it 2 of 200 | dt# 1 | t 0 of 1 | dt 0.01 | max dt 0.01 | ongoing yes | dt complete no | read-iteration-checkpoint | Courant Number mean: 0.0837143 max: 0.403668 Time = 0.01 ```

In "debug" mode, we get the following kind of (longer) output (click!):

``` Starting time loop ---[preciceAdapter] The preciceAdapter was loaded. Registered objects: 35 ( solutionControl points neighbour thermo:mu MRFProperties thermo:psi K ghf h faces U rho radiationProperties turbulenceProperties fvSchemes fvOptions faceZones fvSolution cumulativeContErr p_rgh thermophysicalProperties dpdt phi owner gh data cellZones boundary p T p_0 hRef thermo:rho pointZones thermo:alpha ) ---[preciceAdapter] Reading the adapter's YAML configuration file /home/makish/adapter/tutorials/CHT/flow-over-plate/buoyantPimpleFoam-laplacianFoam/Fluid/precice-adapter-config.yml... ---[preciceAdapter] [DEBUG] Checking the adapter's YAML configuration file... ---[preciceAdapter] [DEBUG] participant : Fluid ---[preciceAdapter] [DEBUG] precice-config-file : precice-config.xml ---[preciceAdapter] [DEBUG] interfaces : ---[preciceAdapter] [DEBUG] - mesh : Fluid-Mesh ---[preciceAdapter] [DEBUG] locations : faceCenters ---[preciceAdapter] [DEBUG] Provide mesh connectivity : 0 ---[preciceAdapter] [DEBUG] patches : ---[preciceAdapter] [DEBUG] interface ---[preciceAdapter] [DEBUG] write-data : ---[preciceAdapter] [DEBUG] Temperature ---[preciceAdapter] [DEBUG] read-data : ---[preciceAdapter] [DEBUG] Heat-Flux ---[preciceAdapter] [DEBUG] subcycling : 1 ---[preciceAdapter] [DEBUG] prevent early exit : 1 ---[preciceAdapter] [DEBUG] evaluate boundaries : 1 ---[preciceAdapter] [DEBUG] disable checkpointing : 0 ---[preciceAdapter] [DEBUG] CHT module enabled : 1 ---[preciceAdapter] [DEBUG] FSI module enabled : 0 ---[preciceAdapter] [DEBUG] Configuring the CHT module... ---[preciceAdapter] [DEBUG] user-defined solver type : none ---[preciceAdapter] [DEBUG] temperature field name : T ---[preciceAdapter] [DEBUG] transportProperties name : transportProperties ---[preciceAdapter] [DEBUG] conductivity name for basic solvers : k ---[preciceAdapter] [DEBUG] density name for incompressible solvers : rho ---[preciceAdapter] [DEBUG] heat capacity name for incompressible solvers : Cp ---[preciceAdapter] [DEBUG] Prandtl number name for incompressible solvers : Pr ---[preciceAdapter] [DEBUG] Turbulent thermal diffusivity field name for incompressible solvers : alphat ---[preciceAdapter] [DEBUG] Determining the solver type... ---[preciceAdapter] [DEBUG] Did not find the transportProperties dictionary. ---[preciceAdapter] [DEBUG] Found the turbulenceProperties dictionary. ---[preciceAdapter] [DEBUG] Found the thermophysicalProperties dictionary. ---[preciceAdapter] [DEBUG] This is a compressible flow solver, as turbulence and thermophysical properties are provided. ---[preciceAdapter] [DEBUG] Checking the timestep type (fixed vs adjustable)... ---[preciceAdapter] [DEBUG] Timestep type: fixed. ---[preciceAdapter] [DEBUG] Creating the preCICE solver interface... ---[preciceAdapter] [DEBUG] Number of processes: 1 ---[preciceAdapter] [DEBUG] MPI rank: 0 ---[preciceAdapter] [DEBUG] preCICE solver interface was created. ---[preciceAdapter] [DEBUG] Configuring preCICE... (0) 18:56:17 [impl::SolverInterfaceImpl]:101 in configure: This is preCICE version 1.5.1 (0) 18:56:17 [impl::SolverInterfaceImpl]:102 in configure: Configuring preCICE with configuration: "precice-config.xml" (0) 18:56:17 [impl::SolverInterfaceImpl]:145 in configure: Run in coupling mode ---[preciceAdapter] [DEBUG] preCICE was configured. ---[preciceAdapter] [DEBUG] Creating interfaces... ---[preciceAdapter] [DEBUG] Number of face centres: 161 ---[preciceAdapter] [DEBUG] Interface created on mesh Fluid-Mesh ---[preciceAdapter] [DEBUG] Adding coupling data writers... ---[preciceAdapter] [DEBUG] Added writer: Temperature. ---[preciceAdapter] [DEBUG] Adding coupling data readers... ---[preciceAdapter] [DEBUG] Constructed KappaEff_Compressible. ---[preciceAdapter] [DEBUG] Added reader: Heat Flux for compressible solvers. ---[preciceAdapter] [DEBUG] Initalizing the preCICE solver interface... (0) 18:56:17 [impl::SolverInterfaceImpl]:214 in initialize: Setting up master communication to coupling partner/s (0) 18:56:17 [impl::SolverInterfaceImpl]:219 in initialize: Masters are connected (0) 18:56:17 [partition::ProvidedPartition]:36 in communicate: Gather mesh Fluid-Mesh (0) 18:56:17 [partition::ProvidedPartition]:62 in communicate: Send global mesh Fluid-Mesh (0) 18:56:17 [partition::ProvidedPartition]:79 in compute: Compute partition for mesh Fluid-Mesh (0) 18:56:17 [impl::SolverInterfaceImpl]:223 in initialize: Setting up slaves communication to coupling partner/s (0) 18:56:17 [impl::SolverInterfaceImpl]:228 in initialize: Slaves are connected (0) 18:56:17 [impl::SolverInterfaceImpl]:254 in initialize: it 1 of 200 | dt# 1 | t 0 of 1 | dt 0.01 | max dt 0.01 | ongoing yes | dt complete no | write-iteration-checkpoint | ---[preciceAdapter] [DEBUG] Initializing preCICE data... (0) 18:56:17 [cplschemes::SerialCouplingSchemes]:109 in initializeData: initializeData is skipped since no data has to be initialized ---[preciceAdapter] preCICE was configured and initialized ---[preciceAdapter] [DEBUG] Reading coupling data... ---[preciceAdapter] [DEBUG] Creating a list of checkpointed fields... ---[preciceAdapter] [DEBUG] Collecting objects of type volScalarField... ---[preciceAdapter] [DEBUG] Will be checkpointing dpdt ---[preciceAdapter] [DEBUG] Will be checkpointing gh ---[preciceAdapter] [DEBUG] Will be checkpointing thermo:mu ---[preciceAdapter] [DEBUG] Will be checkpointing thermo:psi ---[preciceAdapter] [DEBUG] Will be checkpointing K ---[preciceAdapter] [DEBUG] Will be checkpointing p ---[preciceAdapter] [DEBUG] Will be checkpointing T ---[preciceAdapter] [DEBUG] Will be checkpointing h ---[preciceAdapter] [DEBUG] Will be checkpointing p_0 ---[preciceAdapter] [DEBUG] Will be checkpointing rho ---[preciceAdapter] [DEBUG] Will be checkpointing p_rgh ---[preciceAdapter] [DEBUG] Will be checkpointing thermo:rho ---[preciceAdapter] [DEBUG] Will be checkpointing thermo:alpha ---[preciceAdapter] [DEBUG] Collecting objects of type volVectorField... ---[preciceAdapter] [DEBUG] Will be checkpointing U ---[preciceAdapter] [DEBUG] Collecting objects of type surfaceScalarField... ---[preciceAdapter] [DEBUG] Will be checkpointing phi ---[preciceAdapter] [DEBUG] Will be checkpointing ghf ---[preciceAdapter] [DEBUG] Collecting objects of type surfaceVectorField... ---[preciceAdapter] [DEBUG] Collecting objects of type pointScalarField... ---[preciceAdapter] [DEBUG] Collecting objects of type pointVectorField... ---[preciceAdapter] [DEBUG] Collecting objects of type volTensorField... ---[preciceAdapter] [DEBUG] Collecting objects of type surfaceTensorField... ---[preciceAdapter] [DEBUG] Collecting objects of type pointTensorField... ---[preciceAdapter] [DEBUG] Collecting objects of type volSymmTensorField... ---[preciceAdapter] [DEBUG] Writing a checkpoint... ---[preciceAdapter] [DEBUG] Stored time value t = 0.000000 ---[preciceAdapter] [DEBUG] Checkpoint for time t = 0.000000 was stored. ---[preciceAdapter] [DEBUG] Adjusting the solver's timestep... ---[preciceAdapter] [DEBUG] The solver's timestep is the same as the coupling timestep. ---[preciceAdapter] Setting the solver's endTime to infinity to prevent early exits. Only preCICE will control the simulation's endTime. Any functionObject's end() method will be triggered by the adapter. You may disable this behavior in the adapter's configuration. ---[preciceAdapter] Setting the solver's endTime to infinity to prevent early exits. Only preCICE will control the simulation's endTime. Any functionObject's end() method will be triggered by the adapter. You may disable this behavior in the adapter's configuration. Courant Number mean: 0.0837143 max: 0.403668 Time = 0.01 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 PIMPLE: iteration 1 DILUPBiCGStab: Solving for Ux, Initial residual = 1, Final residual = 1.17224e-07, No Iterations 2 DILUPBiCGStab: Solving for Uy, Initial residual = 1, Final residual = 9.27306e-07, No Iterations 2 DILUPBiCGStab: Solving for h, Initial residual = 1, Final residual = 8.83693e-07, No Iterations 15 DICPCG: Solving for p_rgh, Initial residual = 0.826826, Final residual = 0.00777972, No Iterations 87 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 6.94502e-05, global = -1.44705e-07, cumulative = -1.44705e-07 DICPCG: Solving for p_rgh, Initial residual = 0.311219, Final residual = 9.37315e-09, No Iterations 215 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 7.66604e-10, global = -6.21739e-10, cumulative = -1.45326e-07 ExecutionTime = 0.22 s ClockTime = 0 s ---[preciceAdapter] [DEBUG] Writing coupling data... ---[preciceAdapter] [DEBUG] Advancing preCICE... (0) 18:56:17 [impl::SolverInterfaceImpl]:378 in advance: it 2 of 200 | dt# 1 | t 0 of 1 | dt 0.01 | max dt 0.01 | ongoing yes | dt complete no | read-iteration-checkpoint | ---[preciceAdapter] [DEBUG] Reading a checkpoint... ---[preciceAdapter] [DEBUG] Reloaded time value t = 0.000000 ---[preciceAdapter] [DEBUG] Evaluating the volVector boundary conditions for U ---[preciceAdapter] [DEBUG] Checkpoint was read. Time = 0.000000 ---[preciceAdapter] [DEBUG] Reading coupling data... ---[preciceAdapter] [DEBUG] Adjusting the solver's timestep... ---[preciceAdapter] [DEBUG] The solver's timestep is the same as the coupling timestep. Courant Number mean: 0.0837143 max: 0.403668 Time = 0.01 ```

Both are with filter="%Severity% > debug" in the preCICE configuration and OpenFOAM built in debug mode. Note that we also use ---[preciceAdapter] to signify the adapter's output.

Questions:

  1. What could we do to further improve the readability of the output?
  2. Could we redirect some of the output to the file? (do we want to?)
  3. Would an additional runtime verbosity switch make sense? This way, we would improve the readability, but still affect the performance.
uekerman commented 5 years ago

I think the two different verbosity levels debug and release are enough already. But a good additional feature would be the option to switch off debug statements at runtime and having this as default. That's what we do in preCICE itself, right?

Level-wise, I would move

---[preciceAdapter] Setting the solver's endTime to infinity to prevent early exits. Only preCICE will control the simulation's endTime. Any functionObject's end() method will be triggered by the adapter. You may disable this behavior in the adapter's configuration.

to debug.

In general, in the release level, we should never print statements "per rank", but always only once (compare the last statement, which is print twice in the example above).

Some cosmetics: we could use a formatting of the preCICE logging which is similar to ---[preciceAdapter], maybe ---[precice] (in the preCICE configs of the tutorials). I guess most important for the user is to distinguish OpenFOAM output from preCICE output (adapter + library).

MakisH commented 5 years ago

The duplication does not come from multiple ranks (this OpenFOAM already accounts for), but it is a real, embarrasing duplication: https://github.com/precice/openfoam-adapter/issues/98

Switching off debug output at runtime would be an additional level, as in the release we do not even compile the respective parts. The release with debug info would perform somewhere in between (less writing, but would still have some condition evaluations, which should be fine in modern processors).

Some cosmetics: we could use a formatting of the preCICE logging which is similar to ---[preciceAdapter], maybe ---[precice] (in the preCICE configs of the tutorials). I guess most important for the user is to distinguish OpenFOAM output from preCICE output (adapter + library).

Is this meant as feedback for the adapter or for preCICE? I assume that wrapping the output of preCICE would be non-trivial (but still very nice).

uekerman commented 5 years ago

Switching off debug output at runtime would be an additional level, as in the release we do not even compile the respective parts. The release with debug info would perform somewhere in between (less writing, but would still have some condition evaluations, which should be fine in modern processors).

I am not sure if we understand each other yet. What I mean is to build in debug mode and then have an option to switch debug logging on and off (where the default should be off in my opinion).

Is this meant as feedback for the adapter or for preCICE? I assume that wrapping the output of preCICE would be non-trivial (but still very nice).

No, simply an answer to ...

What could we do to further improve the readability of the output?

You can simply configure this in the preCICE config at runtime. See the second example in the wiki. This, we could do for the tutorials. But no must.

MakisH commented 5 years ago

Switching off debug output at runtime would be an additional level, as in the release we do not even compile the respective parts. The release with debug info would perform somewhere in between (less writing, but would still have some condition evaluations, which should be fine in modern processors).

I am not sure if we understand each other yet. What I mean is to build in debug mode and then have an option to switch debug logging on and off (where the default should be off in my opinion).

Then yes, this is easy and a good idea.

MakisH commented 4 years ago

So, now we have:

Running with OpenFOAM v1906 (which already is more verbose) with two MPI ranks, the adapter without the ADAPTER_DEBUG_MODE enabled, and "%Severity% >= warn" gives:

Click to reveal

``` Starting time loop ---[preciceAdapter] The preciceAdapter was loaded. ---[preciceAdapter] Reading the adapter's YAML configuration file /home/makish/git/hub/openfoam-adapter /tutorials/CHT/flow-over-plate/buoyantPimpleFoam-laplacianFoam/Fluid/processor0/../precice-adapter-conf ig.yml... [2019-11-26 11:24:50.708521] [0x00007f3ee3d58740] [trace] Entering operator() [2019-11-26 11:24:50.708578] [0x00007f3d0d3e4740] [trace] Entering operator() [2019-11-26 11:24:50.708623] [0x00007f3ee3d58740] [trace] Leaving initializeMPI [2019-11-26 11:24:50.708729] [0x00007f3d0d3e4740] [trace] Leaving initializeMPI ---[precice] This is preCICE version 1.6.1 ---[precice] Revision info: v1.6.1 ---[precice] Configuring preCICE with configuration: "precice-config.xml" ---[precice] Run in coupling mode ---[precice] Run in coupling mode ---[precice] Setting up communication to slaves ---[precice] Setting up master communication to coupling partner/s ---[precice] Setting up master communication to coupling partner/s ---[precice] Masters are connected ---[precice] Masters are connected ---[precice] Gather mesh Fluid-Mesh ---[precice] Send global mesh Fluid-Mesh ---[precice] Gather mesh Fluid-Mesh ---[precice] Send global mesh Fluid-Mesh ---[precice] Receive global mesh Solid-Mesh ---[precice] Compute partition for mesh Fluid-Mesh ---[precice] Receive global mesh Solid-Mesh ---[precice] Compute partition for mesh Fluid-Mesh ---[precice] Broadcast mesh Solid-Mesh ---[precice] Broadcast mesh Solid-Mesh ---[precice] Filter mesh Solid-Mesh by bounding-box ---[precice] Filter mesh Solid-Mesh by bounding-box ---[precice] Filter mesh Solid-Mesh by mappings ---[precice] Filter mesh Solid-Mesh by mappings ---[precice] Feedback distribution for mesh Solid-Mesh ---[precice] Feedback distribution for mesh Solid-Mesh ---[precice] Setting up slaves communication to coupling partner/s ---[precice] Setting up slaves communication to coupling partner/s ---[precice] Slaves are connected ---[precice] Slaves are connected ---[precice] it 1 of 200 | dt# 1 | t 0 of 1 | dt 0.01 | max dt 0.01 | ongoing yes | dt complete no | w rite-iteration-checkpoint | ---[precice] it 1 of 200 | dt# 1 | t 0 of 1 | dt 0.01 | max dt 0.01 | ongoing yes | dt complete no | w rite-iteration-checkpoint | ---[precice] initializeData is skipped since no data has to be initialized ---[precice] initializeData is skipped since no data has to be initialized ---[preciceAdapter] preCICE was configured and initialized ---[preciceAdapter] Setting the solver's endTime to infinity to prevent early exits. Only preCICE will control the simulation's endTime. Any functionObject's end() method will be triggered by the adapter. Y ou may disable this behavior in the adapter's configuration. Courant Number mean: 0.0837143 max: 0.403668 Time = 0.01 ```

The adapter does not show any duplicate output due to the parallel execution, only preCICE itself.

@uekerman does this help your use case? If yes, I would proceed and update also all the tutorials in the precice/tutorials repository.

uekerman commented 4 years ago

Per timestep, we still have

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
DILUPBiCGStab:  Solving for Ux, Initial residual = 0.00148809, Final residual = 1.32976e-07, No Iterations 1
DILUPBiCGStab:  Solving for Uy, Initial residual = 0.00569702, Final residual = 2.95168e-07, No Iterations 1
DILUPBiCGStab:  Solving for h, Initial residual = 0.0014191, Final residual = 6.50959e-07, No Iterations 8
DICPCG:  Solving for p_rgh, Initial residual = 0.00465212, Final residual = 3.94334e-05, No Iterations 152
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 6.70039e-10, global = -1.85169e-10, cumulative = -0.000131227
DICPCG:  Solving for p_rgh, Initial residual = 0.00128123, Final residual = 9.92411e-09, No Iterations 192
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.22552e-10, global = -6.3105e-11, cumulative = -0.000131227
ExecutionTime = 19.9 s  ClockTime = 22 s

---[preciceAdapter] [DEBUG] Writing coupling data...
---[preciceAdapter] [DEBUG] Advancing preCICE...
---[precice] it 2 of 200 | dt# 95 | t 0.94 of 1 | dt 0.01 | max dt 0.01 | ongoing yes | dt complete no | read-iteration-checkpoint |
---[preciceAdapter] [DEBUG] Reading a checkpoint...
---[preciceAdapter] [DEBUG] Reloaded time value t = 0.940000
---[preciceAdapter] [DEBUG] Evaluating the volVector boundary conditions for U
---[preciceAdapter] [DEBUG] Checkpoint was read. Time = 0.940000
---[preciceAdapter] [DEBUG] Reading coupling data...
---[preciceAdapter] [DEBUG] Adjusting the solver's timestep...
---[preciceAdapter] [DEBUG] The solver's timestep is the same as the coupling timestep.
Courant Number mean: 0.0854234 max: 0.447231
Time = 0.95

correct?

In my opinion this is still too much as default.

This I would not change, as I would then need to ask every user to rerun their simulations with Debug mode on before they re-send us their logfiles.

Well, that should not be too hard to learn. For preCICE itself, we have the same situation. Ideally debug output should be configurable at runtime and off by default. If making it configurable is not straight-forward we could try to limit the output a bit.

The adapter does not show any duplicate output due to the parallel execution, only preCICE itself.

Yes, the latter is a known issue.

MakisH commented 4 years ago

Per timestep, we still have ... correct?

No, everything marked with [DEBUG] is debug output. How did you get this?

Well, that should not be too hard to learn. For preCICE itself, we have the same situation. Ideally debug output should be configurable at runtime and off by default. If making it configurable is not straight-forward we could try to limit the output a bit.

I can also make it configurable at runtime, that's easy.

uekerman commented 4 years ago

Just discussed with @MakisH, we agree that

MakisH commented 4 years ago

It looks like this is more complicated, as the logger (adapterInfo()) is currently just a free function, not a class method.

Suggestion for later:

namespace preciceAdapter
{

class Utilities
{

public:

    static bool debugLog;

    static void adapterInfo(const std::string message, const std::string level = "debug");
};

}

then replace everywhere adapterInfo with Utilities::adapterInfo (and maybe rename to something shorter).