Skip to content

Commit

Permalink
Merge pull request #2804 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mathomp4 committed May 2, 2024
2 parents 8583784 + 3daedd0 commit 54a2b20
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 33 deletions.
5 changes: 2 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 4 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions cmake/FindESMF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}")
Expand Down
4 changes: 2 additions & 2 deletions components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 54a2b20

Please sign in to comment.