ACCESS-NRI / model-config-tests

Tests for checking model configurations
Apache License 2.0
0 stars 1 forks source link

UM reproducibility with intel-compiler/2021.7.0 #84

Open MartinDix opened 1 year ago

MartinDix commented 1 year ago

Building on a report from Ilia Bermous of the Bureau.

UM rose-stem tests currently useintel-compiler/2020.3.304 on gadi. 2021 versions up to 2021.6.0 all give identical results. However the 2021.7.0 compiler gives different results for all UM test cases, whether with rigorous, safe or high builds. The single column model tests still match suggesting it's something affecting the model dynamics rather than the physics.

All object files built with 2021.6.0 and linked with 2021.7.0 gives different results to standard build and link with 2021.6.0

All object files built with 2021.7.0 and linked with 2021.6.0 matches standard results.

Therefore the difference is from something in the libraries that 2021.7.0 links.

MartinDix commented 1 year ago

Suite u-cs038 (checksum branch) builds model with2021.6.0 compiler and also links an alternate version with the same object files and the 2021.7.0 compiler. UM Code branch test/martindix/vn13.0_checksum initially added array checksums to atm_step_4A.F90 and then first differences tracked back to use of cos and sin in eg_sl_wind_w.F90. Arrays written to separate files to allow analysis outside the model.

This example program shows different results from one critical value found

program sin_test
    implicit none
    integer, parameter :: r8 = selected_real_kind(12)
    real(r8) :: x, s
    ! Critical value found from suite u-cs038
    x = 0.5557974472175281_r8
    s = sin(x)
    write(*,'(f21.17)') s
    write(*,'(f21.17)') nearest(s,1.0)
end program sin_test

2021.6.0 gives sin(x) = 0.5276208833253109, 2021.7.0 gives 0.5276208833253108. These differ in the last place.

aidanheerdegen commented 1 year ago

Nice detective work @MartinDix