Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding testing with custom-build netcdf and HDF5 versions. #492

Closed
Closed
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
0ec1aae
added slideshow and reference in README
edwardhartnett Apr 2, 2021
61b15cd
merged develop
edwardhartnett Apr 7, 2021
22de884
merged
edwardhartnett Apr 13, 2021
c229c3b
merged
edwardhartnett Apr 16, 2021
c00c739
merged
edwardhartnett Apr 19, 2021
1f86f19
merged
edwardhartnett Apr 20, 2021
2fa10dd
merged
edwardhartnett Apr 20, 2021
e22a8fc
merged develop
edwardhartnett Apr 23, 2021
bcfbe9c
merged
edwardhartnett Apr 27, 2021
05390e7
merged upstream
edwardhartnett Apr 27, 2021
7a89788
merged upstream
edwardhartnett Apr 28, 2021
c2c324e
merged upstream
edwardhartnett Apr 28, 2021
795fe4c
merged upstream
edwardhartnett Apr 29, 2021
9678379
merged
edwardhartnett Apr 30, 2021
03f4596
now build hdf5-1.10.7 from source for testing
edwardhartnett May 3, 2021
bb2dfec
changed name
edwardhartnett May 3, 2021
be3d186
Merge branch 'develop' into ejh_netcdf_474
edwardhartnett May 3, 2021
14b62e5
now building netcdf-c-4.7.4 and caching it
edwardhartnett May 3, 2021
9eaf94e
now building netcdf-c-4.7.4 and caching it, and finding hdf5
edwardhartnett May 3, 2021
4b7f338
now building netcdf-c-4.7.4 and caching it, and finding hdf5
edwardhartnett May 3, 2021
d4a15d5
now building netcdf-c-4.7.4 and caching it, and finding hdf5
edwardhartnett May 3, 2021
66f6a8c
Merge branch 'develop' into ejh_netcdf_474
edwardhartnett May 3, 2021
4428db4
trying to get netcdf build to work
edwardhartnett May 4, 2021
a805569
merged
edwardhartnett May 4, 2021
e2cf057
now building netcdf-fortran from source
edwardhartnett May 4, 2021
ac25dea
now building netcdf-fortran from source
edwardhartnett May 4, 2021
8358801
now building netcdf-fortran from source
edwardhartnett May 4, 2021
d86197f
now building netcdf-fortran from source
edwardhartnett May 4, 2021
1610773
now using netcdf-fortran from source
edwardhartnett May 4, 2021
22573e6
now using netcdf-fortran from source
edwardhartnett May 4, 2021
030b703
now using netcdf-fortran from source
edwardhartnett May 4, 2021
eb1392b
now using netcdf-fortran from source
edwardhartnett May 4, 2021
985596c
now trying to cache entire netcdf stack and installing in same place
edwardhartnett May 4, 2021
e9498f4
now trying to cache entire netcdf stack and installing in same place
edwardhartnett May 4, 2021
c8238c5
now getting UFS_UTILS building with netcdf-c-4.7.4
edwardhartnett May 4, 2021
1dc3d27
Merge branch 'develop' into ejh_netcdf_474
edwardhartnett May 4, 2021
ebb231e
Merge branch 'develop' into ejh_netcdf_474
edwardhartnett May 5, 2021
148aeaf
moved ESMF build in new workflow
edwardhartnett May 5, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
207 changes: 207 additions & 0 deletions .github/workflows/netcdf-4.7.4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
name: netcdf-4.7.4
on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
env:
CC: gcc-9
FC: gfortran-9
CXX: g++-9
strategy:
matrix:
os: [macos-10.15, ubuntu-20.04]
compiler: [gcc-9]

steps:
- name: cache-mpich
id: cache-mpich
uses: actions/cache@v2
with:
path: ~/mpich
key: mpich-${{ runner.os }}-3.3.2-1

- name: build-mpich
if: steps.cache-mpich.outputs.cache-hit != 'true'
run: |
if [[ ${{ matrix.os }} == "macos-10.15" ]]; then
wget http://www.mpich.org/static/downloads/3.3.2/mpich-3.3.2.tar.gz &> /dev/null
tar -xzf mpich-3.3.2.tar.gz
pushd mpich-3.3.2
./configure --prefix=$HOME/mpich
make
sudo make install
popd
fi

- name: install-dependencies
run: |
echo "/home/runner/mpich/bin" >> $GITHUB_PATH
if [[ ${{ matrix.os }} == "ubuntu-20.04" ]]; then
sudo apt-get update
sudo apt-get install libmpich-dev
sudo apt-get install doxygen
sudo apt-get install pkg-config
sudo apt-get install libpng-dev
sudo apt-get install libjpeg-dev
elif [[ ${{ matrix.os }} == "macos-10.15" ]]; then
echo "$HOME/mpich/bin" >> $GITHUB_PATH
brew update
brew install doxygen
brew install mpich
brew install wget
if [[ ${{ matrix.compiler }} == "gcc-9" ]]; then
sudo ln -sf /usr/local/bin/gfortran-9 /usr/local/bin/gfortran
elif [[ ${{ matrix.compiler }} == "gcc-10" ]]; then
sudo ln -sf /usr/local/bin/gfortran-10 /usr/local/bin/gfortran
fi
fi
python3 -m pip install gcovr

- name: cache-jasper
id: cache-jasper
uses: actions/cache@v2
with:
path: ~/jasper
key: jasper-${{ runner.os }}-2.0.22

- name: build-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
run: |
set -x
pwd
wget https://github.com/jasper-software/jasper/archive/version-2.0.22.tar.gz &> /dev/null && ls -l
tar zxf version-2.0.22.tar.gz && ls -l
cd jasper-version-2.0.22
mkdir build-jasper && cd build-jasper
cmake .. -DCMAKE_INSTALL_PREFIX=~/jasper
make -j2
make install

- name: cache-netcdf
id: cache-netcdf
uses: actions/cache@v2
with:
path: ~/netcdf
key: netcdf-c-${{ runner.os }}-4.7.4-1

- name: build-hdf5
if: steps.cache-netcdf.outputs.cache-hit != 'true'
run: |
set -x
export CC=mpicc
wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.7/src/hdf5-1.10.7.tar.gz &> /dev/null
tar -xzf hdf5-1.10.7.tar.gz
pushd hdf5-1.10.7
./configure --prefix=${HOME}/netcdf --enable-parallel --disable-tools --disable-fortran --disable-cxx --enable-parallel-tests
make
sudo make install
popd

- name: build-netcdf-c
if: steps.cache-netcdf.outputs.cache-hit != 'true'
run: |
set -x
ls -l ${HOME}/netcdf
export CC=mpicc
export CPPFLAGS=-I${HOME}/netcdf/include
export LDFLAGS=-L${HOME}/netcdf/lib
wget https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-c-4.7.4.tar.gz &> /dev/null
tar -xzf netcdf-c-4.7.4.tar.gz
pushd netcdf-c-4.7.4
./configure --prefix=${HOME}/netcdf --disable-dap --disable-utilities
make -j
sudo make install
popd

- name: build-netcdf-fortran
if: steps.cache-netcdf.outputs.cache-hit != 'true'
run: |
set -x
ls -l ${HOME}/netcdf
ls -l ${HOME}/netcdf/lib
export PATH="${HOME}/netcdf/bin:$PATH"
nc-config --libs --static
export CC=mpicc
export FC=mpifort
export CPPFLAGS=-I${HOME}/netcdf/include
export LDFLAGS=-L${HOME}/netcdf/lib
wget https://github.com/Unidata/netcdf-fortran/archive/v4.5.3.tar.gz &> /dev/null
tar -xzf v4.5.3.tar.gz
pushd netcdf-fortran-4.5.3
./configure --prefix=${HOME}/netcdf
make -j
sudo make install
popd

- name: cache-esmf
id: cache-esmf
uses: actions/cache@v2
with:
path: ~/esmf
key: esmf-${{ runner.os }}-8.0.1-2-1

- name: build-esmf
if: steps.cache-esmf.outputs.cache-hit != 'true'
run: |
set -x
pushd ~
export ESMF_DIR=~/esmf-ESMF_8_0_1
wget https://github.com/esmf-org/esmf/archive/ESMF_8_0_1.tar.gz &> /dev/null && ls -l
tar zxf ESMF_8_0_1.tar.gz && ls -l
cd esmf-ESMF_8_0_1
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=${HOME}/netcdf/include
export ESMF_NETCDF_LIBPATH=${HOME}/netcdf/lib
make -j2
make install

- name: checkout-nceplibs
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS
path: nceplibs

- name: get-git-hash
run: |
cd nceplibs
git rev-parse HEAD > hash.txt

- name: cache-nceplibs-develop
id: cache-nceplibs-develop
uses: actions/cache@v2
with:
path: ~/nceplibs
key: nceplibs-develop-${{ runner.os }}-${{ hashFiles('nceplibs/hash.txt') }}

- name: build-nceplibs
if: steps.cache-nceplibs-develop.outputs.cache-hit != 'true'
run: |
set -x
export ESMFMKFILE=~/esmf/lib/esmf.mk
cd nceplibs
mkdir build && cd build
cmake .. -DCMAKE_PREFIX_PATH='~;~/jasper' -DCMAKE_INSTALL_PREFIX='~/nceplibs' -DFLAT=ON
make -j2

- name: checkout-ufs-utils
uses: actions/checkout@v2
with:
path: ufs_utils

- name: build-ufs-utils
run: |
export ESMFMKFILE=~/esmf/lib/esmf.mk
cd ufs_utils
mkdir build && cd build
export PATH="${HOME}/netcdf/bin:$PATH"
cmake .. -DCMAKE_PREFIX_PATH='~/jasper;~/nceplibs;~/netcdf'
make -j2
make test