From 4e32aed17f1c92dbeb251f0897673aed1d1df0f9 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 23 Dec 2022 12:22:45 -0700 Subject: [PATCH 01/17] update workflow to use actions from cdeps --- .github/workflows/extbuild.yml | 108 ++++++++++++--------------------- 1 file changed, 39 insertions(+), 69 deletions(-) diff --git a/.github/workflows/extbuild.yml b/.github/workflows/extbuild.yml index b0b01f785..97d34f96e 100644 --- a/.github/workflows/extbuild.yml +++ b/.github/workflows/extbuild.yml @@ -19,77 +19,30 @@ jobs: CXX: mpicxx CPPFLAGS: "-I/usr/include -I/usr/local/include" # Versions of all dependencies can be updated here - ESMF_VERSION: v8.3.0b13 - PNETCDF_VERSION: pnetcdf-1.12.3 - NETCDF_FORTRAN_VERSION: v4.5.2 - PIO_VERSION: pio2_5_7 + ESMF_VERSION: v8.4.0 + PNETCDF_VERSION: checkpoint.1.12.3 + NETCDF_FORTRAN_VERSION: v4.6.0 + PIO_VERSION: pio2_5_10 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Build the ESMF library, if the cache contains a previous build # it will be used instead - id: cache-esmf - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/ESMF key: ${{ runner.os }}-${{ env.ESMF_VERSION }}-ESMF - - id: load-env - run: | - sudo apt-get update - sudo apt-get install gfortran wget openmpi-bin netcdf-bin libopenmpi-dev libnetcdf-dev - - id: checkout-ESMF - uses: actions/checkout@v3 - with: - repository: esmf-org/esmf - path: esmf-src - ref: ${{ env.ESMF_VERSION }} - - id: build-ESMF - if: steps.cache-esmf.outputs.cache-hit != 'true' - run: | - #wget https://github.com/esmf-org/esmf/archive/${{ env.ESMF_VERSION }}.tar.gz - #tar -xzvf ${{ env.ESMF_VERSION }}.tar.gz - #pushd esmf-${{ env.ESMF_VERSION }} - pushd esmf-src - export ESMF_DIR=`pwd` - export ESMF_COMM=openmpi - export ESMF_YAMLCPP="internal" - export ESMF_INSTALL_PREFIX=$HOME/ESMF - export ESMF_BOPT=g - make - make install - popd - id: cache-pnetcdf uses: actions/cache@v2 with: path: ~/pnetcdf key: ${{ runner.os }}-${{ env.PNETCDF_VERSION}}-pnetcdf - - name: pnetcdf build - if: steps.cache-pnetcdf.outputs.cache-hit != 'true' - run: | - wget https://parallel-netcdf.github.io/Release/${{ env.PNETCDF_VERSION }}.tar.gz - tar -xzvf ${{ env.PNETCDF_VERSION }}.tar.gz - ls -l - pushd ${{ env.PNETCDF_VERSION }} - ./configure --prefix=$HOME/pnetcdf --enable-shared --disable-cxx - make - make install - popd - name: Cache netcdf-fortran id: cache-netcdf-fortran uses: actions/cache@v2 with: path: ~/netcdf-fortran key: ${{ runner.os }}-${{ env.NETCDF_FORTRAN_VERSION }}-netcdf-fortran - - name: netcdf fortran build - if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true' - run: | - wget https://github.com/Unidata/netcdf-fortran/archive/${{ env.NETCDF_FORTRAN_VERSION }}.tar.gz - tar -xzvf ${{ env.NETCDF_FORTRAN_VERSION }}.tar.gz - ls -l - pushd netcdf-fortran-* - ./configure --prefix=$HOME/netcdf-fortran - make - make install - - name: Cache PIO id: cache-PIO uses: actions/cache@v2 @@ -99,23 +52,40 @@ jobs: restore-keys: | ${{ runner.os }}-${{ env.NETCDF_FORTRAN_VERSION }}-netcdf-fortran ${{ runner.os }}-${{ env.PNETCDF_VERSION }}-pnetcdf - - - id: checkout-PIO - uses: actions/checkout@v3 + - name: Build PNetCDF + if: steps.cache-pnetcdf.outputs.cache-hit != 'true' + uses: ESCOMP/CDEPS/.github/actions/buildpnetcdf@e06246b with: - repository: NCAR/ParallelIO - path: parallelio-src - ref: ${{ env.PIO_VERSION }} - - name: Build PIO - if: steps.cache-PIO.outputs.cache-hit != 'true' - run: | - mkdir build-pio - pushd build-pio - cmake -Wno-dev -DNetCDF_C_LIBRARY=/usr/lib/x86_64-linux-gnu/libnetcdf.so -DNetCDF_C_INCLUDE_DIR=/usr/include -DCMAKE_PREFIX_PATH=/usr -DCMAKE_INSTALL_PREFIX=$HOME/pio -DPIO_HDF5_LOGGING=On -DPIO_USE_MALLOC=On -DPIO_ENABLE_TESTS=Off -DPIO_ENABLE_LOGGING=On -DPIO_ENABLE_EXAMPLES=Off -DPIO_ENABLE_TIMING=Off -DNetCDF_Fortran_PATH=$HOME/netcdf-fortran -DPnetCDF_PATH=$HOME/pnetcdf ../parallelio-src - make VERBOSE=1 - make install - popd - + pnetcdf_version: ${{ env.PNETCDF_VERSION }} + install_prefix: $HOME/pnetcdf + - name: Build NetCDF Fortran + if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true' + uses: ESCOMP/CDEPS/.github/actions/buildnetcdff@e06246b + with: + netcdf_fortran_version: ${{ env.NETCDF_FORTRAN_VERSION }} + install_prefix: $HOME/netcdf-fortran + netcdf_c_path: /usr + - name: Build ParallelIO + if: steps.cache-PARALLELIO.outputs.cache-hit != 'true' + uses: ESCOMP/CDEPS/.github/actions/buildpio@e06246b + with: + parallelio_version: ${{ env.ParallelIO_VERSION }} + netcdf_c_path: /usr + netcdf_fortran_path: $HOME/netcdf-fortran + pnetcdf_path: $HOME/pnetcdf + install_prefix: $HOME/pio + - name: Build ESMF + if: steps.cache-esmf.outputs.cache-hit != 'true' + uses: ESCOMP/CDEPS/.github/actions/buildesmf@e06246b + with: + esmf_version: ${{ env.ESMF_VERSION }} + esmf_bopt: g + esmf_comm: openmpi + install_prefix: $HOME/ESMF + netcdf_c_path: /usr + netcdf_fortran_path: $HOME/netcdf-fortran + pnetcdf_path: $HOME/pnetcdf + parallelio_path: $HOME/pio - name: Build CMEPS run: | export ESMFMKFILE=$HOME/ESMF/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk From 75903415d52afff402d1fa68dd378ea15836163e Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 23 Dec 2022 12:25:05 -0700 Subject: [PATCH 02/17] needs full SHA --- .github/workflows/extbuild.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/extbuild.yml b/.github/workflows/extbuild.yml index 97d34f96e..153bb48bc 100644 --- a/.github/workflows/extbuild.yml +++ b/.github/workflows/extbuild.yml @@ -54,20 +54,20 @@ jobs: ${{ runner.os }}-${{ env.PNETCDF_VERSION }}-pnetcdf - name: Build PNetCDF if: steps.cache-pnetcdf.outputs.cache-hit != 'true' - uses: ESCOMP/CDEPS/.github/actions/buildpnetcdf@e06246b + uses: ESCOMP/CDEPS/.github/actions/buildpnetcdf@e06246b560d3132170bb1a5443fa3d65dfbd2040 with: pnetcdf_version: ${{ env.PNETCDF_VERSION }} install_prefix: $HOME/pnetcdf - name: Build NetCDF Fortran if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true' - uses: ESCOMP/CDEPS/.github/actions/buildnetcdff@e06246b + uses: ESCOMP/CDEPS/.github/actions/buildnetcdff@e06246b560d3132170bb1a5443fa3d65dfbd2040 with: netcdf_fortran_version: ${{ env.NETCDF_FORTRAN_VERSION }} install_prefix: $HOME/netcdf-fortran netcdf_c_path: /usr - name: Build ParallelIO if: steps.cache-PARALLELIO.outputs.cache-hit != 'true' - uses: ESCOMP/CDEPS/.github/actions/buildpio@e06246b + uses: ESCOMP/CDEPS/.github/actions/buildpio@e06246b560d3132170bb1a5443fa3d65dfbd2040 with: parallelio_version: ${{ env.ParallelIO_VERSION }} netcdf_c_path: /usr @@ -76,7 +76,7 @@ jobs: install_prefix: $HOME/pio - name: Build ESMF if: steps.cache-esmf.outputs.cache-hit != 'true' - uses: ESCOMP/CDEPS/.github/actions/buildesmf@e06246b + uses: ESCOMP/CDEPS/.github/actions/buildesmf@e06246b560d3132170bb1a5443fa3d65dfbd2040 with: esmf_version: ${{ env.ESMF_VERSION }} esmf_bopt: g From 64f71d766e9e364017651076f393ae6555c6c76c Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 23 Dec 2022 12:29:09 -0700 Subject: [PATCH 03/17] need to setup environment --- .github/workflows/extbuild.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/extbuild.yml b/.github/workflows/extbuild.yml index 153bb48bc..034527889 100644 --- a/.github/workflows/extbuild.yml +++ b/.github/workflows/extbuild.yml @@ -27,6 +27,10 @@ jobs: - uses: actions/checkout@v3 # Build the ESMF library, if the cache contains a previous build # it will be used instead + - id: load-env + run: | + sudo apt-get update + sudo apt-get install gfortran wget openmpi-bin netcdf-bin libopenmpi-dev libnetcdf-dev autotools-dev autoconf - id: cache-esmf uses: actions/cache@v3 with: From 238b861f6c9c998107068d17cf8c5aa6f5d227dd Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 23 Dec 2022 13:13:16 -0700 Subject: [PATCH 04/17] add scripts_regression_tests to workflow --- .github/workflows/extbuild.yml | 6 +- .github/workflows/srt.yml | 137 ++++++++++++++++----------------- 2 files changed, 68 insertions(+), 75 deletions(-) diff --git a/.github/workflows/extbuild.yml b/.github/workflows/extbuild.yml index 034527889..35b9a1a3d 100644 --- a/.github/workflows/extbuild.yml +++ b/.github/workflows/extbuild.yml @@ -47,8 +47,8 @@ jobs: with: path: ~/netcdf-fortran key: ${{ runner.os }}-${{ env.NETCDF_FORTRAN_VERSION }}-netcdf-fortran - - name: Cache PIO - id: cache-PIO + - name: Cache ParallelIO + id: cache-ParallelIO uses: actions/cache@v2 with: path: ~/pio @@ -70,7 +70,7 @@ jobs: install_prefix: $HOME/netcdf-fortran netcdf_c_path: /usr - name: Build ParallelIO - if: steps.cache-PARALLELIO.outputs.cache-hit != 'true' + if: steps.cache-ParallelIO.outputs.cache-hit != 'true' uses: ESCOMP/CDEPS/.github/actions/buildpio@e06246b560d3132170bb1a5443fa3d65dfbd2040 with: parallelio_version: ${{ env.ParallelIO_VERSION }} diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index 74859525d..cf7f29bb1 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -6,9 +6,9 @@ name: scripts regression tests # events but only for the master branch on: push: - branches: main + branches: [ master ] pull_request: - branches: main + branches: [ master ] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -18,117 +18,111 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8, 3.9] + python-version: [3.10] env: CC: mpicc FC: mpifort CXX: mpicxx CPPFLAGS: "-I/usr/include -I/usr/local/include" # Versions of all dependencies can be updated here - PNETCDF_VERSION: pnetcdf-1.12.2 - NETCDF_FORTRAN_VERSION: v4.5.2 - MCT_VERSION: MCT_2.11.0 - PARALLELIO_VERSION: pio2_5_4 + PNETCDF_VERSION: checkpoint.1.12.3 + NETCDF_FORTRAN_VERSION: v4.6.0 + ESMF_VERSION: v8.4.0 + PARALLELIO_VERSION: pio2_5_10 NETCDF_C_PATH: /usr NETCDF_FORTRAN_PATH: ${HOME}/netcdf-fortran PNETCDF_PATH: ${HOME}/pnetcdf CIME_MODEL: cesm - CIME_DRIVER: mct + CIME_DRIVER: nuopc # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: cime checkout - uses: actions/checkout@v2 - with: - repository: ESMCI/cime - - - name: share checkout - uses: actions/checkout@v2 - with: - repository: ESCOMP/CESM_share - path: share - - - name: cpl7 checkout - uses: actions/checkout@v2 - with: - repository: ESCOMP/CESM_CPL7andDataComps - path: components/cpl7 - - id: load-env run: | sudo apt-get update - sudo apt-get install libxml2-utils pylint wget gfortran openmpi-bin netcdf-bin libopenmpi-dev cmake libnetcdf-dev + sudo apt-get install libxml2-utils pylint wget gfortran openmpi-bin netcdf-bin libopenmpi-dev cmake libnetcdf-dev autotools-dev autoconf - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: mct install - run: | - git clone -b ${{ env.MCT_VERSION }} https://github.com/MCSclimate/MCT libraries/mct - ls -l libraries/mct + - name: cesm checkout + uses: actions/checkout@v3 + with: + repository: ESCOMP/CESM + path: cesm - - name: parallelio install + # Checkout cesm and update cmeps to this commit + - name: checkout externals run: | - git clone -b ${{ env.PARALLELIO_VERSION }} https://github.com/NCAR/ParallelIO libraries/parallelio - ls -l libraries/parallelio - + pushd cesm + ./manage_externals/checkout_externals -o + pushd components/cmeps + git checkout $GITHUB_SHA + - name: cache pnetcdf id: cache-pnetcdf uses: actions/cache@v2 with: path: ~/pnetcdf - key: ${{ runner.os }}-${{ env.PNETCDF_VERSION}}-pnetcdf-redo - - - name: pnetcdf build - if: steps.cache-pnetcdf.outputs.cache-hit != 'true' - run: | - wget https://parallel-netcdf.github.io/Release/${{ env.PNETCDF_VERSION }}.tar.gz - tar -xzvf ${{ env.PNETCDF_VERSION }}.tar.gz - ls -l - pushd ${{ env.PNETCDF_VERSION }} - ./configure --prefix=$HOME/pnetcdf --enable-shared --disable-cxx - make - make install - popd + key: ${{ runner.os }}-${{ env.PNETCDF_VERSION}}-pnetcdf - name: Cache netcdf-fortran id: cache-netcdf-fortran uses: actions/cache@v2 with: path: ~/netcdf-fortran - key: ${{ runner.os }}-${{ env.NETCDF_FORTRAN_VERSION }}-netcdf-fortran-redo - - - name: netcdf fortran build - if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true' - run: | - sudo apt-get install libnetcdf-dev - wget https://github.com/Unidata/netcdf-fortran/archive/${{ env.NETCDF_FORTRAN_VERSION }}.tar.gz - tar -xzvf ${{ env.NETCDF_FORTRAN_VERSION }}.tar.gz - ls -l - pushd netcdf-fortran-* - ./configure --prefix=$HOME/netcdf-fortran - make - make install - - - name: link netcdf-c to netcdf-fortran path - # link netcdf c library here to simplify build - run: | - pushd ${{ env.NETCDF_FORTRAN_PATH }}/include - ln -fs /usr/include/*netcdf* . - pushd ${{ env.NETCDF_FORTRAN_PATH }}/lib - clibdir=`nc-config --libdir` - ln -fs $clibdir/lib* . + key: ${{ runner.os }}-${{ env.NETCDF_FORTRAN_VERSION }}-netcdf-fortran + - name: Cache ParallelIO + id: cache-ParallelIO + uses: actions/cache@v2 + with: + path: ~/pio + key: ${{ runner.os }}-${{ env.PARALLELIO_VERSION }}.pio - name: Cache inputdata id: cache-inputdata uses: actions/cache@v2 with: path: $HOME/cesm/inputdata key: inputdata + - name: Build PNetCDF + if: steps.cache-pnetcdf.outputs.cache-hit != 'true' + uses: ESCOMP/CDEPS/.github/actions/buildpnetcdf@e06246b560d3132170bb1a5443fa3d65dfbd2040 + with: + pnetcdf_version: ${{ env.PNETCDF_VERSION }} + install_prefix: $HOME/pnetcdf + - name: Build NetCDF Fortran + if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true' + uses: ESCOMP/CDEPS/.github/actions/buildnetcdff@e06246b560d3132170bb1a5443fa3d65dfbd2040 + with: + netcdf_fortran_version: ${{ env.NETCDF_FORTRAN_VERSION }} + install_prefix: $HOME/netcdf-fortran + netcdf_c_path: /usr + - name: Build ParallelIO + if: steps.cache-PARALLELIO.outputs.cache-hit != 'true' + uses: ESCOMP/CDEPS/.github/actions/buildpio@e06246b560d3132170bb1a5443fa3d65dfbd2040 + with: + parallelio_version: ${{ env.ParallelIO_VERSION }} + netcdf_c_path: /usr + netcdf_fortran_path: $HOME/netcdf-fortran + pnetcdf_path: $HOME/pnetcdf + install_prefix: $HOME/pio + - name: Build ESMF + if: steps.cache-esmf.outputs.cache-hit != 'true' + uses: ESCOMP/CDEPS/.github/actions/buildesmf@e06246b560d3132170bb1a5443fa3d65dfbd2040 + with: + esmf_version: ${{ env.ESMF_VERSION }} + esmf_bopt: g + esmf_comm: openmpi + install_prefix: $HOME/ESMF + netcdf_c_path: /usr + netcdf_fortran_path: $HOME/netcdf-fortran + pnetcdf_path: $HOME/pnetcdf + parallelio_path: $HOME/pio # # The following can be used to ssh to the testnode for debugging # see https://github.com/mxschmitt/action-tmate for details @@ -139,8 +133,7 @@ jobs: run: | mkdir -p $HOME/cesm/scratch mkdir -p $HOME/cesm/inputdata - cd $HOME/work/CESM_share/CESM_share/scripts/tests - ls -l $HOME/work/CESM_share/CESM_share + cd $HOME/cesm/cime/CIME/tests export NETCDF=$HOME/netcdf-fortran export PATH=$NETCDF/bin:$PATH export LD_LIBRARY_PATH=$NETCDF/lib:$HOME/pnetcdf/lib:$LD_LIBRARY_PATH From d53f965ebd5d9da0b79d9fed1f24717d78709e9a Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 23 Dec 2022 13:16:19 -0700 Subject: [PATCH 05/17] add scripts_regression_tests to workflow --- .github/workflows/srt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index cf7f29bb1..975227db9 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.10] + python-version: [ 3.10.9 ] env: CC: mpicc FC: mpifort From 6f76ccc8de10f3b12c10e0368dbf15a7d222b985 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 23 Dec 2022 13:29:41 -0700 Subject: [PATCH 06/17] ref not sha --- .github/workflows/srt.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index 975227db9..4035507a9 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -55,13 +55,13 @@ jobs: repository: ESCOMP/CESM path: cesm - # Checkout cesm and update cmeps to this commit + # Checkout cesm (datamodels only) and update cmeps to this commit - name: checkout externals run: | pushd cesm - ./manage_externals/checkout_externals -o + ./manage_externals/checkout_externals cmeps ccs_config cdeps cime share mct pushd components/cmeps - git checkout $GITHUB_SHA + git checkout $GITHUB_REF - name: cache pnetcdf id: cache-pnetcdf From fa2ccbf6b01505a87a233c783934a1b31d202c0b Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 23 Dec 2022 13:37:26 -0700 Subject: [PATCH 07/17] nether ref nor sha --- .github/workflows/srt.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index 4035507a9..438592018 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -34,7 +34,7 @@ jobs: PNETCDF_PATH: ${HOME}/pnetcdf CIME_MODEL: cesm CIME_DRIVER: nuopc - + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -48,20 +48,23 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - + # use the latest cesm master - name: cesm checkout uses: actions/checkout@v3 with: repository: ESCOMP/CESM path: cesm - - # Checkout cesm (datamodels only) and update cmeps to this commit + # this cmeps commit + - name: cmeps checkout + uses: actions/checkout@v3 + with: + path: components/cmeps + + # Checkout cesm datamodels and support - name: checkout externals run: | pushd cesm - ./manage_externals/checkout_externals cmeps ccs_config cdeps cime share mct - pushd components/cmeps - git checkout $GITHUB_REF + ./manage_externals/checkout_externals ccs_config cdeps cime share mct - name: cache pnetcdf id: cache-pnetcdf From 9bba7a31a3f215f25d53d2f01bd244c69f3f7922 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 23 Dec 2022 14:02:14 -0700 Subject: [PATCH 08/17] fix path --- .github/workflows/srt.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index 438592018..f41ba3e9c 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -66,6 +66,11 @@ jobs: pushd cesm ./manage_externals/checkout_externals ccs_config cdeps cime share mct + - id: cache-esmf + uses: actions/cache@v3 + with: + path: ~/ESMF + key: ${{ runner.os }}-${{ env.ESMF_VERSION }}-ESMF - name: cache pnetcdf id: cache-pnetcdf uses: actions/cache@v2 @@ -136,7 +141,7 @@ jobs: run: | mkdir -p $HOME/cesm/scratch mkdir -p $HOME/cesm/inputdata - cd $HOME/cesm/cime/CIME/tests + cd $GITHUB_WORKSPACE/cesm/cime/CIME/tests export NETCDF=$HOME/netcdf-fortran export PATH=$NETCDF/bin:$PATH export LD_LIBRARY_PATH=$NETCDF/lib:$HOME/pnetcdf/lib:$LD_LIBRARY_PATH From b23d44337751654539c1314aada9cc18c1aa6457 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 23 Dec 2022 14:21:34 -0700 Subject: [PATCH 09/17] fix cmeps path --- .github/workflows/srt.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index f41ba3e9c..ada3d4f64 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -48,6 +48,8 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + cache: 'pip' + - run: pip install yaml # use the latest cesm master - name: cesm checkout uses: actions/checkout@v3 @@ -58,7 +60,7 @@ jobs: - name: cmeps checkout uses: actions/checkout@v3 with: - path: components/cmeps + path: cesm/components/cmeps # Checkout cesm datamodels and support - name: checkout externals @@ -73,27 +75,27 @@ jobs: key: ${{ runner.os }}-${{ env.ESMF_VERSION }}-ESMF - name: cache pnetcdf id: cache-pnetcdf - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/pnetcdf key: ${{ runner.os }}-${{ env.PNETCDF_VERSION}}-pnetcdf - name: Cache netcdf-fortran id: cache-netcdf-fortran - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/netcdf-fortran key: ${{ runner.os }}-${{ env.NETCDF_FORTRAN_VERSION }}-netcdf-fortran - name: Cache ParallelIO id: cache-ParallelIO - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/pio key: ${{ runner.os }}-${{ env.PARALLELIO_VERSION }}.pio - name: Cache inputdata id: cache-inputdata - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: $HOME/cesm/inputdata key: inputdata From caba810589ccce99837af8a30b33396bbda99bc6 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 23 Dec 2022 14:33:22 -0700 Subject: [PATCH 10/17] fix cmeps path --- .github/workflows/srt.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index ada3d4f64..713228de0 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -49,7 +49,9 @@ jobs: with: python-version: ${{ matrix.python-version }} cache: 'pip' - - run: pip install yaml + - run: | + echo 'yaml-1.3 0.1.0' > requirements.txt + pip install -r requirements.txt # use the latest cesm master - name: cesm checkout uses: actions/checkout@v3 From 839d8e9c589969321736707a696791acc66c3550 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 23 Dec 2022 14:35:23 -0700 Subject: [PATCH 11/17] fix cmeps path --- .github/workflows/srt.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index 713228de0..aa9c69fa4 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -48,10 +48,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - cache: 'pip' - - run: | - echo 'yaml-1.3 0.1.0' > requirements.txt - pip install -r requirements.txt + # use the latest cesm master - name: cesm checkout uses: actions/checkout@v3 From f965da94147d51632622bfdc4ba199de02075b82 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 23 Dec 2022 14:51:20 -0700 Subject: [PATCH 12/17] add cpl7 --- .github/workflows/srt.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index aa9c69fa4..643ff0f93 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -62,10 +62,11 @@ jobs: path: cesm/components/cmeps # Checkout cesm datamodels and support + # cpl7 is needed - i think that's a bug - name: checkout externals run: | pushd cesm - ./manage_externals/checkout_externals ccs_config cdeps cime share mct + ./manage_externals/checkout_externals ccs_config cdeps cime share mct cpl7 - id: cache-esmf uses: actions/cache@v3 From 2fd947b6f8151482759c4e98064f367681e975ae Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 23 Dec 2022 15:18:14 -0700 Subject: [PATCH 13/17] install PyYAML --- .github/workflows/srt.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index 643ff0f93..0b5ef23d0 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -48,7 +48,9 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - + - run: echo "PyYAML" > requirements.txt + - name: Install PyYAML + run: pip install -r requirements.txt # use the latest cesm master - name: cesm checkout uses: actions/checkout@v3 @@ -68,7 +70,8 @@ jobs: pushd cesm ./manage_externals/checkout_externals ccs_config cdeps cime share mct cpl7 - - id: cache-esmf + - name: Cache ESMF + id: cache-esmf uses: actions/cache@v3 with: path: ~/ESMF @@ -147,6 +150,7 @@ jobs: export NETCDF=$HOME/netcdf-fortran export PATH=$NETCDF/bin:$PATH export LD_LIBRARY_PATH=$NETCDF/lib:$HOME/pnetcdf/lib:$LD_LIBRARY_PATH + export ESMFMKFILE=$HOME/ESMF/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk ./scripts_regression_tests.py --no-fortran-run --compiler gnu --mpilib openmpi --machine ubuntu-latest # the following can be used by developers to login to the github server in case of errors From f2f06c21da1c55b01f310249e06b936ac793fd2a Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 27 Dec 2022 07:21:47 -0700 Subject: [PATCH 14/17] turn on debug --- .github/workflows/srt.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index 0b5ef23d0..7d8a76bdd 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -155,6 +155,6 @@ jobs: # the following can be used by developers to login to the github server in case of errors # see https://github.com/marketplace/actions/debugging-with-tmate for further details -# - name: Setup tmate session -# if: ${{ failure() }} -# uses: mxschmitt/action-tmate@v3 + - name: Setup tmate session + if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 From 0dde540c6d7dbca9c675ee3a080f912e15b41624 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 27 Dec 2022 07:33:10 -0700 Subject: [PATCH 15/17] use pio external --- .github/workflows/srt.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index 7d8a76bdd..6755ec912 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -147,6 +147,10 @@ jobs: mkdir -p $HOME/cesm/scratch mkdir -p $HOME/cesm/inputdata cd $GITHUB_WORKSPACE/cesm/cime/CIME/tests + export PIO_INCDIR=$HOME/pio/include + export PIO_LIBDIR=$HOME/pio/lib + export PIO_VERSION_MAJOR=2 + export PIO_TYPENAME_VALID_VALUES="netcdf,pnetcdf,netcdf4p,netcdf4c" export NETCDF=$HOME/netcdf-fortran export PATH=$NETCDF/bin:$PATH export LD_LIBRARY_PATH=$NETCDF/lib:$HOME/pnetcdf/lib:$LD_LIBRARY_PATH From cd6e6e2a8dc7a120c8b67b1339f95d0ba179d7e8 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 27 Dec 2022 07:53:32 -0700 Subject: [PATCH 16/17] set more env variables --- .github/workflows/srt.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index 6755ec912..a2ae9524c 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -147,12 +147,13 @@ jobs: mkdir -p $HOME/cesm/scratch mkdir -p $HOME/cesm/inputdata cd $GITHUB_WORKSPACE/cesm/cime/CIME/tests + export CIME_TEST_PLATFORM=ubuntu-latest export PIO_INCDIR=$HOME/pio/include export PIO_LIBDIR=$HOME/pio/lib export PIO_VERSION_MAJOR=2 export PIO_TYPENAME_VALID_VALUES="netcdf,pnetcdf,netcdf4p,netcdf4c" export NETCDF=$HOME/netcdf-fortran - export PATH=$NETCDF/bin:$PATH + export PATH=$NETCDF/bin:$PATH:$HOME/netcdf-fortran/bin export LD_LIBRARY_PATH=$NETCDF/lib:$HOME/pnetcdf/lib:$LD_LIBRARY_PATH export ESMFMKFILE=$HOME/ESMF/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk ./scripts_regression_tests.py --no-fortran-run --compiler gnu --mpilib openmpi --machine ubuntu-latest From 281332b915ceb2c66e26eaf6f3ea182f5e21f09e Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 27 Dec 2022 08:16:24 -0700 Subject: [PATCH 17/17] try adding pio --- .github/workflows/srt.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index a2ae9524c..3f156fb25 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -68,7 +68,7 @@ jobs: - name: checkout externals run: | pushd cesm - ./manage_externals/checkout_externals ccs_config cdeps cime share mct cpl7 + ./manage_externals/checkout_externals ccs_config cdeps cime share mct cpl7 parallelio - name: Cache ESMF id: cache-esmf @@ -136,11 +136,6 @@ jobs: netcdf_fortran_path: $HOME/netcdf-fortran pnetcdf_path: $HOME/pnetcdf parallelio_path: $HOME/pio -# -# The following can be used to ssh to the testnode for debugging -# see https://github.com/mxschmitt/action-tmate for details -# - name: Setup tmate session -# uses: mxschmitt/action-tmate@v3 - name: scripts regression tests run: | @@ -160,6 +155,6 @@ jobs: # the following can be used by developers to login to the github server in case of errors # see https://github.com/marketplace/actions/debugging-with-tmate for further details - - name: Setup tmate session - if: ${{ failure() }} - uses: mxschmitt/action-tmate@v3 +# - name: Setup tmate session +# if: ${{ failure() }} +# uses: mxschmitt/action-tmate@v3