diff --git a/.circleci/config.yml b/.circleci/config.yml index b80539e281f7..b49d99ee09c7 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 @@ -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: diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 1ac68d8fcf35..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.23.0-openmpi_5.0.2-gcc_13.2.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 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 4a726f42c23e..bb095ae09e1a 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-05-02 + +### 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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ae38e18a764..37c4aacd404c 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) @@ -148,21 +149,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}") 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: