Skip to content

Commit

Permalink
Merge branch 'main' into feature/adarmenov/#208-wmma
Browse files Browse the repository at this point in the history
  • Loading branch information
adarmenov committed Feb 24, 2022
2 parents a46088c + c534a42 commit 12926ff
Show file tree
Hide file tree
Showing 27 changed files with 1,532 additions and 135 deletions.
115 changes: 75 additions & 40 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,99 @@
version: 2.1

executors:
gcc-build-env:
docker:
- image: gmao/ubuntu20-geos-env-mkl:v6.0.22-openmpi_4.0.5-gcc_10.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
#XLARGE# resource_class: xlarge
resource_class: medium
orbs:
circleci-tools: geos-esm/[email protected]

workflows:
version: 2.1
build-test:
jobs:
- build-GEOSgcm:
name: build-GEOSgcm-on-<< matrix.compiler >>
matrix:
parameters:
compiler: [gfortran, ifort]
context:
- docker-hub-creds
##################################################
# - run-gcm-exp: #
# name: run-gcm-exp-on-<< matrix.compiler >> #
# matrix: #
# parameters: #
# compiler: [gfortran, ifort] #
# context: #
# - docker-hub-creds #
# requires: #
# - build-GEOSgcm-on-<< matrix.compiler >> #
##################################################

jobs:
build-GEOSgcm:
executor: gcc-build-env
parameters:
compiler:
type: string
executor:
name: circleci-tools/<< parameters.compiler >>
resource_class: large
working_directory: /root/project
steps:
- checkout:
path: GEOSgcm
- circleci-tools/versions:
compiler: << parameters.compiler >>
- circleci-tools/mepoclone
- circleci-tools/checkout_if_exists
- circleci-tools/cmake:
compiler: << parameters.compiler >>
- circleci-tools/buildinstall
- circleci-tools/compress_artifacts
- store_artifacts:
path: /logfiles
# We need to persist the install for the next step
# but only if we are running gcm tests
###########################
# - persist_to_workspace: #
# root: workspace #
# paths: #
# - install-GEOSgcm #
###########################

run-gcm-exp:
parameters:
compiler:
type: string
executor: << parameters.compiler >>-xlarge
working_directory: /root/project
steps:
- attach_workspace:
at: workspace
- run:
name: "Versions etc"
command: mpirun --version && gfortran --version && echo $BASEDIR && pwd && ls
- run:
name: "Mepo clone external repos"
name: "Run gcm_setup"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/GEOSgcm
mepo clone
mepo develop GEOSgcm_App GEOSgcm_GridComp
mepo status
cd ${CIRCLE_WORKING_DIRECTORY}/workspace/install-GEOSgcm/bin
/TinyBCs-GitV10/scripts/create_expt.py test-gcm-c12 --expdir ${CIRCLE_WORKING_DIRECTORY}/workspace
- run:
name: "Mepo checkout-if-exists"
name: "Run makeoneday"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/GEOSgcm
echo "${CIRCLE_BRANCH}"
if [ "${CIRCLE_BRANCH}" != "develop" ] && [ "${CIRCLE_BRANCH}" != "master" ] && [ "${CIRCLE_BRANCH}" != "main" ]
then
mepo checkout-if-exists ${CIRCLE_BRANCH}
fi
mepo status
cd ${CIRCLE_WORKING_DIRECTORY}/workspace/test-gcm-c12
/TinyBCs-GitV10/scripts/makeoneday.bash 6hr nxy 1 6
- run:
name: "CMake"
name: "Run gcm_run.j"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/GEOSgcm
mkdir build
cd build
cmake .. -DBASEDIR=$BASEDIR/Linux -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_BUILD_TYPE=Debug
cd ${CIRCLE_WORKING_DIRECTORY}/workspace/test-gcm-c12
mkdir -p /logfiles
./gcm_run.j |& tee /logfiles/gcm_run.log
- run:
name: "Build"
name: "Check for EGRESS"
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/GEOSgcm/build
#XLARGE# make -j"$(nproc)" install
make -j4 install
cd ${CIRCLE_WORKING_DIRECTORY}/workspace/test-gcm-c12
SCRDIR=$(find . -type d -name 'scratch*')
if [[ -f $SCRDIR/EGRESS ]]
then
echo "EGRESS found!"
else
echo "EGRESS not found!"
exit 1
fi
- store_artifacts:
path: /logfiles
11 changes: 7 additions & 4 deletions .codebuild/buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,25 @@ phases:
# This phase is weirdly named for a Fortran project
install:
commands:
- mpirun --version && gfortran --version && echo $BASEDIR && pwd && ls
- mpirun --version && ifort --version && echo $BASEDIR && pwd && ls
finally:
- echo "versions etc"
pre_build:
commands:
- git status
- git branch
- echo CODEBUILD_RESOLVED_SOURCE_VERSION is ${CODEBUILD_RESOLVED_SOURCE_VERSION}
- git checkout ${CODEBUILD_RESOLVED_SOURCE_VERSION}
- mepo init
- mepo clone
- mepo develop GEOSgcm_App GEOSgcm_GridComp
- mepo status
finally:
- echo "Mepo clone external repos"
# This phase builds it
build:
commands: |
mkdir build
cd build
cmake .. -DBASEDIR=$BASEDIR/Linux -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_BUILD_TYPE=Debug -DUSE_F2PY=OFF
cmake .. -DBASEDIR=$BASEDIR/Linux -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_BUILD_TYPE=Debug -DUSE_F2PY=OFF
cd build
make -j"$(nproc)" install
finally:
Expand Down
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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
10 changes: 5 additions & 5 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

# The GCM gatekeepers and CMake should know/approve these
/.github/ @GEOS-ESM/cmake-team @GEOS-ESM/gcm-gatekeepers
/.circleci/ @GEOS-ESM/cmake-team @GEOS-ESM/gcm-gatekeepers
/.codebuild/ @GEOS-ESM/cmake-team @GEOS-ESM/gcm-gatekeepers
/.circleci/ @GEOS-ESM/cmake-team @GEOS-ESM/gcm-gatekeepers
/.codebuild/ @GEOS-ESM/cmake-team @GEOS-ESM/gcm-gatekeepers

# The GEOS CMake Team is the CODEOWNER for the CMakeLists.txt files in this repository
CMakeLists.txt @GEOS-ESM/cmake-team
# The GEOS CMake Team should be notified about changes to the CMakeLists.txt files in this repository
CMakeLists.txt @GEOS-ESM/cmake-team @GEOS-ESM/gcm-gatekeepers

# The GEOS CMake Team should be notified about and approve config changes
/config/ @GEOS-ESM/cmake-team
/config/ @GEOS-ESM/cmake-team @GEOS-ESM/gcm-gatekeepers
38 changes: 38 additions & 0 deletions .github/workflows/release-tarball.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Create Complete Release Tarball

on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest

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

- name: Checkout mepo
uses: actions/checkout@v2
with:
repository: GEOS-ESM/mepo
path: mepo

- name: Run mepo
run : |
cd ${GITHUB_WORKSPACE}/${{ github.event.repository.name }}-${{ github.event.release.tag_name }}
${GITHUB_WORKSPACE}/mepo/mepo clone
- name: Create tarball
run: |
tar --exclude-vcs --exclude=.mepo -cf ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.COMPLETE.tar ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}
xz -T6 ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.COMPLETE.tar
- name: Upload tarball
run: |
gh release upload ${{ github.event.release.tag_name }} ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.COMPLETE.tar.xz -R ${{ github.repository_owner }}/${{ github.event.repository.name }}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

21 changes: 12 additions & 9 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,28 @@ name: Build Tests

on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
types: [opened, synchronize, reopened]
# Do not run if the only files changed cannot affect the build
paths-ignore:
- "**.md"
- "**.json"
- "ChangeLog-PreJason.txt"
- "parallel_build.csh"
- ".github/CODEOWNERS"
- ".codebuild/**"
- ".circleci/**"

jobs:
build_gcm:
name: Build GEOSgcm
if: "!contains(github.event.pull_request.labels.*.name, '0 diff trivial')"
runs-on: ubuntu-latest
container:
image: gmao/ubuntu20-geos-env-mkl:v6.0.22-openmpi_4.0.5-gcc_10.2.0
image: gmao/ubuntu20-geos-env-mkl:v6.2.8-openmpi_4.0.6-gcc_11.2.0
credentials:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
env:
LANGUAGE: en_US.UTF-8
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
LC_TYPE: en_US.UTF-8
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_btl_vader_single_copy_mechanism: none
Expand All @@ -40,8 +45,6 @@ jobs:
run: |
mepo clone
mepo status
mepo develop GEOSgcm_GridComp GEOSgcm_App
mepo status
- name: Update other branches
if:
"!contains('refs/heads/main,refs/heads/develop', github.ref)"
Expand All @@ -52,7 +55,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DBASEDIR=$BASEDIR/Linux -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_BUILD_TYPE=Debug -DMPIEXEC_PREFLAGS='--oversubscribe'
cmake .. -DBASEDIR=$BASEDIR/Linux -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_BUILD_TYPE=Debug -DMPIEXEC_PREFLAGS='--oversubscribe' -DUSE_F2PY=OFF
- name: Build
run: |
cd build
Expand Down
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
*~
/@cmake/
/@modules/
/cmake/
/cmake@/
/@env/
/BUILD/
/build*/
/install*/
/env/
/env@/
/.mepo/
parallel_build.o*
log.*
CMakeUserPresets.json
Loading

0 comments on commit 12926ff

Please sign in to comment.