GEOS-ESM / rte-rrtmgp

RTE+RRTMGP is a set of codes for computing radiative fluxes in planetary atmospheres.
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Test using vectorized flags in RRTMGP #6

Open mathomp4 opened 6 months ago

mathomp4 commented 6 months ago

In #5 it was noted by me that in our CMakeLists.txt for RRTMGP we have:

# Use of the GEOS Vectorized flags in RRTMGP caused a segfault leading to
# line 726 of mo_gas_optics_kernels.F90. Moving to the "old" no-vect flags
# allows RRTMGP to run again.
if (CMAKE_Fortran_COMPILER_ID MATCHES Intel AND CMAKE_BUILD_TYPE MATCHES Release)
  set (CMAKE_Fortran_FLAGS_RELEASE "${GEOS_Fortran_FLAGS_NOVECT}")
endif ()

That is 2 years old so v1.5 time. We've long since moved to v1.6 and our vect flags have changed as well. So maybe this not needed anymore!

Let's do some tests:

mathomp4 commented 6 months ago

Welp, maybe we don't want to use our vectorized flags with v1.6 based RRTMGP:

Resolution NoVect SW Vect SW Speedup NoVect LW Vect LW Speedup Total NoVect Total Vect Speedup
c24 2.76 3.02 -9% 2.10 1.89 10% 4.86 4.91 -1%
c48 7.81 8.42 -8% 6.96 6.32 9% 14.77 14.74 0%
c90 37.56 40.14 -7% 35.34 30.36 14% 72.90 70.50 3%
c180 51.66 58.20 -13% 51.22 48.69 5% 102.88 106.89 -4%
c360 52.75 61.24 -16% 52.26 49.35 6% 105.01 110.59 -5%
c720 56.89 81.42 -43% 53.47 50.51 6% 110.36 131.93 -20%
mathomp4 commented 6 months ago

So that is not good for v1.6 but RRTMGP v1.7 is a different beast.

Note that @peterukk has an issue at the mothership (see https://github.com/earth-system-radiation/rte-rrtmgp/issues/215) which also involves vectorization and there is no associated PR, so this still might be an issue.

I'll test with RRTMGP v1.7 when @dr0cloud has finished his integration of it into GEOS. (Reminder: also do SP v DP tests.)