diff --git a/.github/workflows/debug-docs-test_coverage.yml b/.github/workflows/Linux_nceplibs.yml similarity index 88% rename from .github/workflows/debug-docs-test_coverage.yml rename to .github/workflows/Linux_nceplibs.yml index 65dc9eaed..e1e33af51 100644 --- a/.github/workflows/debug-docs-test_coverage.yml +++ b/.github/workflows/Linux_nceplibs.yml @@ -1,4 +1,9 @@ -name: debug-docs-test_coverage +# UFS_UTILS test workflow. +# +# Check UFS_UTILS build based on the NCEPLIBS project (deprecated, but still works). +# +# Ed Hartnett 12/13/22 +name: Linux_nceplibs on: push: branches: @@ -16,7 +21,7 @@ defaults: shell: bash -exo pipefail {0} jobs: - debug-build-and-test: + Linux_nceplibs: runs-on: ubuntu-latest steps: @@ -24,12 +29,8 @@ jobs: - name: install-dependencies run: | sudo apt-get update - sudo apt-get install libmpich-dev - sudo apt-get install doxygen - sudo apt-get install libpng-dev - sudo apt-get install libjpeg-dev + sudo apt-get install libmpich-dev libpng-dev libjpeg-dev sudo apt-get install libnetcdf-dev libnetcdff-dev netcdf-bin pkg-config - python3 -m pip install gcovr - name: cache-esmf id: cache-esmf @@ -116,11 +117,9 @@ jobs: export CXX=mpicxx export FC=mpifort export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:~/jasper/lib;~/jasper/lib64" - cmake -DTEST_FILE_DIR=/home/runner/data -DCMAKE_PREFIX_PATH='~/jasper;~/nceplibs' -DCMAKE_BUILD_TYPE=Debug -DENABLE_DOCS=On .. + cmake -DTEST_FILE_DIR=/home/runner/data -DCMAKE_PREFIX_PATH='~/jasper;~/nceplibs' .. make -j2 - - name: test run: | cd ufs_utils/build -# export LSAN_OPTIONS=suppressions=LSanSuppress.supp ctest --rerun-failed --output-on-failure diff --git a/.github/workflows/Linux_versions.yml b/.github/workflows/Linux_versions.yml new file mode 100644 index 000000000..8d44f5a0d --- /dev/null +++ b/.github/workflows/Linux_versions.yml @@ -0,0 +1,375 @@ +# UFS_UTILS test workflow. +# +# Check different versions of the NCEPLIBS libraries that are used by UFS_UTILS. +# +# Ed Hartnett 12/13/22 +name: Linux_versions +on: + push: + branches: + - develop + paths-ignore: + - README.md + pull_request: + branches: + - develop + paths-ignore: + - README.md + +defaults: + run: + shell: bash -exo pipefail {0} + +jobs: + Linux_versions: + runs-on: ubuntu-latest + env: + FC: mpifort + CC: mpicc + FCFLAGS: -fallow-argument-mismatch + strategy: + fail-fast: true + matrix: + bacio_version: [2.4.1] + g2_version: [3.4.3] + sp_version: [2.3.3] + ip_version: [3.3.3] + w3nco_version: [2.4.0] + nemsio_version: [2.5.0] + sfcio_version: [1.4.0] + sigio_version: [2.3.0] + + steps: + + - name: install-dependencies + run: | + sudo apt-get update + sudo apt-get install libpng-dev zlib1g-dev libjpeg-dev libmpich-dev + sudo apt-get install libnetcdf-dev libnetcdff-dev netcdf-bin pkg-config + + - name: cache-esmf + id: cache-esmf + uses: actions/cache@v2 + with: + path: ~/esmf + key: Linux_versions-esmf-8.2.0-${{ runner.os }}3 + + - name: build-esmf + if: steps.cache-esmf.outputs.cache-hit != 'true' + run: | + pushd ~ + export ESMF_DIR=~/esmf-ESMF_8_2_0 + wget https://github.com/esmf-org/esmf/archive/ESMF_8_2_0.tar.gz &> /dev/null + tar zxf ESMF_8_2_0.tar.gz + cd esmf-ESMF_8_2_0 + export ESMF_COMM=mpich3 + export ESMF_INSTALL_BINDIR=bin + export ESMF_INSTALL_LIBDIR=lib + export ESMF_INSTALL_MODDIR=mod + export ESMF_COMPILER=gfortran + export ESMF_INSTALL_PREFIX=~/esmf + export ESMF_NETCDF=split + export ESMF_NETCDF_INCLUDE=/usr/include + export ESMF_NETCDF_LIBPATH=/usr/x86_64-linux-gnu + make -j2 + make install + + - name: cache-jasper + id: cache-jasper + uses: actions/cache@v2 + with: + path: ~/jasper + key: Linux_versions-jasper-${{ runner.os }}-2.0.33-1 + + - name: checkout-jasper + if: steps.cache-jasper.outputs.cache-hit != 'true' + uses: actions/checkout@v2 + with: + repository: jasper-software/jasper + path: jasper + ref: version-2.0.33 + + - name: build-jasper + if: steps.cache-jasper.outputs.cache-hit != 'true' + run: | + cd jasper + mkdir build-jasper && cd build-jasper + cmake .. -DCMAKE_INSTALL_PREFIX=~/jasper + make -j2 + make install + + - name: cache-bacio + id: cache-bacio + uses: actions/cache@v2 + with: + path: ~/bacio + key: Linux_versions-bacio-${{ runner.os }}-${{ matrix.bacio_version }} + + - name: checkout-bacio + if: steps.cache-bacio.outputs.cache-hit != 'true' + uses: actions/checkout@v2 + with: + repository: NOAA-EMC/NCEPLIBS-bacio + path: bacio + ref: v${{ matrix.bacio_version }} + + - name: build-bacio + if: steps.cache-bacio.outputs.cache-hit != 'true' + run: | + cd bacio + mkdir build && cd build + cmake .. -DCMAKE_INSTALL_PREFIX=~/bacio + make -j2 + make install + + - name: cache-g2 + id: cache-g2 + uses: actions/cache@v2 + with: + path: ~/g2 + key: Linux_versions-g2-${{ runner.os }}-${{ matrix.g2_version }} + + - name: checkout-g2 + if: steps.cache-g2.outputs.cache-hit != 'true' + uses: actions/checkout@v2 + with: + repository: NOAA-EMC/NCEPLIBS-g2 + path: g2 + ref: v${{ matrix.g2_version }} + + - name: build-g2 + if: steps.cache-g2.outputs.cache-hit != 'true' + run: | + cd g2 + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=~/g2 -DCMAKE_PREFIX_PATH="~/bacio;~/jasper" .. + make -j2 + make install + + - name: cache-sp + id: cache-sp + uses: actions/cache@v2 + with: + path: ~/sp + key: Linux_versions-sp-${{ runner.os }}-${{ matrix.sp_version }} + + - name: checkout-sp + if: steps.cache-sp.outputs.cache-hit != 'true' + uses: actions/checkout@v2 + with: + repository: NOAA-EMC/NCEPLIBS-sp + path: sp + ref: v${{ matrix.sp_version }} + + - name: build-sp + if: steps.cache-sp.outputs.cache-hit != 'true' + run: | + cd sp + mkdir build + cd build + cmake .. -DCMAKE_INSTALL_PREFIX=~/sp + make -j2 + make install + + - name: cache-ip + id: cache-ip + uses: actions/cache@v2 + with: + path: ~/ip + key: Linux_versions-ip-${{ runner.os }}-${{ matrix.ip_version }} + + - name: checkout-ip + if: steps.cache-ip.outputs.cache-hit != 'true' + uses: actions/checkout@v2 + with: + repository: NOAA-EMC/NCEPLIBS-ip + path: ip + ref: v${{ matrix.ip_version }} + + - name: build-ip + if: steps.cache-ip.outputs.cache-hit != 'true' + run: | + cd ip + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=~/ip -DCMAKE_PREFIX_PATH=~/sp .. + make -j2 + make install + + # - name: checkout-w3emc + # uses: actions/checkout@v2 + # with: + # repository: NOAA-EMC/NCEPLIBS-w3emc + # path: w3emc + # ref: develop + + # - name: build-w3emc + # run: | + # cd w3emc + # mkdir build + # cd build + # cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc .. + # make -j2 + # make install + + # - name: checkout-g2c + # uses: actions/checkout@v2 + # with: + # repository: NOAA-EMC/NCEPLIBS-g2c + # path: g2c + # ref: develop + + # - name: build-g2c + # run: | + # cd g2c + # mkdir build + # cd build + # cmake .. -DCMAKE_INSTALL_PREFIX=~/g2c -DJasper_ROOT=~/jasper + # make -j2 + # make install + + - name: cache-sfcio + id: cache-sfcio + uses: actions/cache@v2 + with: + path: ~/sfcio + key: Linux_versions-sfcio-${{ runner.os }}-${{ matrix.sfcio_version }} + + - name: checkout-sfcio + if: steps.cache-sfcio.outputs.cache-hit != 'true' + uses: actions/checkout@v2 + with: + repository: NOAA-EMC/NCEPLIBS-sfcio + path: sfcio + ref: v${{ matrix.sfcio_version }} + + - name: build-sfcio + if: steps.cache-sfcio.outputs.cache-hit != 'true' + run: | + cd sfcio + mkdir build + cd build + cmake .. -DCMAKE_INSTALL_PREFIX=~/sfcio + make -j2 + make install + + - name: cache-w3nco + id: cache-w3nco + uses: actions/cache@v2 + with: + path: ~/w3nco + key: Linux_versions-w3nco-${{ runner.os }}-${{ matrix.w3nco_version }} + + - name: checkout-w3nco + if: steps.cache-w3nco.outputs.cache-hit != 'true' + uses: actions/checkout@v2 + with: + repository: NOAA-EMC/NCEPLIBS-w3nco + path: w3nco + ref: v${{ matrix.w3nco_version }} + + - name: build-w3nco + if: steps.cache-w3nco.outputs.cache-hit != 'true' + run: | + cd w3nco + mkdir build + cd build + cmake .. -DCMAKE_INSTALL_PREFIX=~/w3nco + make -j2 + make install + + - name: cache-nemsio + id: cache-nemsio + uses: actions/cache@v2 + with: + path: ~/nemsio + key: Linux_versions-nemsio-${{ runner.os }}-${{ matrix.nemsio_version }} + + - name: checkout-nemsio + if: steps.cache-nemsio.outputs.cache-hit != 'true' + uses: actions/checkout@v2 + with: + repository: NOAA-EMC/NCEPLIBS-nemsio + path: nemsio + ref: v${{ matrix.nemsio_version }} + + - name: build-nemsio + if: steps.cache-nemsio.outputs.cache-hit != 'true' + run: | + cd nemsio + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=~/nemsio -DCMAKE_PREFIX_PATH="~/bacio;~/w3nco" .. + make -j2 + make install + + - name: cache-sigio + id: cache-sigio + uses: actions/cache@v2 + with: + path: ~/sigio + key: Linux_versions-sigio-${{ runner.os }}-${{ matrix.sigio_version }} + + - name: checkout-sigio + if: steps.cache-sigio.outputs.cache-hit != 'true' + uses: actions/checkout@v2 + with: + repository: NOAA-EMC/NCEPLIBS-sigio + path: sigio + ref: v${{ matrix.sigio_version }} + + - name: build-sigio + if: steps.cache-sigio.outputs.cache-hit != 'true' + run: | + cd sigio + mkdir build + cd build + cmake .. -DCMAKE_INSTALL_PREFIX=~/sigio + make -j2 + make install + + - name: checkout + uses: actions/checkout@v2 + with: + path: ufs_utils + submodules: true + + - name: cache-data + id: cache-data + uses: actions/cache@v2 + with: + path: ~/data + key: data-1 + + - name: build + run: | + set -x + cd ufs_utils + mkdir build + cd build + export ESMFMKFILE=~/esmf/lib/esmf.mk + cmake -DTEST_FILE_DIR=/home/runner/data -DCMAKE_PREFIX_PATH="~/jasper;~/g2c;~/bacio;~/g2;~/w3nco;~/sfcio;~/sigio;~/nemsio;~/sp;~/ip" .. + make -j2 VERBOSE=1 + + - name: test + run: | + cd ufs_utils/build + ctest --verbose --rerun-failed --output-on-failure + + - name: cache-data + if: steps.cache-data.outputs.cache-hit != 'true' + run: | + mkdir ~/data + cp ufs_utils/build/tests/chgres_cube/data/* ~/data + cp ufs_utils/build/tests/sfc_climo_gen/data/* ~/data + cp ufs_utils/build/tests/cpld_gridgen/data/* ~/data + cp ufs_utils/tests/filter_topo/data/* ~/data + cp ufs_utils/tests/emcsfc_snow2mdl/data/* ~/data + cp ufs_utils/tests/chgres_cube/data/* ~/data + ls -l ~/data + + + + + diff --git a/.github/workflows/developer.yml b/.github/workflows/developer.yml index 2b7ad929e..d17f9ef4d 100644 --- a/.github/workflows/developer.yml +++ b/.github/workflows/developer.yml @@ -1,7 +1,7 @@ # UFS_UTILS test workflow. # # This workflow tests all developer options including -# documentation check, and test code coverage. +# documentation check, and test code coverage. # # Ed Hartnett 12/11/22 name: developer @@ -118,7 +118,7 @@ jobs: uses: actions/cache@v2 with: path: ~/g2 - key: developer-g2-${{ runner.os }}-3.4.3 + key: developer-g2-${{ runner.os }}-3.4.5 - name: checkout-g2 if: steps.cache-g2.outputs.cache-hit != 'true' @@ -126,7 +126,7 @@ jobs: with: repository: NOAA-EMC/NCEPLIBS-g2 path: g2 - ref: v3.4.3 + ref: v3.4.5 - name: build-g2 if: steps.cache-g2.outputs.cache-hit != 'true' @@ -188,21 +188,21 @@ jobs: make -j2 make install - # - name: checkout-w3emc - # uses: actions/checkout@v2 - # with: - # repository: NOAA-EMC/NCEPLIBS-w3emc - # path: w3emc - # ref: develop + - name: checkout-w3emc + uses: actions/checkout@v2 + with: + repository: NOAA-EMC/NCEPLIBS-w3emc + path: w3emc + ref: v2.9.0 - # - name: build-w3emc - # run: | - # cd w3emc - # mkdir build - # cd build - # cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc .. - # make -j2 - # make install + - name: build-w3emc + run: | + cd w3emc + mkdir build + cd build + cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc .. + make -j2 + make install # - name: checkout-g2c # uses: actions/checkout@v2 @@ -225,7 +225,7 @@ jobs: uses: actions/cache@v2 with: path: ~/sfcio - key: developer-sfcio-${{ runner.os }}-1.4.0-1 + key: developer-sfcio-${{ runner.os }}-1.4.1 - name: checkout-sfcio if: steps.cache-sfcio.outputs.cache-hit != 'true' @@ -233,7 +233,7 @@ jobs: with: repository: NOAA-EMC/NCEPLIBS-sfcio path: sfcio - ref: v1.4.0 + ref: v1.4.1 - name: build-sfcio if: steps.cache-sfcio.outputs.cache-hit != 'true' @@ -250,7 +250,7 @@ jobs: uses: actions/cache@v2 with: path: ~/w3nco - key: developer-w3nco-${{ runner.os }}-2.4.0 + key: developer-w3nco-${{ runner.os }}-2.4.1 - name: checkout-w3nco if: steps.cache-w3nco.outputs.cache-hit != 'true' @@ -258,7 +258,7 @@ jobs: with: repository: NOAA-EMC/NCEPLIBS-w3nco path: w3nco - ref: v2.4.0 + ref: v2.4.1 - name: build-w3nco if: steps.cache-w3nco.outputs.cache-hit != 'true' @@ -275,7 +275,7 @@ jobs: uses: actions/cache@v2 with: path: ~/nemsio - key: developer-nemsio-${{ runner.os }}-2.5.0-1 + key: developer-nemsio-${{ runner.os }}-2.5.4 - name: checkout-nemsio if: steps.cache-nemsio.outputs.cache-hit != 'true' @@ -283,7 +283,7 @@ jobs: with: repository: NOAA-EMC/NCEPLIBS-nemsio path: nemsio - ref: v2.5.0 + ref: v2.5.4 - name: build-nemsio if: steps.cache-nemsio.outputs.cache-hit != 'true' @@ -291,7 +291,7 @@ jobs: cd nemsio mkdir build cd build - cmake -DCMAKE_INSTALL_PREFIX=~/nemsio -DCMAKE_PREFIX_PATH="~/bacio;~/w3nco" .. + cmake -DCMAKE_INSTALL_PREFIX=~/nemsio -DCMAKE_PREFIX_PATH="~/bacio;~/w3emc" .. make -j2 make install @@ -300,7 +300,7 @@ jobs: uses: actions/cache@v2 with: path: ~/sigio - key: developer-sigio-${{ runner.os }}-2.3.0 + key: developer-sigio-${{ runner.os }}-2.3.2 - name: checkout-sigio if: steps.cache-sigio.outputs.cache-hit != 'true' @@ -308,7 +308,7 @@ jobs: with: repository: NOAA-EMC/NCEPLIBS-sigio path: sigio - ref: v2.3.0 + ref: v2.3.2 - name: build-sigio if: steps.cache-sigio.outputs.cache-hit != 'true' @@ -340,7 +340,7 @@ jobs: doxygen --version export ESMFMKFILE=~/esmf/lib/esmf.mk cd build - cmake -DTEST_FILE_DIR=/home/runner/data -DENABLE_DOCS=On -DCMAKE_PREFIX_PATH="~/jasper;~/g2c;~/bacio;~/g2;~/w3nco;~/sfcio;~/sigio;~/nemsio;~/sp;~/ip" -DCMAKE_Fortran_FLAGS="-g -fprofile-arcs -ftest-coverage -O0" -DCMAKE_C_FLAGS="-g -fprofile-arcs -ftest-coverage -O0" -DCMAKE_BUILD_TYPE=Debug .. + cmake -DTEST_FILE_DIR=/home/runner/data -DENABLE_DOCS=On -DCMAKE_PREFIX_PATH="~/jasper;~/g2c;~/bacio;~/g2;~/w3emc;~/w3nco;~/sfcio;~/sigio;~/nemsio;~/sp;~/ip" -DCMAKE_Fortran_FLAGS="-g -fprofile-arcs -ftest-coverage -O0" -DCMAKE_C_FLAGS="-g -fprofile-arcs -ftest-coverage -O0" -DCMAKE_BUILD_TYPE=Debug .. make -j2 VERBOSE=1 - name: test diff --git a/.github/workflows/linux-mac-nceplibs-mpi.yml b/.github/workflows/linux-mac-nceplibs-mpi.yml index bb01b29ee..43d611949 100644 --- a/.github/workflows/linux-mac-nceplibs-mpi.yml +++ b/.github/workflows/linux-mac-nceplibs-mpi.yml @@ -23,6 +23,7 @@ jobs: FC: gfortran-9 CXX: g++-9 strategy: + fail-fast: true matrix: os: [macos-11, ubuntu-latest] compiler: [gcc-9] diff --git a/.github/workflows/netcdf-versions.yml b/.github/workflows/netcdf-versions.yml index ca02e5e26..0909cb8ee 100644 --- a/.github/workflows/netcdf-versions.yml +++ b/.github/workflows/netcdf-versions.yml @@ -89,7 +89,7 @@ jobs: key: esmf-8.2.0-${{ runner.os }}-netcdf-${{ matrix.netcdf_version }}3 - name: build-esmf - #if: steps.cache-esmf.outputs.cache-hit != 'true' + if: steps.cache-esmf.outputs.cache-hit != 'true' run: | pushd ~ export ESMF_DIR=~/esmf-ESMF_8_2_0 @@ -169,11 +169,9 @@ jobs: export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:~/jasper/lib;~/jasper/lib64" cmake -DTEST_FILE_DIR=/home/runner/work/UFS_UTILS/UFS_UTILS/data -DCMAKE_PREFIX_PATH='~/jasper;~/nceplibs;~/netcdf' -DCMAKE_BUILD_TYPE=Debug .. make -j2 - - name: test run: | cd ufs_utils/build -# export LSAN_OPTIONS=suppressions=LSanSuppress.supp ctest --rerun-failed --output-on-failure - name: cache-data