From b3cf531bd61b6fa6d5bb2c2c6d53ebacec582c04 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Wed, 27 Mar 2024 08:01:40 -0400 Subject: [PATCH 1/8] Fix non-Baselibs build --- .gitignore | 9 +++++++-- CHANGELOG.md | 1 + CMakeLists.txt | 17 ++--------------- cmake/FindESMF.cmake | 16 ++++++++-------- 4 files changed, 18 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 5e844f143a4a..f58506891921 100644 --- a/.gitignore +++ b/.gitignore @@ -10,8 +10,13 @@ CMakeUserPresets.json # Ignore possible symlinked build and install directories -build-* -install-* +# Note: we can't use a / at the end because they might be +# symlink to a directory +build* +install* + +# If you build with spack libraries, you can get spack log files +spack*.log *.swp *.swo diff --git a/CHANGELOG.md b/CHANGELOG.md index c7907ed679c9..862ce86e3336 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed bug with split restart files - Removed unnecessary memory allocation for tile reads. This is critical for high res runs on SCU17 - Fixes to allow SCM model to run +- Fixed non-Baselibs build using `ESMF::ESMF` target ### Removed diff --git a/CMakeLists.txt b/CMakeLists.txt index d0cbe7caa523..89c3b217e918 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -148,21 +148,8 @@ if (NOT Baselibs_FOUND) endif() if (NOT TARGET ESMF::ESMF) - find_package(ESMF 8.6.0 MODULE REQUIRED) - - # ESMF as used in MAPL requires MPI - # NOTE: This looks odd because some versions of FindESMF.cmake out in the - # world provide an "esmf" target while others provide "ESMF". So we - # need this ugliness to support both. - if (TARGET ESMF::ESMF) - target_link_libraries(ESMF::ESMF INTERFACE MPI::MPI_Fortran) - else() - target_link_libraries(ESMF::ESMF INTERFACE MPI::MPI_Fortran) - # MAPL and GEOS use lowercase target due to historical reasons but - # the latest FindESMF.cmake file from ESMF produces an ESMF target. - add_library(ESMF::ESMF ALIAS ESMF) - add_library(ESMF::ESMF ALIAS esmf) - endif() + find_package(ESMF 8.6.1 MODULE REQUIRED) + target_link_libraries(ESMF::ESMF INTERFACE MPI::MPI_Fortran) endif () else () # This is an ESMF version test when using Baselibs which doesn't use the diff --git a/cmake/FindESMF.cmake b/cmake/FindESMF.cmake index eabba677d3b6..4eb0f6a54e91 100644 --- a/cmake/FindESMF.cmake +++ b/cmake/FindESMF.cmake @@ -96,22 +96,22 @@ if(EXISTS ${ESMFMKFILE}) message(WARNING "Static ESMF library (libesmf.a) not found in \ ${ESMF_LIBSDIR}. Try setting USE_ESMF_STATIC_LIBS=OFF") endif() - if(NOT TARGET ESMF) - add_library(ESMF STATIC IMPORTED) + if(NOT TARGET ESMF::ESMF) + add_library(ESMF::ESMF STATIC IMPORTED) endif() else() find_library(ESMF_LIBRARY_LOCATION NAMES esmf PATHS ${ESMF_LIBSDIR} NO_DEFAULT_PATH) if(ESMF_LIBRARY_LOCATION MATCHES "ESMF_LIBRARY_LOCATION-NOTFOUND") message(WARNING "ESMF library not found in ${ESMF_LIBSDIR}.") endif() - if(NOT TARGET ESMF) - add_library(ESMF UNKNOWN IMPORTED) + if(NOT TARGET ESMF::ESMF) + add_library(ESMF::ESMF UNKNOWN IMPORTED) endif() endif() - # Add target alias to facilitate unambiguous linking - if(NOT TARGET ESMF::ESMF) - add_library(ESMF::ESMF ALIAS ESMF) + # Add ESMF as an alias to ESMF::ESMF for backward compatibility + if(NOT TARGET ESMF) + add_library(ESMF ALIAS ESMF::ESMF) endif() # Add ESMF include directories @@ -135,7 +135,7 @@ if(EXISTS ${ESMFMKFILE}) ESMF_F90COMPILEPATHS VERSION_VAR ESMF_VERSION) - set_target_properties(ESMF PROPERTIES + set_target_properties(ESMF::ESMF PROPERTIES IMPORTED_LOCATION "${ESMF_LIBRARY_LOCATION}" INTERFACE_INCLUDE_DIRECTORIES "${ESMF_INCLUDE_DIRECTORIES}" INTERFACE_LINK_LIBRARIES "${ESMF_INTERFACE_LINK_LIBRARIES}") From 6496fc6b908efa4035973be748de45a0e8621295 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Mon, 22 Apr 2024 14:46:12 -0400 Subject: [PATCH 2/8] Use prepend for mapl cmake --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4950bf278488..9e3b6f370b33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,7 +58,8 @@ if (NOT COMMAND esma) endif () -list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") +# This tells cmake to assume MAPL's cmake directory is the first place to look +list (PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") option (BUILD_SHARED_MAPL "Build shared MAPL libraries" ON) if (BUILD_SHARED_MAPL) From 838e7f490f3aba0988a86971aabcda07e6c0fc1f Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Tue, 23 Apr 2024 12:17:50 -0400 Subject: [PATCH 3/8] Update CI to Baselibs 7.24.0 --- .circleci/config.yml | 2 +- .github/workflows/workflow.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b80539e281f7..23ebf01b3da6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,7 @@ parameters: # Anchors to prevent forgetting to update a version os_version: &os_version ubuntu20 -baselibs_version: &baselibs_version v7.23.0 +baselibs_version: &baselibs_version v7.24.0 bcs_version: &bcs_version v11.3.0 tag_build_arg_name: &tag_build_arg_name maplversion diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 4c9ddc98a34e..ce50738f8a13 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -35,7 +35,7 @@ jobs: name: Build and Test MAPL GNU runs-on: ubuntu-latest container: - image: gmao/ubuntu20-geos-env-mkl:v7.23.0-openmpi_5.0.0-gcc_12.1.0 + image: gmao/ubuntu20-geos-env-mkl:v7.24.0-openmpi_5.0.0-gcc_12.1.0 # Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495 # It seems like we might not need secrets on GitHub Actions which is good for forked # pull requests From 51ceb38c82e56429d9b7075a615cfba20f2be1ff Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Tue, 23 Apr 2024 12:21:32 -0400 Subject: [PATCH 4/8] Fix CI --- .github/workflows/workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index ce50738f8a13..f4b1e5f07cbc 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -35,7 +35,7 @@ jobs: name: Build and Test MAPL GNU runs-on: ubuntu-latest container: - image: gmao/ubuntu20-geos-env-mkl:v7.24.0-openmpi_5.0.0-gcc_12.1.0 + image: gmao/ubuntu20-geos-env-mkl:v7.24.0-openmpi_5.0.2-gcc_13.2.0 # Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495 # It seems like we might not need secrets on GitHub Actions which is good for forked # pull requests @@ -86,7 +86,7 @@ jobs: name: Build and Test MAPL Intel runs-on: ubuntu-latest container: - image: gmao/ubuntu20-geos-env:v7.23.0-intelmpi_2021.6.0-intel_2022.1.0 + image: gmao/ubuntu20-geos-env:v7.24.0-intelmpi_2021.6.0-intel_2022.1.0 # Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495 # It seems like we might not need secrets on GitHub Actions which is good for forked # pull requests From 25d11efa59ee96886ab67c0ae0b082d25b216808 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Tue, 23 Apr 2024 14:36:17 -0400 Subject: [PATCH 5/8] Remove FLAP use for GEOSadas CI --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 23ebf01b3da6..b49d99ee09c7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,7 +33,7 @@ workflows: - docker-hub-creds matrix: parameters: - compiler: [gfortran,ifort] + compiler: [gfortran, ifort] cmake_generator: ['Unix Makefiles','Ninja'] baselibs_version: *baselibs_version repo: MAPL @@ -161,7 +161,6 @@ workflows: checkout_mapl_branch: true mepodevelop: false rebuild_procs: 1 - extra_cmake_options: "-DBUILD_WITH_FLAP=ON" build-and-publish-docker: when: From 079297629394c7c67194fb8373e120c3664ac000 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Thu, 25 Apr 2024 12:15:47 -0400 Subject: [PATCH 6/8] Update to ESMA_cmake v3.45.0 and ESMA_env v4.29.0 --- CHANGELOG.md | 24 +++++++++++++++++++++++- components.yaml | 4 ++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bcadbfa499b0..003b8f023684 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated +## [2.46.0] - 2024-04-XX + +### Added + +- Update `FindESMF.cmake` to match that in ESMF 8.6.1 + +### Changed + +- Set required version of ESMF to 8.6.1 +- Update `components.yaml` + - ESMA_cmake v3.45.0 + - `BUILT_ON_SLES15` set to `FALSE` on NCCS if not built on SLES15 + - Update `FindESMF.cmake` to match that in ESMF 8.6.1 + - Suppress remarks in Intel Fortran Classic 2021.12 + - ESMA_env v4.29.0 (Baselibs 7.24.0) + - Update to ESMF 8.6.1b04 + - NCO 5.2.4 + - curl 8.7.1 + +### Fixed + +- Fixed non-Baselibs build using `ESMF::ESMF` target + ## [2.45.0] - 2024-04-25 ### Added @@ -76,7 +99,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed bug with split restart files - Removed unnecessary memory allocation for tile reads. This is critical for high res runs on SCU17 - Fixes to allow SCM model to run -- Fixed non-Baselibs build using `ESMF::ESMF` target ### Removed diff --git a/components.yaml b/components.yaml index 38ca0c946dc7..94c80847201b 100644 --- a/components.yaml +++ b/components.yaml @@ -5,13 +5,13 @@ MAPL: ESMA_env: local: ./ESMA_env remote: ../ESMA_env.git - tag: v4.28.1 + tag: v4.29.0 develop: main ESMA_cmake: local: ./ESMA_cmake remote: ../ESMA_cmake.git - tag: v3.44.0 + tag: v3.45.0 develop: develop ecbuild: From 90d85ef8384da93b233beadb4aea825feea33791 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Wed, 1 May 2024 12:40:26 -0400 Subject: [PATCH 7/8] Trivial changelog change to trigger CI --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 003b8f023684..b09396ccc823 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated -## [2.46.0] - 2024-04-XX +## [2.46.0] - 2024-05-XX ### Added From 8598641fbf2e0b6eda887f5e5f4740dbf83aa989 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Wed, 1 May 2024 14:36:54 -0400 Subject: [PATCH 8/8] Add final date to changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b09396ccc823..bb095ae09e1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated -## [2.46.0] - 2024-05-XX +## [2.46.0] - 2024-05-02 ### Added