From 1f6314b339844857d745448a9c3a6b43e79eca04 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 07:55:20 -0600 Subject: [PATCH 01/22] add a docker workflow replacement for extbuild.yml --- .github/workflows/dockerextbuild.yml | 112 +++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 .github/workflows/dockerextbuild.yml diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml new file mode 100644 index 000000000..291a93e16 --- /dev/null +++ b/.github/workflows/dockerextbuild.yml @@ -0,0 +1,112 @@ +# This is a workflow to compile the cmeps source without cime +name: extbuild + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + build-cmeps: + runs-on: ubuntu-latest + strategy: + matrix: + openmpi: [4.1.2] + hdf5: [1.12] + netcdfc: [4.8.1] + netcdff: [4.5.4] + pnetcdf: [1.12.3] + env: + CC: mpicc + FC: mpifort + CXX: mpicxx + CPPFLAGS: "-I/usr/include -I/usr/local/include" + # Versions of all dependencies can be updated here + ESMF_VERSION: v8.3.0b09 + # PIO version + PIO_VERSION: pio2_5_6 + + container: + image: jedwards4b/o${{ matrix.openmpi }}h${{ matrix.hdf5 }}nc${{ matrix.netcdfc }}nf${{ matrix.netcdff }}p${{ matrix.pnetcdf }} + options: --user 1001 + steps: + - name: checkout cmake_fortran_utils + uses: actions/checkout@v3 + with: + repository: CESM-Development/CMake_Fortran_utils + path: build/CMake_Fortran_utils + - name: Checkout PIO + uses: actions/checkout@v3 + with: + repository: NCAR/ParallelIO + ref: ${{ env.PIO_VERSION }} + - name: Checkout ESMF + uses: actions/checkout@v3 + with: + repository: esmf-org/esmf + ref: ${{ env.ESMF_VERSION }} + - name: Checkout genf90 + uses: actions/checkout@v3 + with: + repository: ParallelIO/genf90 + path: build/genf90 + - name: Cache PIO + id: cache-PIO + uses: actions/cache@v2 + with: + path: ~/pio + key: ${{ runner.os }}-${{ env.PIO_VERSION }}.pio + + - name: build PIO + if: steps.cache-PIO.outputs.cache-hit != 'true' + run: | + cd build + export PATH=/usr/local/bin:$PATH + cmake -Wno-dev \ + -DCMAKE_INSTALL_PREFIX=/usr/local/ \ + -DGENF90_PATH=${GITHUB_WORKSPACE}/build/genf90 \ + -DNetCDF_PATH=/usr/local/ \ + -DPnetCDF_PATH=/usr/local \ + -DPIO_ENABLE_FORTRAN=ON \ + -DPIO_ENABLE_TIMING=Off + .. + make VERBOSE=1 + make install + + - id: cache-esmf + uses: actions/cache@v2 + with: + path: $GITHUB_WORKSPACE/ESMF + key: ${{ runner.os }}-${{ env.ESMF_VERSION }}-ESMF + - name: build ESMF + if: steps.cache-esmf.outputs.cache-hit != 'true' + env: + ESMF_DIR: $GITHUB_WORKSPACE/ESMF + ESMF_COMPILER: gfortran + ESMF_BOPT: g + ESMF_PIO: external + ESMF_NETCDF: /usr/local/bin/nc-config + ESMF_PNETCDF: /usr/local/bin/pnetcdf-config + ESMF_COMM: openmpi + ESMF_INSTALL_PREFIX: /usr/local + run: | + cd $ESMF_DIR + make -j 2 + make install + + - name: Build CMEPS + env: + ESMFMKFILE: /usr/local/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk + PIO: /usr/local + run: | + cd $GITHUB_WORKSPACE + export PIO=$HOME/pio + mkdir build-cmeps + pushd build-cmeps + cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_Fortran_FLAGS="-g -Wall -ffree-form -ffree-line-length-none" ../ + make VERBOSE=1 + popd From a028538b8bfcfbc8c32aade0a0e415695b2d1c5d Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 08:02:12 -0600 Subject: [PATCH 02/22] lint new workflow --- .github/workflows/dockerextbuild.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index 291a93e16..db88dc83f 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -4,10 +4,11 @@ name: extbuild # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch on: - push: - branches: [ master ] - pull_request: - branches: [ master ] + push +# : +# branches: [ master ] +# pull_request: +# branches: [ master ] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -27,7 +28,7 @@ jobs: CPPFLAGS: "-I/usr/include -I/usr/local/include" # Versions of all dependencies can be updated here ESMF_VERSION: v8.3.0b09 - # PIO version + # PIO version PIO_VERSION: pio2_5_6 container: @@ -72,7 +73,7 @@ jobs: -DNetCDF_PATH=/usr/local/ \ -DPnetCDF_PATH=/usr/local \ -DPIO_ENABLE_FORTRAN=ON \ - -DPIO_ENABLE_TIMING=Off + -DPIO_ENABLE_TIMING=Off \ .. make VERBOSE=1 make install From a4dfb52d6481867b3c1aca57df281451ff297738 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 08:06:12 -0600 Subject: [PATCH 03/22] correct paths --- .github/workflows/dockerextbuild.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index db88dc83f..20f84a08f 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -45,6 +45,7 @@ jobs: with: repository: NCAR/ParallelIO ref: ${{ env.PIO_VERSION }} + path: $GITHUB_WORKSPACE/paralleio - name: Checkout ESMF uses: actions/checkout@v3 with: @@ -59,7 +60,7 @@ jobs: id: cache-PIO uses: actions/cache@v2 with: - path: ~/pio + path: key: ${{ runner.os }}-${{ env.PIO_VERSION }}.pio - name: build PIO @@ -74,7 +75,7 @@ jobs: -DPnetCDF_PATH=/usr/local \ -DPIO_ENABLE_FORTRAN=ON \ -DPIO_ENABLE_TIMING=Off \ - .. + $GITHUB_WORKSPACE/parallelio make VERBOSE=1 make install From a59e482b4f26c390a66ffb6c7c266553cd645d7c Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 08:08:10 -0600 Subject: [PATCH 04/22] correct paths --- .github/workflows/dockerextbuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index 20f84a08f..58ded2f9a 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -60,7 +60,7 @@ jobs: id: cache-PIO uses: actions/cache@v2 with: - path: + path: $GITHUB_WORKSPACE/paralleio key: ${{ runner.os }}-${{ env.PIO_VERSION }}.pio - name: build PIO From 300ff1bee9ed83c32078c3f045a82cd1028b72ba Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 08:11:31 -0600 Subject: [PATCH 05/22] correct paths --- .github/workflows/dockerextbuild.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index 58ded2f9a..6f6e124ee 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -45,12 +45,13 @@ jobs: with: repository: NCAR/ParallelIO ref: ${{ env.PIO_VERSION }} - path: $GITHUB_WORKSPACE/paralleio + path: $GITHUB_WORKSPACE - name: Checkout ESMF uses: actions/checkout@v3 with: repository: esmf-org/esmf ref: ${{ env.ESMF_VERSION }} + path: $GITHUB_WORKSPACE - name: Checkout genf90 uses: actions/checkout@v3 with: @@ -60,7 +61,7 @@ jobs: id: cache-PIO uses: actions/cache@v2 with: - path: $GITHUB_WORKSPACE/paralleio + path: $GITHUB_WORKSPACE/ParalleIO key: ${{ runner.os }}-${{ env.PIO_VERSION }}.pio - name: build PIO @@ -75,7 +76,7 @@ jobs: -DPnetCDF_PATH=/usr/local \ -DPIO_ENABLE_FORTRAN=ON \ -DPIO_ENABLE_TIMING=Off \ - $GITHUB_WORKSPACE/parallelio + $GITHUB_WORKSPACE/ParallelIO make VERBOSE=1 make install From aed05d9b8543f706dba7197e936e216125333e42 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 08:17:58 -0600 Subject: [PATCH 06/22] correct paths --- .github/workflows/dockerextbuild.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index 6f6e124ee..54be7cb23 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -67,6 +67,7 @@ jobs: - name: build PIO if: steps.cache-PIO.outputs.cache-hit != 'true' run: | + ls $GITHUB_WORKSPACE/ cd build export PATH=/usr/local/bin:$PATH cmake -Wno-dev \ From e0501c800b0559b38f01024a63fa0eb58572b41b Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 08:22:45 -0600 Subject: [PATCH 07/22] correct paths --- .github/workflows/dockerextbuild.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index 54be7cb23..263a4a089 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -45,13 +45,13 @@ jobs: with: repository: NCAR/ParallelIO ref: ${{ env.PIO_VERSION }} - path: $GITHUB_WORKSPACE + path: ${{ env.GITHUB_WORKSPACE }} - name: Checkout ESMF uses: actions/checkout@v3 with: repository: esmf-org/esmf ref: ${{ env.ESMF_VERSION }} - path: $GITHUB_WORKSPACE + path: ${{ env.GITHUB_WORKSPACE }} - name: Checkout genf90 uses: actions/checkout@v3 with: @@ -61,13 +61,13 @@ jobs: id: cache-PIO uses: actions/cache@v2 with: - path: $GITHUB_WORKSPACE/ParalleIO + path: ${{ env.GITHUB_WORKSPACE }}/ParalleIO key: ${{ runner.os }}-${{ env.PIO_VERSION }}.pio - name: build PIO if: steps.cache-PIO.outputs.cache-hit != 'true' run: | - ls $GITHUB_WORKSPACE/ + ls ${{ env.GITHUB_WORKSPACE }}/ cd build export PATH=/usr/local/bin:$PATH cmake -Wno-dev \ @@ -77,19 +77,19 @@ jobs: -DPnetCDF_PATH=/usr/local \ -DPIO_ENABLE_FORTRAN=ON \ -DPIO_ENABLE_TIMING=Off \ - $GITHUB_WORKSPACE/ParallelIO + ${{ env.GITHUB_WORKSPACE }}/ParallelIO make VERBOSE=1 make install - id: cache-esmf uses: actions/cache@v2 with: - path: $GITHUB_WORKSPACE/ESMF + path: ${{ env.GITHUB_WORKSPACE }}/ESMF key: ${{ runner.os }}-${{ env.ESMF_VERSION }}-ESMF - name: build ESMF if: steps.cache-esmf.outputs.cache-hit != 'true' env: - ESMF_DIR: $GITHUB_WORKSPACE/ESMF + ESMF_DIR: ${{ env.GITHUB_WORKSPACE }}/ESMF ESMF_COMPILER: gfortran ESMF_BOPT: g ESMF_PIO: external @@ -107,7 +107,7 @@ jobs: ESMFMKFILE: /usr/local/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk PIO: /usr/local run: | - cd $GITHUB_WORKSPACE + cd ${{ env.GITHUB_WORKSPACE }} export PIO=$HOME/pio mkdir build-cmeps pushd build-cmeps From 15ee95f3dcbb7be536ee40b45a8b0b4747125720 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 08:27:57 -0600 Subject: [PATCH 08/22] correct paths --- .github/workflows/dockerextbuild.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index 263a4a089..f87563d5a 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -45,13 +45,11 @@ jobs: with: repository: NCAR/ParallelIO ref: ${{ env.PIO_VERSION }} - path: ${{ env.GITHUB_WORKSPACE }} - name: Checkout ESMF uses: actions/checkout@v3 with: repository: esmf-org/esmf ref: ${{ env.ESMF_VERSION }} - path: ${{ env.GITHUB_WORKSPACE }} - name: Checkout genf90 uses: actions/checkout@v3 with: @@ -61,13 +59,13 @@ jobs: id: cache-PIO uses: actions/cache@v2 with: - path: ${{ env.GITHUB_WORKSPACE }}/ParalleIO + path: ParalleIO key: ${{ runner.os }}-${{ env.PIO_VERSION }}.pio - name: build PIO if: steps.cache-PIO.outputs.cache-hit != 'true' run: | - ls ${{ env.GITHUB_WORKSPACE }}/ + ls cd build export PATH=/usr/local/bin:$PATH cmake -Wno-dev \ @@ -77,19 +75,19 @@ jobs: -DPnetCDF_PATH=/usr/local \ -DPIO_ENABLE_FORTRAN=ON \ -DPIO_ENABLE_TIMING=Off \ - ${{ env.GITHUB_WORKSPACE }}/ParallelIO + ../ParallelIO make VERBOSE=1 make install - id: cache-esmf uses: actions/cache@v2 with: - path: ${{ env.GITHUB_WORKSPACE }}/ESMF + path: ESMF key: ${{ runner.os }}-${{ env.ESMF_VERSION }}-ESMF - name: build ESMF if: steps.cache-esmf.outputs.cache-hit != 'true' env: - ESMF_DIR: ${{ env.GITHUB_WORKSPACE }}/ESMF + ESMF_DIR: ESMF ESMF_COMPILER: gfortran ESMF_BOPT: g ESMF_PIO: external @@ -107,7 +105,6 @@ jobs: ESMFMKFILE: /usr/local/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk PIO: /usr/local run: | - cd ${{ env.GITHUB_WORKSPACE }} export PIO=$HOME/pio mkdir build-cmeps pushd build-cmeps From 5212fa6380851e27cc1a90ca437804b8af559f9d Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 08:30:23 -0600 Subject: [PATCH 09/22] correct paths --- .github/workflows/dockerextbuild.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index f87563d5a..e321f775c 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -45,11 +45,13 @@ jobs: with: repository: NCAR/ParallelIO ref: ${{ env.PIO_VERSION }} + path: ParallelIO - name: Checkout ESMF uses: actions/checkout@v3 with: repository: esmf-org/esmf ref: ${{ env.ESMF_VERSION }} + path: ESMF - name: Checkout genf90 uses: actions/checkout@v3 with: From e04711ddd4d2e90c336e2b9cae016237d51e4b8a Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 08:32:47 -0600 Subject: [PATCH 10/22] correct paths --- .github/workflows/dockerextbuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index e321f775c..d988df97a 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -79,7 +79,7 @@ jobs: -DPIO_ENABLE_TIMING=Off \ ../ParallelIO make VERBOSE=1 - make install + sudo make install - id: cache-esmf uses: actions/cache@v2 @@ -100,7 +100,7 @@ jobs: run: | cd $ESMF_DIR make -j 2 - make install + sudo make install - name: Build CMEPS env: From b67f98bd92d20a915467a2ecdffa3d6555079c1a Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 08:39:13 -0600 Subject: [PATCH 11/22] correct paths --- .github/workflows/dockerextbuild.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index d988df97a..8df2a49b5 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -67,11 +67,10 @@ jobs: - name: build PIO if: steps.cache-PIO.outputs.cache-hit != 'true' run: | - ls cd build export PATH=/usr/local/bin:$PATH cmake -Wno-dev \ - -DCMAKE_INSTALL_PREFIX=/usr/local/ \ + -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/pio \ -DGENF90_PATH=${GITHUB_WORKSPACE}/build/genf90 \ -DNetCDF_PATH=/usr/local/ \ -DPnetCDF_PATH=/usr/local \ @@ -79,7 +78,7 @@ jobs: -DPIO_ENABLE_TIMING=Off \ ../ParallelIO make VERBOSE=1 - sudo make install + make install - id: cache-esmf uses: actions/cache@v2 @@ -96,7 +95,7 @@ jobs: ESMF_NETCDF: /usr/local/bin/nc-config ESMF_PNETCDF: /usr/local/bin/pnetcdf-config ESMF_COMM: openmpi - ESMF_INSTALL_PREFIX: /usr/local + ESMF_INSTALL_PREFIX: ${GITHUB_WORKSPACE}/esmf run: | cd $ESMF_DIR make -j 2 @@ -104,10 +103,9 @@ jobs: - name: Build CMEPS env: - ESMFMKFILE: /usr/local/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk - PIO: /usr/local + ESMFMKFILE: ${GITHUB_WORKSPACE}/esmf/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk + PIO: ${GITHUB_WORKSPACE/pio run: | - export PIO=$HOME/pio mkdir build-cmeps pushd build-cmeps cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_Fortran_FLAGS="-g -Wall -ffree-form -ffree-line-length-none" ../ From be38f845291fad14eade034e975393b6470e3da1 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 08:42:23 -0600 Subject: [PATCH 12/22] correct paths --- .github/workflows/dockerextbuild.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index 8df2a49b5..73af1a8f1 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -88,7 +88,7 @@ jobs: - name: build ESMF if: steps.cache-esmf.outputs.cache-hit != 'true' env: - ESMF_DIR: ESMF + ESMF_DIR: ${GITHUB_WORKSPACE}/ESMF ESMF_COMPILER: gfortran ESMF_BOPT: g ESMF_PIO: external @@ -97,7 +97,9 @@ jobs: ESMF_COMM: openmpi ESMF_INSTALL_PREFIX: ${GITHUB_WORKSPACE}/esmf run: | + echo $ESMF_DIR cd $ESMF_DIR + ls make -j 2 sudo make install From 13c79d40eef221e412a3e8ea1befcdb003b623d1 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 08:52:52 -0600 Subject: [PATCH 13/22] correct paths --- .github/workflows/dockerextbuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index 73af1a8f1..696b81970 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -88,7 +88,7 @@ jobs: - name: build ESMF if: steps.cache-esmf.outputs.cache-hit != 'true' env: - ESMF_DIR: ${GITHUB_WORKSPACE}/ESMF + ESMF_DIR: ${{ env.GITHUB_WORKSPACE }}/ESMF ESMF_COMPILER: gfortran ESMF_BOPT: g ESMF_PIO: external From 2512f7e9d3c606d306344331534293ed2513e287 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 09:06:01 -0600 Subject: [PATCH 14/22] correct paths --- .github/workflows/dockerextbuild.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index 696b81970..38d04f215 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -88,7 +88,6 @@ jobs: - name: build ESMF if: steps.cache-esmf.outputs.cache-hit != 'true' env: - ESMF_DIR: ${{ env.GITHUB_WORKSPACE }}/ESMF ESMF_COMPILER: gfortran ESMF_BOPT: g ESMF_PIO: external @@ -97,9 +96,9 @@ jobs: ESMF_COMM: openmpi ESMF_INSTALL_PREFIX: ${GITHUB_WORKSPACE}/esmf run: | + cd ESMF + export ESMF_DIR=`pwd` echo $ESMF_DIR - cd $ESMF_DIR - ls make -j 2 sudo make install From e616a3acd527bb7c2d03f9614dddae82f32ffd62 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 09:17:21 -0600 Subject: [PATCH 15/22] correct paths --- .github/workflows/dockerextbuild.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index 38d04f215..7339cd5be 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -27,7 +27,7 @@ jobs: CXX: mpicxx CPPFLAGS: "-I/usr/include -I/usr/local/include" # Versions of all dependencies can be updated here - ESMF_VERSION: v8.3.0b09 + ESMF_VERSION: jedwards/pio_update2 # PIO version PIO_VERSION: pio2_5_6 @@ -83,7 +83,7 @@ jobs: - id: cache-esmf uses: actions/cache@v2 with: - path: ESMF + path: esmf key: ${{ runner.os }}-${{ env.ESMF_VERSION }}-ESMF - name: build ESMF if: steps.cache-esmf.outputs.cache-hit != 'true' @@ -94,13 +94,13 @@ jobs: ESMF_NETCDF: /usr/local/bin/nc-config ESMF_PNETCDF: /usr/local/bin/pnetcdf-config ESMF_COMM: openmpi - ESMF_INSTALL_PREFIX: ${GITHUB_WORKSPACE}/esmf + ESMF_INSTALL_PREFIX: esmf run: | cd ESMF export ESMF_DIR=`pwd` echo $ESMF_DIR make -j 2 - sudo make install + make install - name: Build CMEPS env: From 58c95a67e4d4aea422343b5ebfb8508d9e25531b Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 09:27:14 -0600 Subject: [PATCH 16/22] correct paths --- .github/workflows/dockerextbuild.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index 7339cd5be..20d30e77e 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -91,6 +91,8 @@ jobs: ESMF_COMPILER: gfortran ESMF_BOPT: g ESMF_PIO: external + ESMF_PIO_INCLUDE: $HOME/ParallelIO/include + ESMF_PIO_LIBPATH: $HOME/ParallelIO/lib ESMF_NETCDF: /usr/local/bin/nc-config ESMF_PNETCDF: /usr/local/bin/pnetcdf-config ESMF_COMM: openmpi From 1e852a501f081eec8afc1caadd14d4f040fc4b83 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 09:34:27 -0600 Subject: [PATCH 17/22] correct paths --- .github/workflows/dockerextbuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index 20d30e77e..46376464a 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -91,8 +91,8 @@ jobs: ESMF_COMPILER: gfortran ESMF_BOPT: g ESMF_PIO: external - ESMF_PIO_INCLUDE: $HOME/ParallelIO/include - ESMF_PIO_LIBPATH: $HOME/ParallelIO/lib + ESMF_PIO_INCLUDE: $HOME/pio/include + ESMF_PIO_LIBPATH: $HOME/pio/lib ESMF_NETCDF: /usr/local/bin/nc-config ESMF_PNETCDF: /usr/local/bin/pnetcdf-config ESMF_COMM: openmpi From 2680e7865db19b5f2e72124acadadb630618a045 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 09:52:54 -0600 Subject: [PATCH 18/22] correct paths --- .github/workflows/dockerextbuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index 46376464a..a0ad7d93f 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -91,8 +91,8 @@ jobs: ESMF_COMPILER: gfortran ESMF_BOPT: g ESMF_PIO: external - ESMF_PIO_INCLUDE: $HOME/pio/include - ESMF_PIO_LIBPATH: $HOME/pio/lib + ESMF_PIO_INCLUDE: ${GITHUB_WORKSPACE}/pio/include + ESMF_PIO_LIBPATH: ${GITHUB_WORKSPACE}/pio/lib ESMF_NETCDF: /usr/local/bin/nc-config ESMF_PNETCDF: /usr/local/bin/pnetcdf-config ESMF_COMM: openmpi From 98c4a5a30ac3a3f71bff9b4ba782dd95165a22cf Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 10:34:48 -0600 Subject: [PATCH 19/22] correct paths --- .github/workflows/dockerextbuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index a0ad7d93f..b8adf3aae 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -93,8 +93,8 @@ jobs: ESMF_PIO: external ESMF_PIO_INCLUDE: ${GITHUB_WORKSPACE}/pio/include ESMF_PIO_LIBPATH: ${GITHUB_WORKSPACE}/pio/lib - ESMF_NETCDF: /usr/local/bin/nc-config - ESMF_PNETCDF: /usr/local/bin/pnetcdf-config + ESMF_NETCDF: nc-config + ESMF_PNETCDF: pnetcdf-config ESMF_COMM: openmpi ESMF_INSTALL_PREFIX: esmf run: | From 7ca98c3cce9130526df87eb394e413951faca1a9 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 10:54:03 -0600 Subject: [PATCH 20/22] add a docker scripts test --- .github/workflows/dockerextbuild.yml | 7 +- .github/workflows/dockersrt.yml | 129 +++++++++++++++++++++++++++ 2 files changed, 132 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/dockersrt.yml diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index b8adf3aae..aca6088e9 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -1,6 +1,5 @@ # This is a workflow to compile the cmeps source without cime name: extbuild - # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch on: @@ -107,10 +106,10 @@ jobs: - name: Build CMEPS env: ESMFMKFILE: ${GITHUB_WORKSPACE}/esmf/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk - PIO: ${GITHUB_WORKSPACE/pio + PIO: ${GITHUB_WORKSPACE}/pio run: | mkdir build-cmeps - pushd build-cmeps + cd build-cmeps cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_Fortran_FLAGS="-g -Wall -ffree-form -ffree-line-length-none" ../ make VERBOSE=1 - popd + diff --git a/.github/workflows/dockersrt.yml b/.github/workflows/dockersrt.yml new file mode 100644 index 000000000..5d916ffe4 --- /dev/null +++ b/.github/workflows/dockersrt.yml @@ -0,0 +1,129 @@ +# CIME scripts regression tests + +name: scripts regression tests + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push +# : +# branches: main +# pull_request: +# branches: main + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + strategy: + matrix: + mpich: [4.0.1] + hdf5: [1.12] + netcdfc: [4.8.1] + netcdff: [4.5.4] + pnetcdf: [1.12.3] + env: + CC: mpicc + FC: mpifort + CXX: mpicxx + CPPFLAGS: "-I/usr/include -I/usr/local/parallel/include" + # Versions of all dependencies can be updated here + PARALLELIO_VERSION: pio2_5_6 + ESMF_VERSION: jedwards/pio_update2 + CIME_MODEL: cesm + container: + image: jedwards4b/m${{ matrix.mpich }}h${{ matrix.hdf5 }}nc${{ matrix.netcdfc }}nf${{ matrix.netcdff }}p${{ matrix.pnetcdf }} + + # 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@v3 + with: + repository: ESMCI/cime + + - name: share checkout + uses: actions/checkout@v3 + with: + repository: ESCOMP/CESM_share + path: share + + - name: cpl7 checkout + uses: actions/checkout@v3 + with: + repository: ESCOMP/CESM_CPL7andDataComps + path: components/cpl7 + + - name: mct checkout + uses: actions/checkout@v3 + with: + repository MCSclimate/MCT + path: libraries/mct + + - name: parallelio checkout + uses: actions/checkout@v3 + with: + repository NCAR/ParallelIO + path: libraries/parallelio + + - name: Cache inputdata + id: cache-inputdata + uses: actions/cache@v2 + with: + path: $HOME/cesm/inputdata + key: inputdata + + - name: Checkout ESMF + uses: actions/checkout@v3 + with: + repository: esmf-org/esmf + ref: ${{ env.ESMF_VERSION }} + path: ESMF + + - id: cache-esmf + uses: actions/cache@v2 + with: + path: esmf + key: ${{ runner.os }}-${{ env.ESMF_VERSION }}-ESMF + - name: build ESMF + if: steps.cache-esmf.outputs.cache-hit != 'true' + env: + ESMF_COMPILER: gfortran + ESMF_BOPT: g + ESMF_PIO: external + ESMF_PIO_INCLUDE: ${GITHUB_WORKSPACE}/pio/include + ESMF_PIO_LIBPATH: ${GITHUB_WORKSPACE}/pio/lib + ESMF_NETCDF: nc-config + ESMF_PNETCDF: pnetcdf-config + ESMF_COMM: openmpi + ESMF_INSTALL_PREFIX: esmf + run: | + cd ESMF + export ESMF_DIR=`pwd` + echo $ESMF_DIR + make -j 2 + make install +# +# 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: | + 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 + export NETCDF=/usr/local/parallel + export PATH=$NETCDF/bin:$PATH + export LD_LIBRARY_PATH=$NETCDF/lib:$HOME/pnetcdf/lib:$LD_LIBRARY_PATH + ./scripts_regression_tests.py --no-fortran-run --compiler gnu --mpilib mpich --machine ubuntu-latest + +# 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 From 92885113b8ac0561960dada6372195e4e31f06b9 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 16 Mar 2022 11:11:27 -0600 Subject: [PATCH 21/22] checkout cmeps --- .github/workflows/dockerextbuild.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dockerextbuild.yml b/.github/workflows/dockerextbuild.yml index aca6088e9..466fcfbe6 100644 --- a/.github/workflows/dockerextbuild.yml +++ b/.github/workflows/dockerextbuild.yml @@ -34,6 +34,10 @@ jobs: image: jedwards4b/o${{ matrix.openmpi }}h${{ matrix.hdf5 }}nc${{ matrix.netcdfc }}nf${{ matrix.netcdff }}p${{ matrix.pnetcdf }} options: --user 1001 steps: + - name: checkout cmeps + uses: actions/checkout@v3 + with: + path: components/cmeps - name: checkout cmake_fortran_utils uses: actions/checkout@v3 with: @@ -110,6 +114,6 @@ jobs: run: | mkdir build-cmeps cd build-cmeps - cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_Fortran_FLAGS="-g -Wall -ffree-form -ffree-line-length-none" ../ + cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_Fortran_FLAGS="-g -Wall -ffree-form -ffree-line-length-none" ../components/cmeps make VERBOSE=1 From f2d861c09b332377ba60c57cdc6b3846b74bab97 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 23 Mar 2022 10:28:44 -0600 Subject: [PATCH 22/22] add container support --- cime_config/buildexe | 2 +- cime_config/config_component.xml | 33 ++++++++++++++++++++------------ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/cime_config/buildexe b/cime_config/buildexe index f2a0c905c..e331f4c0e 100755 --- a/cime_config/buildexe +++ b/cime_config/buildexe @@ -105,7 +105,7 @@ def _main_func(): if os.path.isfile(exename): os.remove(exename) - cmd = "{} exec_se -j {} EXEC_SE={} MODEL=driver {} -f {} "\ + cmd = "{} exec_se -j {} EXEC_SE={} CIME_COMP=driver {} -f {} "\ .format(gmake, gmake_j, exename, gmake_args, makefile) diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml index aeb7770fc..cc049dd86 100644 --- a/cime_config/config_component.xml +++ b/cime_config/config_component.xml @@ -17,6 +17,15 @@ List of component classes supported by this driver + + char + + + case_comp + env_case.xml + Container environment to invoke, if any + + char cpl @@ -648,7 +657,7 @@ build_def env_build.xml Output root directory for each machine. - Base directory for build and run directories. + Base directory for build and run directories. @@ -997,9 +1006,9 @@ env_run.xml Determines what ESMF log files (if any) are generated when - USE_ESMF_LIB is TRUE. + USE_ESMF_LIB is TRUE. ESMF_LOGKIND_SINGLE: Use a single log file, combining messages from - all of the PETs. Not supported on some platforms. + all of the PETs. Not supported on some platforms. ESMF_LOGKIND_MULTI: Use multiple log files -- one per PET. ESMF_LOGKIND_NONE: Do not issue messages to a log file. By default, no ESMF log files are generated. @@ -1040,8 +1049,8 @@ run_flags env_run.xml Turns on component barriers for component timing. - This variable is for testing and debugging only and should never - be set for a production run. + This variable is for testing and debugging only and should never + be set for a production run. @@ -1249,7 +1258,7 @@ run_domain env_run.xml Latitude of grid location, in single column mode interpolate datasets to this location - in single point mode assume all datasets are at this location + in single point mode assume all datasets are at this location @@ -1258,7 +1267,7 @@ run_domain env_run.xml Longitude of grid location, in single column mode interpolate datasets to this location - in single point mode assume all datasets are at this location + in single point mode assume all datasets are at this location @@ -1267,10 +1276,10 @@ run_domain env_run.xml used only if if PTS_LAT and PTS_LON are greater than or - equal to 0. If this is the case then if PTS_DOMAINFILE is not - equal to UNSET a nearest neighbor search of PTS_DOMAINFILE using - PTS_LAT and PTS_LON will be done and the component mesh will have - this nearest neighbor value. + equal to 0. If this is the case then if PTS_DOMAINFILE is not + equal to UNSET a nearest neighbor search of PTS_DOMAINFILE using + PTS_LAT and PTS_LON will be done and the component mesh will have + this nearest neighbor value. @@ -1955,7 +1964,7 @@ pio rearranger communication max pending requests (io2comp) : -2 implies that CIME internally calculates the value ( = 64), -1 implies no bound on max pending requests - 0 implies that MPI_ALLTOALL will be used + 0 implies that MPI_ALLTOALL will be used