Skip to content

Commit

Permalink
Merge pull request #1898 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
GitFlow: Merge develop into main for 2.34 release
  • Loading branch information
mathomp4 authored Jan 5, 2023
2 parents 6926588 + dd5c43b commit 14b9789
Show file tree
Hide file tree
Showing 22 changed files with 334 additions and 41 deletions.
79 changes: 68 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ workflows:
matrix:
parameters:
compiler: [ifort]
cmake_generator: ['Unix Makefiles', 'Ninja']
#cmake_generator: ['Unix Makefiles', 'Ninja']
cmake_generator: ['Unix Makefiles']
baselibs_version: *baselibs_version
repo: MAPL
mepodevelop: false
Expand All @@ -61,7 +62,8 @@ workflows:
matrix:
parameters:
compiler: [gfortran]
cmake_generator: ['Unix Makefiles', 'Ninja']
#cmake_generator: ['Unix Makefiles', 'Ninja']
cmake_generator: ['Unix Makefiles']
baselibs_version: *baselibs_version
repo: MAPL
mepodevelop: false
Expand All @@ -84,38 +86,80 @@ workflows:
run_unit_tests: true
ctest_options: "-LE 'PERFORMANCE|EXTDATA1G_BIG_TESTS|EXTDATA2G_BIG_TESTS' --output-on-failure"

# Build GEOSgcm
# Build GEOSgcm -- ifort
- ci/build:
name: build-GEOSgcm-on-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [gfortran, ifort]
compiler: [ifort]
baselibs_version: *baselibs_version
repo: GEOSgcm
checkout_fixture: true
mepodevelop: true
checkout_mapl_branch: true
persist_workspace: true # Needs to be true to run fv3/gcm experiment, costs extra, retained for one day

# Build GEOSgcm -- GCC -- only to main
- ci/build:
filters:
branches:
only:
- main
name: build-GEOSgcm-on-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [gfortran]
baselibs_version: *baselibs_version
repo: GEOSgcm
checkout_fixture: true
mepodevelop: true
checkout_mapl_branch: true
persist_workspace: true # Needs to be true to run fv3/gcm experiment, costs extra, retained for one day

# Build GEOSldas
# Build GEOSldas on ifort
- ci/build:
name: build-GEOSldas-on-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [gfortran, ifort]
compiler: [ifort]
baselibs_version: *baselibs_version
repo: GEOSldas
mepodevelop: false
checkout_fixture: true
fixture_branch: develop
checkout_mapl_branch: true

# Build GEOSldas on gfortran -- only to main
- ci/build:
filters:
branches:
only:
- main
name: build-GEOSldas-on-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [gfortran]
baselibs_version: *baselibs_version
repo: GEOSldas
mepodevelop: false
checkout_fixture: true
fixture_branch: develop
checkout_mapl_branch: true

# Build GEOSadas (ifort only, needs a couple develop branches)
# Build GEOSadas (ifort only, needs a couple develop branches) -- only to main
- ci/build:
filters:
branches:
only:
- main
name: build-GEOSadas-on-<< matrix.compiler >>
context:
- docker-hub-creds
Expand All @@ -133,8 +177,12 @@ workflows:
mepodevelop: false
rebuild_procs: 1

# Run GCM (1 hour, no ExtData)
# Run GCM (1 hour, no ExtData) -- only to main
- ci/run_gcm:
filters:
branches:
only:
- main
name: run-GCM-on-<< matrix.compiler >>
context:
- docker-hub-creds
Expand All @@ -147,8 +195,12 @@ workflows:
baselibs_version: *baselibs_version
bcs_version: *bcs_version

# Run Coupled GCM (1 hour, no ExtData)
# Run Coupled GCM (1 hour, no ExtData) -- only to main
- ci/run_gcm:
filters:
branches:
only:
- main
name: run-coupled-GCM-on-<< matrix.compiler >>
context:
- docker-hub-creds
Expand All @@ -163,14 +215,19 @@ workflows:
gcm_ocean_type: MOM6
change_layout: false

# Run MAPL Tutorials
# Run MAPL Tutorials -- only to main
- ci/run_mapl_tutorial:
filters:
branches:
only:
- main
name: run-<< matrix.tutorial_name >>-Tutorial-with-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [gfortran, ifort]
#compiler: [gfortran, ifort]
compiler: [ifort]
tutorial_name:
- hello_world
- parent_no_children
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog-enforcer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: dangoslen/changelog-enforcer@v3
with:
changeLogPath: 'CHANGELOG.md'
skipLabels: 'Skip Changelog,0 diff trivial,automatic,dependencies'
skipLabels: 'Skip Changelog,0 diff trivial,automatic,dependencies,github_actions'
missingUpdateErrorMessage: >
No update to CHANGELOG.md found! Please add a changelog
entry to it describing your change. Please note that the
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/enforce-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,25 @@ jobs:
require-label:
runs-on: ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@v2
- uses: mheap/github-action-required-labels@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
mode: minimum
count: 1
labels: "0 diff,0 diff trivial,Non 0-diff,0 diff structural,0-diff trivial,Not 0-diff,0-diff,automatic,0-diff uncoupled"
labels: "0 diff,0 diff trivial,Non 0-diff,0 diff structural,0-diff trivial,Not 0-diff,0-diff,automatic,0-diff uncoupled,github_actions"
add_comment: true
message: "This PR is being prevented from merging because you have not added one of our required labels: {{ provided }}. Please add one so that the PR can be merged."

blocking-label:
runs-on: ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@v2
- uses: mheap/github-action-required-labels@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
mode: exactly
count: 0
labels: "Contingent - DNA,Needs Lead Approval,Contingent -- Do Not Approve"
add_comment: true
message: "This PR is being prevented from merging because you have added one of our blocking labels: {{ provided }}. You'll need to remove it before this PR can be merged."
2 changes: 1 addition & 1 deletion .github/workflows/push-to-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.2.0
with:
fetch-depth: 0
- name: Run the action
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.2.0
with:
fetch-depth: 0
- name: Run the action
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.2.0
with:
path: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}

- name: Checkout mepo
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.2.0
with:
repository: GEOS-ESM/mepo
path: mepo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger-circleci-pipeline-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ jobs:
steps:
- name: CircleCI Trigger on Release
id: docker-build
uses: CircleCI-Public/[email protected].5
uses: CircleCI-Public/[email protected].6
env:
CCI_TOKEN: ${{ secrets.CCI_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/validate_yaml_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
validate-YAML:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v3.2.0
- id: yaml-lint
name: yaml-lint
uses: ibiqlik/action-yamllint@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.2.0
with:
fetch-depth: 1
- name: Set all directories as git safe
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3.1.0
uses: actions/checkout@v3.2.0
with:
fetch-depth: 1
- name: Set all directories as git safe
Expand Down
4 changes: 2 additions & 2 deletions Apps/MAPL_GridCompSpecs_ACG.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ def get_mandatory_options(cls):
'SHORT_NAME': ('short_name', mangle_name, True),
'NAME': ('short_name', mangle_name, True),
'DIMS': ('dims', DIMS_EMIT, True),
'LONG_NAME': ('long_name', string_emit, True),
'LONG NAME': ('long_name', string_emit, True),
'LONG_NAME': ('long_name', mangle_name, True),
'LONG NAME': ('long_name', mangle_name, True),
'UNITS': ('units', string_emit, True),
# OPTIONAL
'ADD2EXPORT': ('add2export', ADD2EXPORT_EMIT),
Expand Down
29 changes: 27 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Fixed procedure "find" in CFIOCollection.F90 that was missing a _RETURN(_SUCCESS) at the end

### Removed

### Deprecated

## [2.34.0] - 2023-01-05

### Added

- Added `MAPL_find_bounds => find_bounds` and `MAPL_Interval => Interval` to `MAPL.F90` for use when doing component level OpenMP
- Added requirement for ESMF 8.4.0 in `find_package()` call
- Modified Apps/MAPL_GridCompSpecs_ACG.py to use the * capability for `LONG_NAME` like `SHORT_NAME`
- Added CMake code to apply stricter debug flags when building MAPL as Debug
- Added subroutine MAPL_MethodAdd to MAPL_Generic.F90
- Added subroutines get_callbacks and copy_callbacks to OpenMP_Support.F90
- These added subroutines are to support "callback" procedures when inside OpenMP parallel region for mini states for component level threading.
- Added ability to expand "%d" in the long name when we split fields for History

### Changed

- Update `components.yaml`
- ESMA_cmake v3.24.0 (defines stricter debug flags for Intel, preliminary support for `ifx`)
- Reduced amount of CI tests to reduce cost
- Added `message` to label enforcer (requires v3)
- Fixed the naming convention of the split field name (#1874)
- NOTE: This could change the name of any field in HISTORY using field splitting. The data will be the same, but the name will be
different.

### Fixed

- Fixed procedure "find" in CFIOCollection.F90 that was missing a `_RETURN(_SUCCESS)` at the end

## [2.33.0] - 2022-12-08

### Added
Expand Down
31 changes: 29 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_policy (SET CMP0054 NEW)

project (
MAPL
VERSION 2.33.0
VERSION 2.34.0
LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF

# Set the default build type to release
Expand Down Expand Up @@ -143,7 +143,7 @@ if (NOT Baselibs_FOUND)
endif()

if (NOT TARGET esmf)
find_package(ESMF MODULE REQUIRED)
find_package(ESMF 8.4.0 MODULE REQUIRED)

# ESMF as used in MAPL requires MPI
# NOTE: This looks odd because some versions of FindESMF.cmake out in the
Expand All @@ -160,6 +160,33 @@ if (NOT Baselibs_FOUND)
endif ()
endif ()

# We wish to add extra flags when compiling as Debug. We should only
# do this if we are using esma_cmake since the flags are defined
# there. Note that some flags like STANDARD_F18 might be available on
# all compilers, but others might only be needed for, say, Intel, since,
# for example, GNU does not allow if(integer) no matter what
if (COMMAND esma)
set (STRICT_DEBUG_FLAGS
${STANDARD_F18}
${ERROR_IF_INTEGER}
${ERROR_LOGICAL_SET_TO_INTEGER}
${DISABLE_LONG_LINE_LENGTH_WARNING}
)

# Are we compiling Fortran?
set (is_fortran "$<COMPILE_LANGUAGE:Fortran>")
# and is our build type Debug?
set (is_build_type_debug "$<STREQUAL:${CMAKE_BUILD_TYPE},Debug>")
# set the logical AND
set (meets_requirements "$<AND:${is_fortran},${is_build_type_debug}>")

foreach (flag ${STRICT_DEBUG_FLAGS})
# We use SHELL to avoid de-duplication and preserve spaces:
# https://cmake.org/cmake/help/latest/command/target_compile_options.html?highlight=target_compile_options#option-de-duplication
add_compile_options("SHELL:$<${meets_requirements}:${flag}>")
endforeach ()
endif ()

if (BUILD_WITH_PFLOGGER)
add_definitions(-DBUILD_WITH_PFLOGGER)
else ()
Expand Down
2 changes: 2 additions & 0 deletions MAPL/MAPL.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ module MAPL
use MAPL_ESMFFieldBundleWrite
use MAPL_OpenMP_Support, only : MAPL_get_current_thread => get_current_thread
use MAPL_OpenMP_Support, only : MAPL_get_num_threads => get_num_threads
use MAPL_OpenMP_Support, only : MAPL_find_bounds => find_bounds
use MAPL_OpenMP_Support, only : MAPL_Interval => Interval
use MAPL_Profiler, initialize_profiler =>initialize, finalize_profiler =>finalize
implicit none
end module MAPL
Expand Down
Loading

0 comments on commit 14b9789

Please sign in to comment.