Open esampson opened 9 years ago
Nice! This needs to go upstream to plate-tectonics, possibly related to this: https://github.com/Mindwerks/plate-tectonics/issues/30
Yes, unfortunately it could happen that mass becomes negative because of rounding in floating point operations. However -0.14 seems a lot.
I have had this happen, too. Also by quite a large margin - I didn't store the seed, though I think that I just reused the same seed and the program succeeded. (But I may be wrong...I will keep my eyes open next time.)
An error of this magnitude would be very unlikely to happen out of floating-point noise. This and the strange rivers (https://github.com/Mindwerks/worldengine/issues/119) I will probably look at next.
It's 100% happening because of the float round-off error accumulation. I'm not sure what convinced you that such an event was unlikely.
I didn't see this could be caused by platec. Here is another one:
operation : world generation
seed : 250375195
width : 256
height : 256
number of plates : 11
Assertion `0` failed in cpp_src/mass.cpp line 81 Message: A negative mass is not allowed
Assertion `0` failed in cpp_src/mass.cpp line 81 Message: A negative mass is not allowed
Assertion `0` failed in cpp_src/mass.cpp line 81 Message: A negative mass is not allowed
Assertion `0` failed in cpp_src/mass.cpp line 81 Message: A negative mass is not allowed
Assertion `0` failed in cpp_src/mass.cpp line 81 Message: A negative mass is not allowed
Assertion `0` failed in cpp_src/mass.cpp line 81 Message: A negative mass is not allowed
Assertion `0` failed in cpp_src/mass.cpp line 81 Message: A negative mass is not allowed
Assertion `0` failed in cpp_src/mass.cpp line 81 Message: A negative mass is not allowed
Distance to sun: 0.9607221912973465, ecliptic offset: -0.037417404120896766 ? Are you building something extremely cool :D ?
I edited that so nobody would see it. :P Just added another bit of randomness to the temperature map and had forgotten that there was a print() letting me know which values were chosen. If I can separate it from the numpy-stuff, I will create another pull-request soon to discuss this a bit.
This is the very first time I've ever seen this error: