You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there's a bug in the current implementation in master and next, or at least behaviour that I find surprising. I've modified the monitor example to print the name of the monitor for clarity, and got this output (on next):
Custom output monitor fast, time = 0.000000e+00, step -1 of 20
Custom output monitor default, time = 0.000000e+00, step -1 of 10
Sim Time | RHS evals | Wall Time | Calc Inv Comm I/O SOLVER
0.000e+00 1 4.33e-02 -1.3 0.0 1.6 147.2 -47.4
| Step 1 of 10. Elapsed 0:00:00.0 ETA 0:00:00.3
Custom output monitor fast, time = 1.000000e+00, step 0 of 10
Custom output monitor fast, time = 2.000000e+00, step 1 of 10
Custom output monitor default, time = 2.000000e+00, step 0 of 5
2.000e+00 92 6.33e-02 5.8 0.0 0.0 50.6 43.6
/ Step 1 of 5. Elapsed 0:00:00.1 ETA 0:00:00.1
Custom output monitor fast, time = 3.000000e+00, step 2 of 10
Custom output monitor fast, time = 4.000000e+00, step 3 of 10
Custom output monitor default, time = 4.000000e+00, step 1 of 5
4.000e+00 41 5.49e-02 4.1 0.0 0.0 45.3 50.7
- Step 2 of 5. Elapsed 0:00:00.2 ETA 0:00:00.1
Custom output monitor fast, time = 5.000000e+00, step 4 of 10
Custom output monitor fast, time = 6.000000e+00, step 5 of 10
Custom output monitor default, time = 6.000000e+00, step 2 of 5
6.000e+00 44 5.48e-02 3.5 0.0 0.0 46.1 50.3
\ Step 3 of 5. Elapsed 0:00:00.2 ETA 0:00:00.0
Custom output monitor fast, time = 7.000000e+00, step 6 of 10
Custom output monitor fast, time = 8.000000e+00, step 7 of 10
Custom output monitor default, time = 8.000000e+00, step 3 of 5
8.000e+00 41 5.24e-02 3.7 0.0 0.0 45.3 51.0
| Step 4 of 5. Elapsed 0:00:00.3 ETA 0:00:-0.1
Custom output monitor fast, time = 9.000000e+00, step 8 of 10
Custom output monitor fast, time = 1.000000e+01, step 9 of 10
Custom output monitor default, time = 1.000000e+01, step 4 of 5
1.000e+01 44 5.80e-02 4.2 0.0 0.0 42.8 53.0
/ Step 5 of 5. Elapsed 0:00:00.3 ETA 0:00:-0.1
This is with nout = 10 and timestep = 1. Although the simulation runs to sim time nout * timestep and the relative frequencies of the monitors are all correct, notice that there are only 5 output steps that happen with timestep = 2.
I think the fix is:
modified src/solver/solver.cxx
@@ -498,6 +498,9 @@ int Solver::solve(int nout, BoutReal timestep) {
finaliseMonitorPeriods(nout, timestep);
+ number_output_steps = nout;+ output_timestep = timestep;+
output_progress.write(
_("Solver running for {:d} outputs with output timestep of {:e}\n"), nout,
timestep);
This then runs for 10 output steps with timestep = 1, which is what I expect at least
I think there's a bug in the current implementation in
master
andnext
, or at least behaviour that I find surprising. I've modified themonitor
example to print the name of the monitor for clarity, and got this output (onnext
):This is with
nout = 10
andtimestep = 1
. Although the simulation runs to sim timenout * timestep
and the relative frequencies of the monitors are all correct, notice that there are only 5 output steps that happen withtimestep = 2
.I think the fix is:
This then runs for 10 output steps with
timestep = 1
, which is what I expect at leastOriginally posted by @ZedThree in #2882 (comment)
The text was updated successfully, but these errors were encountered: