Case 2: WRF Result Difference Analysis
A customer uses WRF 4.0.2 as the meteorological prediction software. WRF abstracts meteorological processes into equations and uses the equations to carry out numerical calculation and iterative solution. The WRF calculation process is closely related to each physical parameter. Therefore, you need to analyze the difference between the calculation results of each physical parameter. Based on commonly used physical parameters and the WRF Preprocessing System (WPS, which can generate WRF input data), 31 WRF computing test cases with different physical parameter combinations are constructed. For computing test cases whose calculation results on Kunpeng and x86 are inconsistent, locate code segments where differences occur and analyze the causes based on Implementing Code Instrumentation.
After specifying -fp-model=precise to remove the FTZ compilation option, using the Kunpeng Math Library, or modifying undefined behavior in WRF code, the 103-day weather forecast result on Kunpeng is the same as that on x86.