Skip to content

Commit

Permalink
Merge pull request #556 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
Sync develop into main
  • Loading branch information
sdrabenh authored Feb 28, 2022
2 parents ae3cf7c + b95d148 commit cb754a3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 148 deletions.
157 changes: 11 additions & 146 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,7 @@
version: 2.1

executors:
gfortran:
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
MPIEXEC_PREFLAGS: --oversubscribe
resource_class: large
#MEDIUM# resource_class: medium

ifort:
docker:
- image: gmao/ubuntu20-geos-env:v6.2.8-intelmpi_2021.2.0-intel_2021.2.0
auth:
username: $DOCKERHUB_USER
password: $DOCKERHUB_AUTH_TOKEN
resource_class: large
#MEDIUM# resource_class: medium
orbs:
circleci-tools: geos-esm/[email protected]

workflows:
build-test:
Expand All @@ -35,136 +14,22 @@ workflows:
context:
- docker-hub-creds

commands:
versions:
description: "Versions, etc."
parameters:
compiler:
type: string
steps:
- run:
name: "Versions, etc."
command: mpirun --version && << parameters.compiler >> --version && echo $BASEDIR && pwd && ls && echo "$(nproc)"

compress_artifacts:
description: "Compress artifacts"
steps:
- run:
name: "Compress artifacts"
command: |
gzip -9 /logfiles/*
checkout_fixture:
description: "Checkout fixture"
parameters:
repo:
type: string
steps:
- run:
name: "Checkout fixture"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}
git clone https://github.com/GEOS-ESM/<< parameters.repo >>.git
mepoclone:
description: "Mepo clone external repos"
parameters:
repo:
type: string
steps:
- run:
name: "Mepo clone external repos"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/<< parameters.repo >>
mepo clone
mepo status
mepodevelop:
description: "Mepo develop GEOSgcm_GridComp GEOSgcm_App GMAO_Shared"
parameters:
repo:
type: string
steps:
- run:
name: "Mepo develop GEOSgcm_GridComp GEOSgcm_App GMAO_Shared"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/<< parameters.repo >>
mepo develop GEOSgcm_GridComp GEOSgcm_App GMAO_Shared
mepo status
checkout_feature_branch:
description: "Mepo checkout-if-exists feature branch"
parameters:
repo:
type: string
steps:
- run:
name: "Mepo checkout-if-exists feature branch"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/<< parameters.repo >>
echo "${CIRCLE_BRANCH}"
if [ "${CIRCLE_BRANCH}" != "develop" ] && [ "${CIRCLE_BRANCH}" != "main" ]
then
mepo checkout-if-exists ${CIRCLE_BRANCH}
fi
mepo status
cmake:
description: "Run CMake"
parameters:
repo:
type: string
compiler:
type: string
steps:
- run:
name: "Build and install"
command: |
mkdir -p /logfiles
cd ${CIRCLE_WORKING_DIRECTORY}/<< parameters.repo >>
mkdir -p ${CIRCLE_WORKING_DIRECTORY}/workspace/build-<< parameters.repo >>
cd ${CIRCLE_WORKING_DIRECTORY}/workspace/build-<< parameters.repo >>
cmake ${CIRCLE_WORKING_DIRECTORY}/<< parameters.repo >> -DBASEDIR=$BASEDIR/Linux -DCMAKE_Fortran_COMPILER=<< parameters.compiler >> -DCMAKE_BUILD_TYPE=Debug -DUSE_F2PY=OFF -DMPIEXEC_PREFLAGS=${MPIEXEC_PREFLAGS} -DCMAKE_INSTALL_PREFIX=${CIRCLE_WORKING_DIRECTORY}/workspace/install-<< parameters.repo >> |& tee /logfiles/cmake.log
buildinstall:
description: "Build and install"
parameters:
repo:
type: string
steps:
- run:
name: "Build and install"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/workspace/build-<< parameters.repo >>
make -j"$(nproc)" install |& tee /logfiles/make.log
#MEDIUM# make -j4 install |& tee /logfiles/make.log
jobs:
build-GEOSgcm:
parameters:
compiler:
type: string
executor: << parameters.compiler >>
executor: circleci-tools/<< parameters.compiler >>
working_directory: /root/project
steps:
- run:
name: "GEOSgcm_GridComp branch"
command: echo ${CIRCLE_BRANCH}
- checkout_fixture:
repo: GEOSgcm
- versions:
- circleci-tools/checkout_fixture
- circleci-tools/mepoclone
- circleci-tools/mepodevelop
- circleci-tools/checkout_if_exists
- circleci-tools/cmake:
compiler: << parameters.compiler >>
- mepoclone:
repo: GEOSgcm
- mepodevelop:
repo: GEOSgcm
- checkout_feature_branch:
repo: GEOSgcm
- cmake:
repo: GEOSgcm
compiler: << parameters.compiler >>
- buildinstall:
repo: GEOSgcm
- compress_artifacts
- circleci-tools/buildinstall
- circleci-tools/compress_artifacts
- store_artifacts:
path: /logfiles

Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@ SUBROUTINE read_bcs_data (ntiles, SURFLAY,MODEL, DataDir, InRestart, rc)
if(clm45) then
open(unit=30, file=trim(DataDir)//'CLM4.5_abm_peatf_gdp_hdm_fc' ,form='formatted')
do n=1,ntiles
read (30,'(2I10, i3, f8.4, f8.2, f10.2, f8.4)' ) i, j, abm(n), peatf(n), &
read (30, *) i, j, abm(n), peatf(n), &
gdp(n), hdm(n), fc(n)
end do
CLOSE (30, STATUS = 'KEEP')
Expand Down Expand Up @@ -1478,7 +1478,7 @@ SUBROUTINE read_bcs_data (ntiles, SURFLAY,MODEL, DataDir, InRestart, rc)
read (29, *) i,j, CLMC45_pt1(n), CLMC45_pt2(n), CLMC45_st1(n), CLMC45_st2(n), &
CLMC45_pf1(n), CLMC45_pf2(n), CLMC45_sf1(n), CLMC45_sf2(n)

read (30,'(2I10, i3, f8.4, f8.2, f10.2, f8.4)' ) i, j, abm(n), peatf(n), &
read (30, *) i, j, abm(n), peatf(n), &
gdp(n), hdm(n), fc(n)
endif
endif
Expand Down

0 comments on commit cb754a3

Please sign in to comment.