ufs-community / ufs-weather-model

UFS Weather Model
Other
133 stars 239 forks source link

Upcoming ip v5 changes #2331

Open AlexanderRichert-NOAA opened 2 weeks ago

AlexanderRichert-NOAA commented 2 weeks ago

Description

The latest versions of the ip library (5.0 onward) incorporate the functionality of the sp library, which is now considered deprecated. For the most part, the changes need to use 5.0 are trivial; in more recent versions, more changes to compiled code are needed on account of the former sp routines being placed in a module, necessitating the use of use sp_mod, but again these changes should be relatively straightforward.

One consequence however of the merger of sp into ip is that when FV3/ccpp/physics/CMakeLists.txt is modified to use ip, the fact that OpenMP is included by the ip cmake configuration creates issues for the various radiation files that are not intended to be built with openmp (SCHEME_OPENMP_OFF). I am creating this issue to generate discussion on how best to handle this in anticipation of UFSWM eventually moving to a spack-stack release that contains ip 5.0+.

Solution

My current solution is to explicitly add -fno-openmp/-qno-openmp flags for those particular source files in order to override the openmp flags that come from the ip cmake target.

DusanJovic-NOAA commented 2 weeks ago

If I remember correctly, ccpp depends on the sp library for only one (standalone) routine 'splat'. My suggestion is to simply include the source code of splat in ccpp-physics and remove the ufs-weather-model and ccpp dependency on sp and ip libraries entirely and avoid all these complications.