make single-precision floating point the default for fields and materials #1550
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following recently added support for single precision (#1544) and prior to eventually providing a user option to select the floating precision at runtime (#1549), this PR makes single-precision floating point the default for the fields and material arrays. The main changes in this PR are updates to several of the unit tests which had previously been failing for single precision. These changes mainly involve reducing the threshold relative tolerance when comparing against hard-coded values. All tests are now passing.
Some additional comments:
array_metadata.py
) and the eigensolver (eigfreq.py
) had to be essentially disabled because single precision was causing either slow or poor convergence for the iterative solvers.multilevel_atom.py
changed significantly (nearly two orders of magnitude) when switching from double to single precision. Not sure why this the case. For now, this test has been disabled.