-
Notifications
You must be signed in to change notification settings - Fork 35
CI: test all PnetCDF test programs #874
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
name: PnetCDF | ||
|
||
on: | ||
push: | ||
branches: main | ||
pull_request: | ||
branches: main | ||
|
||
env: | ||
PNETCDF_VERSION: 1.12.3 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install automake autoconf libtool libtool-bin m4 | ||
# mpi | ||
sudo apt-get install mpich | ||
# zlib | ||
sudo apt-get install zlib1g-dev | ||
- name: Install PnetCDF | ||
run: | | ||
echo "---- Install PnetCDF library into ${GITHUB_WORKSPACE}/PnetCDF" | ||
cd ${GITHUB_WORKSPACE} | ||
rm -rf PnetCDF | ||
mkdir PnetCDF | ||
cd PnetCDF | ||
wget -cq https://parallel-netcdf.github.io/Release/pnetcdf-${PNETCDF_VERSION}.tar.gz | ||
tar -zxf pnetcdf-${PNETCDF_VERSION}.tar.gz | ||
cd pnetcdf-${PNETCDF_VERSION} | ||
./configure --prefix=${GITHUB_WORKSPACE}/PnetCDF \ | ||
--silent \ | ||
--enable-shared \ | ||
MPICC=mpicc \ | ||
MPICXX=mpicxx \ | ||
MPIF77=mpifort \ | ||
MPIF90=mpifort | ||
make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1 | ||
rm -f qout | ||
- name: configure darshan-runtime and darshan-util | ||
if: ${{ success() }} | ||
run: | | ||
cd ${GITHUB_WORKSPACE} | ||
mkdir -p darshan_install | ||
# Darshan installation path | ||
export DARSHAN_INSTALL_PATH=${GITHUB_WORKSPACE}/darshan_install | ||
# Darshan log file path | ||
export DARSHAN_LOGPATH=${GITHUB_WORKSPACE}/logs | ||
mkdir -p $DARSHAN_LOGPATH | ||
# clone autoperf module | ||
git submodule update --init | ||
./prepare.sh | ||
mkdir -p build | ||
cd build | ||
../configure --prefix=$DARSHAN_INSTALL_PATH \ | ||
--with-log-path-by-env=DARSHAN_LOGPATH \ | ||
--with-jobid-env=NONE \ | ||
--enable-pnetcdf-mod \ | ||
--with-pnetcdf=${GITHUB_WORKSPACE}/PnetCDF \ | ||
RUNTIME_CC=mpicc | ||
- name: Dump configure log files if configure failed | ||
if: ${{ failure() }} | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/build | ||
echo "-------- config.log --------" | ||
cat config.log | ||
echo "-------- darshan-runtime/config.log --------" | ||
cat darshan-runtime/config.log | ||
echo "-------- darshan-util/config.log --------" | ||
cat darshan-util/config.log | ||
- name: Test make, make check, and make install | ||
if: ${{ success() }} | ||
run: | | ||
echo "make darshan-runtime and darshan-util" | ||
cd ${GITHUB_WORKSPACE}/build | ||
# Darshan log file path | ||
export DARSHAN_LOGPATH=${GITHUB_WORKSPACE}/logs | ||
make -j 8 | ||
echo "-------- make check --------" | ||
make check | ||
echo "-------- make install --------" | ||
make install | ||
- name: Run PnetCDF make check | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/PnetCDF/pnetcdf-${PNETCDF_VERSION} | ||
make -s LIBTOOLFLAGS=--silent V=1 -j 8 tests > qout 2>&1 | ||
# Darshan log file path | ||
export DARSHAN_LOGPATH=${GITHUB_WORKSPACE}/logs | ||
export LD_PRELOAD=${GITHUB_WORKSPACE}/darshan_install/lib/libdarshan.so | ||
make check | ||
unset LD_PRELOAD | ||
- name: Print PnetCDF log files if make check failed | ||
if: ${{ failure() }} | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/PnetCDF/pnetcdf-${PNETCDF_VERSION} | ||
cat src/utils/ncvalidator/*.log | ||
cat test/*/*.log | ||
- name: Run PnetCDF make ptest | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/PnetCDF/pnetcdf-${PNETCDF_VERSION} | ||
# Darshan log file path | ||
export DARSHAN_LOGPATH=${GITHUB_WORKSPACE}/logs | ||
export LD_PRELOAD=${GITHUB_WORKSPACE}/darshan_install/lib/libdarshan.so | ||
make ptest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Check log files are correctly generated here, too? Later on, we could add a script that checks more in-depth details as part of the workflow, but something simple is fine for now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How does one check whether a Darshan log file is correct or not? |
||
unset LD_PRELOAD | ||
make -s distclean >> qout 2>&1 | ||
rm -f qout | ||
- name: Run Darshan make distcheck | ||
if: ${{ success() }} | ||
run: | | ||
echo "make distcheck" | ||
cd ${GITHUB_WORKSPACE}/build | ||
make distcheck DISTCHECK_CONFIGURE_FLAGS="--with-log-path-by-env=DARSHAN_LOGPATH --with-jobid-env=NONE --enable-pnetcdf-mod --with-pnetcdf=${GITHUB_WORKSPACE}/PnetCDF RUNTIME_CC=mpicc" | ||
- name: make distclean | ||
run: | | ||
echo "make distclean" | ||
cd ${GITHUB_WORKSPACE}/build | ||
make distclean | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add simple logic here to test for existence of expected number of Darshan logs for these tests or something? You can see in the workflow output that no log files are created because we never set the DARSHAN_LOGPATH env variable. I think the least we could do is assert that the expected number of logs was generated (and that the log path is correctly set so Darshan can write them).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting DARSHAN_LOGPATH has been added.
How does Darshah check the number of log files?
Note the number of PnetCDF test programs can increase in new releases.