Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Matching wrf results aarch64 x86 with gcc10.2 (#1773)
This update is to resolve different simulation results on aarch64 and x86 for the same dataset (caused by round up error in the last position for some transcendental functions) TYPE: bug fix KEYWORDS: round up error, transcendental, compiler optimization SOURCE: Jun Tang, Amazon DESCRIPTION OF CHANGES: Problem: After investigation, different simulation results on aarch64 and x86 for the same dataset with gcc 10.2 are caused by round up error in the last position for some transcendental functions; and several optimization flags (FMA, inverse square root, ...). Solution: Use double precision for the computation of transcendental function at selected locations can make sure exact same output models are produced on aarch64 and x86 (this patch only covers a few PBL and cumulus scheme). Also disabling some risky optimization can guarantee same output as lower optimization level. LIST OF MODIFIED FILES: list of changed files (use `git diff --name-status master` to get formatted list) M arch/configure.defaults M phys/module_cu_tiedtke.F M phys/module_sf_myjsfc.F TESTS CONDUCTED: 1. The mods fixes the correctness problem between aarch64 and x86 for two WRF models (conus2.5km and conus12km). The output models are matched, bit by bit, on the two specified platform with the patch. 2. The regression tests have passed - as indicated the change should not affect its results. RELEASE NOTE: Fix numerical divergence on x86 and arm64. For best performance for WRF on arm64 please use armclang. (https://github.com/juntangc/notes/blob/main/release-note.pdf).
- Loading branch information
Showing
3 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters