fix test-initial to allow more precise calculation#555
fix test-initial to allow more precise calculation#555ZedThree merged 2 commits intoboutproject:masterfrom
Conversation
1d87d83 to
1e03ab6
Compare
|
To be honest, this change makes me a little uncomfortable, as I worry it might cause genuine bugs in BOUT++ to be missed. This is only a problem on one architecture which I'm not certain is used very much any more. I think this might be better solved by noting it as a "known bug" in the test README.md |
|
I think this specific test is anyway not well designed. The current test just makes sure that all the bugs from the C++ code where reproduced in python. |
|
I think this is not going to be merged for now, since we're uneasy about making accuracy exceptions for particular tests. Perhaps just document that this failure is expected on some architectures |
|
I would prefer getting the exception. Further, I don't think the PRNG is decently tested ... |
|
Thanks for the testing. Yes, this does suck as a PRNG. Cryptographic use not recommended, but I put it in because it's simple and (I thought) reproducible. Do we need a better PRNG? I would prefer not to use a standard library because I don't think there's a way to make sure it will be the same in 5 year's time on a different system. |
|
Presumably a PRNG which uses integers and then at the end generates a float should be more reproducible and less sensitive to floating point errors...? |
|
Something like this maybe? It is better than what we have right know. It is not a good one - but should do the job. I think we would also be fine with std::mt19937 and provide our own code to create uniform/normal3/...4 |
|
There seem to be several possible issues here, but as I understand it the primary issue is that Would a suitable workaround for now be to simply add some code into the specific |

I think this is the last fix needed for #551