Skip to content

Commit

Permalink
Merge pull request #1707 from NCAR/ejh_cache_2
Browse files Browse the repository at this point in the history
now install pnetcdf in subdirectory
  • Loading branch information
edwardhartnett authored Aug 10, 2020
2 parents 2376632 + c0aa71a commit eed7d48
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 22 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/autotools.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: autotools
name: autotools_ubuntu_latest

on:
push:
Expand All @@ -14,24 +14,29 @@ jobs:
env:
CC: mpicc
FC: mpifort
CPPFLAGS: "-I/usr/include -I/usr/local/include"
# CFLAGS: "-std=c99 -fsanitize=address -fno-omit-frame-pointer -Werror"
# FFLAGS: "-fsanitize=address -fno-omit-frame-pointer"
# FCFLAGS: "-fsanitize=address -fno-omit-frame-pointer -Werror"
CPPFLAGS: "-I/usr/include -I/usr/local/include -I/home/runner/pnetcdf/include"
LDFLAGS: "-L/home/runner/pnetcdf/lib"

steps:
- uses: actions/checkout@v2
- name: Installs
run: |
sudo apt-get install netcdf-bin libnetcdf-dev doxygen graphviz wget gfortran libjpeg-dev libz-dev openmpi-bin libopenmpi-dev
- name: cache-pnetcdf
id: cache-pnetcdf
uses: actions/cache@v2
with:
path: ~/pnetcdf
key: pnetcdf-${{ runner.os }}-1.11.0

- name: pnetcdf build
- name: build-pnetcdf
if: steps.cache-pnetcdf.outputs.cache-hit != 'true'
run: |
wget https://parallel-netcdf.github.io/Release/pnetcdf-1.11.0.tar.gz
set -x
wget https://parallel-netcdf.github.io/Release/pnetcdf-1.11.0.tar.gz &> /dev/null
tar -xzvf pnetcdf-1.11.0.tar.gz
ls -l
pushd pnetcdf-1.11.0
./configure --prefix=/usr --enable-shared --disable-cxx
./configure --prefix=/home/runner/pnetcdf --enable-shared --disable-cxx
make
sudo make install
popd
Expand Down
24 changes: 17 additions & 7 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,41 @@ jobs:
env:
CC: mpicc
FC: mpifort
CPPFLAGS: "-I/usr/include -I/usr/local/include"
CPPFLAGS: "-I/usr/include -I/usr/local/include -I/home/runner/pnetcdf/include"
LDFLAGS: "-L/home/runner/pnetcdf/lib"
LD_LIBRARY_PATH: "/home/runner/pnetcdf/lib"

steps:
- uses: actions/checkout@v2
- name: Installs
run: |
sudo apt-get install netcdf-bin libnetcdf-dev doxygen graphviz wget gfortran libjpeg-dev libz-dev openmpi-bin libopenmpi-dev
- name: pnetcdf build
- name: cache-pnetcdf
id: cache-pnetcdf
uses: actions/cache@v2
with:
path: ~/pnetcdf
key: pnetcdf-${{ runner.os }}-1.12.1

- name: build-pnetcdf
if: steps.cache-pnetcdf.outputs.cache-hit != 'true'
run: |
wget https://parallel-netcdf.github.io/Release/pnetcdf-1.12.1.tar.gz
set -x
wget https://parallel-netcdf.github.io/Release/pnetcdf-1.12.1.tar.gz &> /dev/null
tar -xzvf pnetcdf-1.12.1.tar.gz
ls -l
pushd pnetcdf-1.12.1
./configure --prefix=/usr --enable-shared --disable-cxx
./configure --prefix=/home/runner/pnetcdf --enable-shared --disable-cxx
make
sudo make install
popd
- name: cmake build
run: |
find /usr -name libnetcdf.so
set -x
mkdir build
cd build
cmake -Wno-dev -DNetCDF_C_LIBRARY=/usr/lib/x86_64-linux-gnu/libnetcdf.so -DNetCDF_C_INCLUDE_DIR=/usr/include -DCMAKE_PREFIX_PATH=/usr -DPIO_HDF5_LOGGING=On -DPIO_USE_MALLOC=On -DPIO_ENABLE_LOGGING=On -DPIO_ENABLE_TIMING=Off ..
cmake -Wno-dev -DNetCDF_C_LIBRARY=/usr/lib/x86_64-linux-gnu/libnetcdf.so -DNetCDF_C_INCLUDE_DIR=/usr/include -DPnetCDF_PATH='/home/runner/pnetcdf' -DPIO_HDF5_LOGGING=On -DPIO_USE_MALLOC=On -DPIO_ENABLE_LOGGING=On -DPIO_ENABLE_TIMING=Off ..
make VERBOSE=1
make tests VERBOSE=1
ctest -VV
21 changes: 15 additions & 6 deletions .github/workflows/strict_autotools.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: strict_autotools
name: strict_autotools_ubuntu_latest

on:
push:
Expand All @@ -14,21 +14,30 @@ jobs:
env:
CC: mpicc
FC: mpifort
CPPFLAGS: "-I/usr/include -I/usr/local/include"
CPPFLAGS: "-I/usr/include -I/usr/local/include -I/home/runner/pnetcdf/include"
LDFLAGS: "-L/home/runner/pnetcdf/lib"

steps:
- uses: actions/checkout@v2
- name: Installs
run: |
sudo apt-get install netcdf-bin libnetcdf-dev doxygen graphviz wget gfortran libjpeg-dev libz-dev openmpi-bin libopenmpi-dev
- name: pnetcdf build
- name: cache-pnetcdf
id: cache-pnetcdf
uses: actions/cache@v2
with:
path: ~/pnetcdf
key: pnetcdf-${{ runner.os }}-1.12.1

- name: build-pnetcdf
if: steps.cache-pnetcdf.outputs.cache-hit != 'true'
run: |
wget https://parallel-netcdf.github.io/Release/pnetcdf-1.12.1.tar.gz
set -x
wget https://parallel-netcdf.github.io/Release/pnetcdf-1.12.1.tar.gz &> /dev/null
tar -xzvf pnetcdf-1.12.1.tar.gz
ls -l
pushd pnetcdf-1.12.1
./configure --prefix=/usr --enable-shared --disable-cxx
./configure --prefix=/home/runner/pnetcdf --enable-shared --disable-cxx
make
sudo make install
popd
Expand Down

0 comments on commit eed7d48

Please sign in to comment.