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
Describe the bug
The energy and especially momentum computations inhibit slight numerical fluctuations between runs, since the summation order varies due to OpenMP threading. It's most visible for the momentum calculations in the end (due to the different signs and magnitudes of the components there). However, that may also point to the numerical momentum/energy results being slightly off (in some lesser significant digit), even without threading.
Maybe it would be useful to have a stable summation algorithm (e.g. Kahan summation or the likes) in the reduction?
Expected behavior
Reproducable values for energy and momentum, preferrably without numerical errors.
To Reproduce
Steps to reproduce the behavior:
Which version do you use? Provide branch and commit id. Should happen on any commit with energy output. Take master: cdc14af
Which build settings do you use? Which compiler version do you use? Default settings, ninja as build tool. GCC 13.2.1
On which machine does your problem occur? If on a cluster: Which modules are loaded? Should happen everywhere. Tested it only on an own laptop and HomeOne (old software stack).
Provide parameter/material files. Take e.g. Examples/tpv5 and preferrably scale down the mesh considerably.
Screenshots/Console output
Two runs on the same mesh:
Run 1
Mon May 13 09:33:11, Info: Writing energy output at time 0.5
Mon May 13 09:33:11, Info: Elastic energy (total, % kinematic, % potential): 45828907986183.9 , 32.9355116010478 , 67.0644883989522
Mon May 13 09:33:11, Info: Total momentum (X, Y, Z): 0.821407467126846 , 9.94324527494609 , -6.11154559440911
Mon May 13 09:33:11, Info: Frictional work (total, % static, % radiated): 47221710417902.9 , 77.6918007508808 , 22.3081992491192
Mon May 13 09:33:11, Info: Seismic moment (without plasticity): 1.42187270151286e+17 Mw: 5.36524047752774
Mon May 13 09:33:11, Info: Writing energy output at time 0.5 Done.
Mon May 13 09:33:14, Info: Writing energy output at time 1
Mon May 13 09:33:14, Info: Elastic energy (total, % kinematic, % potential): 166216128067038 , 17.1108673121962 , 82.8891326878038
Mon May 13 09:33:14, Info: Total momentum (X, Y, Z): 154.467472076416 , -3683.37903022766 , 437.808065414429
Mon May 13 09:33:14, Info: Frictional work (total, % static, % radiated): 161658240184471 , 72.3535972685184 , 27.6464027314816
Mon May 13 09:33:14, Info: Seismic moment (without plasticity): 5.37237046063348e+17 Mw: 5.75011063501262
Mon May 13 09:33:14, Info: Writing energy output at time 1 Done.
Run 2
Mon May 13 09:05:19, Info: Writing energy output at time 0.5
Mon May 13 09:05:19, Info: Elastic energy (total, % kinematic, % potential): 45828907986183.9 , 32.9355116010478 , 67.0644883989522
Mon May 13 09:05:19, Info: Total momentum (X, Y, Z): 0.838717415928841 , 9.94186248257756 , -6.11485366895795
Mon May 13 09:05:19, Info: Frictional work (total, % static, % radiated): 47221710417902.9 , 77.6918007508808 , 22.3081992491192
Mon May 13 09:05:19, Info: Seismic moment (without plasticity): 1.42187270151286e+17 Mw: 5.36524047752774
Mon May 13 09:05:19, Info: Writing energy output at time 0.5 Done.
Mon May 13 09:05:22, Info: Writing energy output at time 1
Mon May 13 09:05:22, Info: Elastic energy (total, % kinematic, % potential): 166216128067038 , 17.1108673121963 , 82.8891326878037
Mon May 13 09:05:22, Info: Total momentum (X, Y, Z): 154.488586425781 , -3683.39056396484 , 437.76358795166
Mon May 13 09:05:22, Info: Frictional work (total, % static, % radiated): 161658240184471 , 72.3535972685184 , 27.6464027314816
Mon May 13 09:05:22, Info: Seismic moment (without plasticity): 5.37237046063348e+17 Mw: 5.75011063501262
Mon May 13 09:05:22, Info: Writing energy output at time 1 Done.
Here, only the momentum differs slightly; but it's also thinkable that there may be cases where the energy causes problems: though it is affected less by all of its values to sum up being non-negative, summing up values of largely different magnitude may distort the results as well.
Additional context
None.
The text was updated successfully, but these errors were encountered:
Is anyone else except me using the momentum calculations? I don't know if it is really worth it to do just for momentum calculations unless it is actually noticed in the energy calculations with some significance.
They indirectly helped me to spot a bug in #1103 —where an unusually high momentum was eventually caused by a bug which caused a too large timeskip (that's also when I noticed the value varying per run).
The terminal output is generally pretty useful for quick pseudo-verification if something broke IMO. But I haven't spotted such a behavior yet for the energy values—however I have only recently started to print them with so many significant digits. So—probably it's nice-to-have, but low priority to my opinion.
Describe the bug
The energy and especially momentum computations inhibit slight numerical fluctuations between runs, since the summation order varies due to OpenMP threading. It's most visible for the momentum calculations in the end (due to the different signs and magnitudes of the components there). However, that may also point to the numerical momentum/energy results being slightly off (in some lesser significant digit), even without threading.
Maybe it would be useful to have a stable summation algorithm (e.g. Kahan summation or the likes) in the reduction?
Expected behavior
Reproducable values for energy and momentum, preferrably without numerical errors.
To Reproduce
Steps to reproduce the behavior:
Screenshots/Console output
Two runs on the same mesh:
Run 1
Run 2
Here, only the momentum differs slightly; but it's also thinkable that there may be cases where the energy causes problems: though it is affected less by all of its values to sum up being non-negative, summing up values of largely different magnitude may distort the results as well.
Additional context
None.
The text was updated successfully, but these errors were encountered: