Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CircleCI CI to use Orb. Update components #123

Merged
merged 4 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 41 additions & 69 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,92 +1,64 @@
version: 2.1

executors:
gcc-build-env:
docker:
- image: gmao/ubuntu20-geos-env-mkl:v6.2.8-openmpi_4.0.6-gcc_11.2.0
auth:
username: $DOCKERHUB_USER
password: $DOCKERHUB_AUTH_TOKEN
environment:
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_btl_vader_single_copy_mechanism: none
resource_class: large
#MEDIUM# resource_class: medium
orbs:
circleci-tools: geos-esm/circleci-tools@0.13.0

workflows:
version: 2.1
build-and-test:
jobs:
- build-GOCART2G:
name: build-GOCART2G-on-<< matrix.compiler >>
matrix:
parameters:
compiler: [gfortran, ifort]
context:
- docker-hub-creds
- build-GEOSgcm:
name: build-GEOSgcm-on-<< matrix.compiler >>
matrix:
parameters:
compiler: [gfortran, ifort]
context:
- docker-hub-creds

jobs:
build-GOCART2G:
executor: gcc-build-env
parameters:
compiler:
type: string
executor: circleci-tools/<< parameters.compiler >>
working_directory: /root/project
steps:
- checkout:
path: GOCART
- run:
name: "Versions etc"
command: mpirun --version && gfortran --version && echo $BASEDIR && pwd && ls
- run:
name: "Mepo clone external repos"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/GOCART
mepo clone
mepo status
- run:
name: "CMake"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/GOCART
mkdir build
cd build
cmake .. -DBASEDIR=$BASEDIR/Linux -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_BUILD_TYPE=Debug -DUSE_F2PY=OFF -DMPIEXEC_PREFLAGS='--oversubscribe'
- run:
name: "Build GOCART2G_GridComp"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/GOCART/build
make -j"$(nproc)" GOCART2G_GridComp
#MEDIUM# make -j4 GOCART2G_GridComp
- circleci-tools/versions:
compiler: << parameters.compiler >>
- circleci-tools/mepoclone:
repo: GOCART
- circleci-tools/cmake:
repo: GOCART
compiler: << parameters.compiler >>
- circleci-tools/buildtarget:
repo: GOCART
target: GOCART2G_GridComp
- circleci-tools/compress_artifacts
- store_artifacts:
path: /logfiles

build-GEOSgcm:
executor: gcc-build-env
parameters:
compiler:
type: string
executor: circleci-tools/<< parameters.compiler >>
working_directory: /root/project
steps:
- run:
name: "Checkout GEOSgcm fixture"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}
git clone https://github.com/GEOS-ESM/GEOSgcm.git
- run:
name: "Mepo clone external repos"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/GEOSgcm
mepo clone
mepo develop GEOSgcm_GridComp GEOSgcm_App
mepo status
- run:
name: "Mepo checkout GOCART branch(es)"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/GEOSgcm
mepo checkout-if-exists ${CIRCLE_BRANCH}
mepo status
- run:
name: "CMake"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/GEOSgcm
mkdir build
cd build
cmake .. -DBASEDIR=$BASEDIR/Linux -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${CIRCLE_WORKING_DIRECTORY}/workspace/install-GEOSgcm -DUSE_F2PY=OFF
- run:
name: "Build and install"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/GEOSgcm/build
make -j"$(nproc)" install
#MEDIUM# make -j4 install
- circleci-tools/checkout_fixture
- circleci-tools/mepoclone
- circleci-tools/mepodevelop
- circleci-tools/checkout_if_exists
- circleci-tools/cmake:
compiler: << parameters.compiler >>
- circleci-tools/buildinstall
- circleci-tools/compress_artifacts
- store_artifacts:
path: /logfiles
32 changes: 32 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Global Editor Config for MAPL
#
# This is an ini style configuration. See http://editorconfig.org/ for more information on this file.
#
# Top level editor config.
root = true

# Always use Unix style new lines with new line ending on every file and trim whitespace
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# Python: PEP8 defines 4 spaces for indentation
[*.py]
indent_style = space
indent_size = 4

# YAML format, 2 spaces
[{*.yaml,*.yml}]
indent_style = space
indent_size = 2

# CMake (from KitWare: https://github.com/Kitware/CMake/blob/master/.editorconfig)
[{CMakeLists.txt,*.cmake,*.rst}]
indent_style = space
indent_size = 2

# Markdown
[*.md]
trim_trailing_whitespace = true
indent_style = space
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
### Added

- Add `.editorconfig` file
- This matches the styles currently used in MAPL (2 space indents in CMake and yaml, 4 spaces for Python)

### Changed
- Updated the CircleCI to use circleci-tools 0.13.0 orb
- Moves CI to use Baselibs 6.2.13 needed by MAPL development
- Update `components.yaml` to be in line with GEOSgcm v10.22.0
- Updates to support Spack
- Changed the handling of state variable names in multiple instances of component (see Issue #93)
- Major refactoring of Mie table class. (see Issue #96)
Expand All @@ -26,7 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Added AMIP.20C ExtData configs to allow AMIP GOCART runs to work before Y2000 (during the transition from HFED to QFED)
- Note 1: This is not a *new* scenario but rather a stopgap until Extdata is updated to allow time ranges to be specified.
- Note 1: This is not a *new* scenario but rather a stopgap until Extdata is updated to allow time ranges to be specified.
- Note 2: Temporarily, this will allow runs before Y2000 using magic-data scripting in `gcm_run.j` (a la MERRA2 in GOCART1).

### Fixed
Expand Down
12 changes: 6 additions & 6 deletions components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,34 @@ GOCART:
env:
local: ./env@
remote: ../ESMA_env.git
tag: v3.4.0
tag: v3.11.0
develop: main

cmake:
local: ./cmake@
remote: ../ESMA_cmake.git
tag: v3.6.2
tag: v3.10.0
develop: develop

ecbuild:
local: ./cmake@/ecbuild@
remote: ../ecbuild.git
tag: geos/v1.0.6
tag: geos/v1.2.0

HEMCO:
local: ./ESMF/HEMCO_GridComp@
remote: ../HEMCO.git
branch: geos/v2.2.1
branch: geos/v2.2.2

GMAO_Shared:
local: ./ESMF/Shared/GMAO_Shared@
remote: ../GMAO_Shared.git
tag: v1.4.10
tag: v1.5.1
sparse: ./config/GMAO_Shared.sparse
develop: main

MAPL:
local: ./ESMF/Shared/MAPL@
remote: ../MAPL.git
tag: v2.8.6
tag: v2.18.0
develop: develop