ESCOMP / CTSM

Community Terrestrial Systems Model (includes the Community Land Model of CESM)
http://www.cesm.ucar.edu/models/cesm2.0/land/
Other
295 stars 300 forks source link

Stop building esmf_wrf_timemgr for unit tests; instead use the actual ESMF library #2375

Open billsacks opened 4 months ago

billsacks commented 4 months ago

In making the changes for #2374 , I noticed that the unit test build still builds the esmf_wrf_timemgr to satisfy the ESMF dependency of clm_time_manager.F90. At some point we should probably stop doing that and instead have the unit tests link against the actual ESMF library.

See https://github.com/ESCOMP/CTSM/blob/c030c2342dac53d30ed419aca262db8fa7213ee6/src/CMakeLists.txt#L21

and some related code in that file.

I briefly started down this path but couldn't see how to get the value of ESMFMKFILE for this machine/compiler in the CMake build, so I gave up for now.

Note that we could probably also remove this block of code: I assume that was put in before we needed to include ESMF stuff in the unit test build, but now we do because of the unit tests of clm_time_manager: https://github.com/ESCOMP/CTSM/blob/c030c2342dac53d30ed419aca262db8fa7213ee6/src/CMakeLists.txt#L57-L73

samsrabin commented 3 months ago

Decision in SE meeting 2024-03-21: This is a good thing for post-CESM3.

ekluzek commented 1 month ago

@jedwards4b is recommending that we use ESMF VM constructs to replace things like shr_mpi as a more general way of doing things that allow for a move to a different distributed memory. See this comment here.

https://github.com/ESCOMP/MOSART/pull/94#discussion_r1629594334

The reason that relates to this is that any unit-testing that uses those ESMF VM objects doing this would be *required".

ekluzek commented 3 weeks ago

In the CSEG meeting we talked about removing the esmf_wrf_timemgr in a future cesm3_0 beta tag. Doing this would break our unit-testing unless this issue were fixed. Since the unit-testing is critical this will need to be fixed as part of the cesm3_0 release. Because of that I removed the low priority label here, and added the ctsm6.0.0 code freeze milestone.

ekluzek commented 3 weeks ago

It looks like @jedwards4b has something that should work here. It will at least require an update of cesm_share, and possibly cime. This will enable CESM to deprecate and remove the ESMF wrf timemgr code. So we can likely bring this in and make sure it works at our next externals update.

@adrifoster