Remove local copy of FindESMF.cmake and rename esmf target to ESMF::ESMF#73
Remove local copy of FindESMF.cmake and rename esmf target to ESMF::ESMF#73DusanJovic-NOAA wants to merge 9 commits into
Conversation
|
Hi @DusanJovic-NOAA . These may be used outside of UFS. |
I only ran ufs-weather-model regression test. I do not know how to test CDEPS or CMEPS outside UFS. |
|
@DusanJovic-NOAA ESCOMP/CDEPS has nice github actions. Your current PR fails in build CDEPS step: |
I think github actions should set diff --git a/.github/actions/buildcdeps/action.yaml b/.github/actions/buildcdeps/action.yaml
index 9d775dd..a06a55a 100644
--- a/.github/actions/buildcdeps/action.yaml
+++ b/.github/actions/buildcdeps/action.yaml
@@ -16,6 +16,11 @@ inputs:
default: $HOME/ESMF/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk
required: False
type: string
+ esmf_root:
+ description: 'Path to the installed ESMF library'
+ default: $HOME/ESMF
+ required: False
+ type: string
src_root:
description: 'Path to cdeps source'
default: $GITHUB_WORKSPACE
@@ -40,6 +45,7 @@ runs:
mkdir build-cdeps
pushd build-cdeps
export ESMFMKFILE=${{ inputs.esmfmkfile }}
+ export ESMF_ROOT=${{ inputs.esmf_root }}
export PIO=${{ inputs.pio_path }}
cmake ${{ inputs.cmake_flags }} ${{ inputs.src_root }}
make VERBOSE=1
diff --git a/.github/workflows/extbuild.yml b/.github/workflows/extbuild.yml
index 185f6d8..0ad1e3c 100644
--- a/.github/workflows/extbuild.yml
+++ b/.github/workflows/extbuild.yml
@@ -69,6 +69,7 @@ jobs:
uses: ./.github/actions/buildcdeps
with:
esmfmkfile: $ESMFMKFILE
+ esmf_root: ${GITHUB_WORKSPACE}/ESMF
pio_path: ${GITHUB_WORKSPACE}/pio
src_root: ${GITHUB_WORKSPACE}
cmake_flags: " -Wno-dev -DCMAKE_BUILD_TYPE=DEBUG -DWERROR=ON -DCMAKE_Fortran_FLAGS=\"-DCPRGNU -g -Wall \
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7176988..0217d83 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,6 +39,7 @@ enable_language(Fortran)
if (TARGET ESMF::ESMF)
message("Target ESMF::ESMF is already found. Skip find_package ...")
else()
+ list(APPEND CMAKE_MODULE_PATH $ENV{ESMF_ROOT}/cmake)
find_package(ESMF REQUIRED)
endif() |
|
@DusanJovic-NOAA Not yet. I'm not so familiar with this but happy to help if I can. Or can ask...maybe Ufuk? |
@NickSzapiro-NOAA I just pushed these changes to my branch, can you pull them to your branch to see if they fix github actions upstream |
|
@DusanJovic-NOAA If those are the same as the changes you commented above, it's still same error Gemini AI advised to use cmake -D instead of export...I'm trying a few iterations with AI out of curiosity, if it helps Please let me know if you'd like me to try anything in particular |
|
I think in |
|
Yes, I tried that last night (ESCOMP@c62f676) |
|
I enabled the github actions in my branch and I see that, for some reason, the esmf installation does not contain FindESMF.cmake in the expected location (<prefix>/cmake), as we have in our spack stack installations. |
|
After I updated esmf to 8.8.0, cmake successfully finds FindESMF.cmake in ESMF_ROOT/cmake, and the finds esmf library. However, it fails at finding FoX. https://github.com/DusanJovic-NOAA/CDEPS/actions/runs/16838470381/job/47703643415 This happens because in develop branch there's no fox submodule which is present in the main branch, and it looks like github actions are set to run on main branch only. |
|
I just realized that ufs-weather-model does not even use the cmake build system from this repository. ufs-weather-model uses CMakeLists.txt from CDEPS-interface. I will revert the CDEPS submodule, rerun full regression tests, and if all tests pass I will close this PR. |
|
Changes in the PR are actually not needed since ufs-weather-model does not use the build system from this repository. Closing. |
Description of changes
This PR removes local copy of FindESMF.cmake and renames esmf target to ESMF::ESMF. ufs-weather-model now uses the FindESMF.cmake module provided by the ESMF library. No change in the baselines is expected.
Specific notes
Contributors other than yourself, if any:
CDEPS Issues Fixed (include github issue #):
Are there dependencies on other component PRs (if so list):
Are changes expected to change answers (bfb, different to roundoff, more substantial):
Any User Interface Changes (namelist or namelist defaults changes):
Testing performed (e.g. aux_cdeps, CESM prealpha, etc):
Hashes used for testing: