Skip to content

Commit 7f2d91d

Browse files
committed
CI: test all PnetCDF test programs
Download a PnetCDF official release and run its make check and make ptest when Darshan library is pre-loaded.
1 parent bf76fdf commit 7f2d91d

File tree

1 file changed

+113
-0
lines changed

1 file changed

+113
-0
lines changed

.github/workflows/pnetcdf.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: PnetCDF
2+
3+
on:
4+
push:
5+
branches: main
6+
pull_request:
7+
branches: main
8+
9+
env:
10+
PNETCDF_VERSION: 1.12.3
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Set up dependencies
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install automake autoconf libtool libtool-bin m4
21+
# mpi
22+
sudo apt-get install mpich
23+
# zlib
24+
sudo apt-get install zlib1g-dev
25+
- name: Install PnetCDF
26+
run: |
27+
echo "---- Install PnetCDF library into ${GITHUB_WORKSPACE}/PnetCDF"
28+
cd ${GITHUB_WORKSPACE}
29+
rm -rf PnetCDF
30+
mkdir PnetCDF
31+
cd PnetCDF
32+
wget -cq https://parallel-netcdf.github.io/Release/pnetcdf-${PNETCDF_VERSION}.tar.gz
33+
tar -zxf pnetcdf-${PNETCDF_VERSION}.tar.gz
34+
cd pnetcdf-${PNETCDF_VERSION}
35+
./configure --prefix=${GITHUB_WORKSPACE}/PnetCDF \
36+
--silent \
37+
--enable-shared \
38+
MPICC=mpicc \
39+
MPICXX=mpicxx \
40+
MPIF77=mpifort \
41+
MPIF90=mpifort
42+
make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1
43+
rm -f qout
44+
- name: configure darshan-runtime and darshan-util
45+
if: ${{ success() }}
46+
run: |
47+
cd ${GITHUB_WORKSPACE}
48+
mkdir -p darshan_install
49+
export DARSHAN_INSTALL_PATH=${GITHUB_WORKSPACE}/darshan_install
50+
# clone autoperf module
51+
git submodule update --init
52+
./prepare.sh
53+
mkdir -p build
54+
cd build
55+
../configure --prefix=$DARSHAN_INSTALL_PATH \
56+
--with-log-path-by-env=DARSHAN_LOGPATH \
57+
--with-jobid-env=NONE \
58+
--enable-pnetcdf-mod \
59+
--with-pnetcdf=${GITHUB_WORKSPACE}/PnetCDF \
60+
RUNTIME_CC=mpicc
61+
- name: Dump log files if configure failed
62+
if: ${{ failure() }}
63+
run: |
64+
cd ${GITHUB_WORKSPACE}/build
65+
echo "-------- config.log --------"
66+
cat config.log
67+
echo "-------- darshan-runtime/config.log --------"
68+
cat darshan-runtime/config.log
69+
echo "-------- darshan-util/config.log --------"
70+
cat darshan-util/config.log
71+
- name: Test make, make check, and make install
72+
if: ${{ success() }}
73+
run: |
74+
echo "make darshan-runtime and darshan-util"
75+
cd ${GITHUB_WORKSPACE}/build
76+
make -j 8
77+
echo "-------- make check --------"
78+
make check
79+
echo "-------- make install --------"
80+
make install
81+
- name: Run PnetCDF make check
82+
run: |
83+
cd ${GITHUB_WORKSPACE}/PnetCDF/pnetcdf-${PNETCDF_VERSION}
84+
make -s LIBTOOLFLAGS=--silent V=1 -j 8 tests > qout 2>&1
85+
export LD_PRELOAD=${GITHUB_WORKSPACE}/darshan_install/lib/libdarshan.so
86+
make check
87+
unset LD_PRELOAD
88+
- name: Print PnetCDF log files if make check failed
89+
if: ${{ failure() }}
90+
run: |
91+
cd ${GITHUB_WORKSPACE}/PnetCDF/pnetcdf-${PNETCDF_VERSION}
92+
cat src/utils/ncvalidator/*.log
93+
cat test/*/*.log
94+
- name: Run PnetCDF make ptest
95+
run: |
96+
cd ${GITHUB_WORKSPACE}/PnetCDF/pnetcdf-${PNETCDF_VERSION}
97+
export LD_PRELOAD=${GITHUB_WORKSPACE}/darshan_install/lib/libdarshan.so
98+
make ptest
99+
unset LD_PRELOAD
100+
make -s distclean >> qout 2>&1
101+
rm -f qout
102+
- name: Run Darshan make distcheck
103+
if: ${{ success() }}
104+
run: |
105+
echo "make distcheck"
106+
cd ${GITHUB_WORKSPACE}/build
107+
make distcheck DISTCHECK_CONFIGURE_FLAGS="--with-log-path-by-env=DARSHAN_LOGPATH --with-jobid-env=NONE --enable-hdf5-mod --with-hdf5=${GITHUB_WORKSPACE}/HDF5 --enable-pnetcdf-mod --with-pnetcdf=${GITHUB_WORKSPACE}/PnetCDF RUNTIME_CC=mpicc"
108+
- name: make distclean
109+
run: |
110+
echo "make distclean"
111+
cd ${GITHUB_WORKSPACE}/build
112+
make distclean
113+

0 commit comments

Comments
 (0)