CASL / Futility

VERA Fortran Utilities
Other
44 stars 20 forks source link

Hotfix for testAnderson and testVectorTypes #259

Closed jpjones6 closed 4 years ago

jpjones6 commented 4 years ago

This is a fix for the build failures in testVectorTypes in petsc and trilinos builds, and the Anderson test that fails in GCC 8.3 builds. The Anderson test failure was due to a change in the random number generator from GCC 5.4 to GCC 8.3.

HendersonSC commented 4 years ago

Apparently late the the party, but I am pretty sure srand and rand are actually GNU extension, I am not sure we can count on them being static in anyway.

jpjones6 commented 4 years ago

They are extensions, but they are included specifically for backwards compatibility with g77. https://gcc.gnu.org/onlinedocs/gfortran/RAND.html However, the point is moot, there is no guaranteeing the Intel implementation would be identical to the GCC implementation. How about we go with the pregenerated and read from file approach.

jpjones6 commented 4 years ago

Ben pointed out offline that there have been reliability issues in the past with using files for what needs to be done here. That being the case the argument against just using the Futility native RNG doesn't hold much air. In reality if anything changes with the Futility RNG the one line in the Anderson test that checks the exact convergence rate is all that would need to change. I can even add a comment to that effect above the check to clue in future devs.

bscollin commented 4 years ago

Aaron pointed out that I was incorrect in where the issues were. I think we're in agreement that whichever direction is easier to implement is the right direction that will achieve a similar capability (file or internal RNG).