Application Code
The code implementations vary based on different platforms. As a result, the calculation results are different.
- Out-of-bounds memory access of the code. (x86 has a high tolerance for out-of-bounds memory access, but Kunpeng is prone to trigger this problem.)
For example, in the MPTABLE.TBL configuration file of the WRF code, the terrain data is 27 dimensions, and the data of related variables (such as SLA) has only 27 dimensions. If data beyond 27 dimensions is accessed, out-of-bounds array access occurs.
- Uninitialized code variables or arrays. (In most x86 scenarios, the initial value is 0, while the default value for Kunpeng is a random value.)
For example, the one-dimensional integer array KUO of a meteorological application is not initialized and is directly transferred to the SHALCV function for calculation. However, the program calculation logic depends on the initial value. As a result, the calculation results are different. The following figure shows the calculation logic:

For details about the causes of calculation result differences, see Kunpeng Calculation Precision White Paper.