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

Add "make distcheck" to github action CI #844

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
116 changes: 116 additions & 0 deletions .github/workflows/runtime_util.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Ubuntu MPICH

on:
push:
branches: main
pull_request:
branches: main

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
VERSION=1.12.3
wget -cq https://parallel-netcdf.github.io/Release/pnetcdf-${VERSION}.tar.gz
tar -zxf pnetcdf-${VERSION}.tar.gz
cd pnetcdf-${VERSION}
./configure --prefix=${GITHUB_WORKSPACE}/PnetCDF \
--silent \
--disable-fortran \
--disable-cxx \
--disable-shared \
MPICC=mpicc
make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1
make -s distclean >> qout 2>&1
- name: Install HDF5
if: ${{ success() }}
run: |
echo "Install HDF5 library into ${GITHUB_WORKSPACE}/HDF5"
cd ${GITHUB_WORKSPACE}
rm -rf HDF5
mkdir HDF5
cd HDF5
VERSION=1.13.2
wget -cq https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.13/hdf5-${VERSION}/src/hdf5-${VERSION}.tar.gz
tar -zxf hdf5-${VERSION}.tar.gz
cd hdf5-${VERSION}
./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \
--silent \
--enable-hl \
--enable-parallel \
--enable-build-mode=production \
--disable-doxygen-doc \
--disable-doxygen-man \
--disable-doxygen-html \
--disable-tests \
CC=mpicc
make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1
make -s distclean >> qout 2>&1
- name: configure darshan-runtime and darshan-util
if: ${{ success() }}
run: |
echo "configure darshan-runtime and darshan-util"
cd ${GITHUB_WORKSPACE}
mkdir -p darshan_install
export DARSHAN_INSTALL_PATH=${GITHUB_WORKSPACE}/darshan_install
# 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-hdf5-mod \
--with-hdf5=${GITHUB_WORKSPACE}/HDF5 \
--enable-pnetcdf-mod \
--with-pnetcdf=${GITHUB_WORKSPACE}/PnetCDF \
RUNTIME_CC=mpicc
- name: Dump 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: make darshan-runtime and darshan-util
if: ${{ success() }}
run: |
echo "make darshan-runtime and darshan-util"
cd ${GITHUB_WORKSPACE}/build
make -j 8
echo "-------- make check --------"
make check
echo "-------- make install --------"
make install
- name: 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-hdf5-mod --with-hdf5=${GITHUB_WORKSPACE}/HDF5 --enable-pnetcdf-mod --with-pnetcdf=${GITHUB_WORKSPACE}/PnetCDF RUNTIME_CC=mpicc"
- name: make distclean
run: |
echo "make distclean"
cd ${GITHUB_WORKSPACE}/build
make distclean

3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ if BUILD_DARSHAN_UTIL
SUBDIRS += darshan-util
endif

EXTRA_DIST = doc \
EXTRA_DIST = modules \
doc \
darshan-test \
COPYRIGHT \
ChangeLog \
Expand Down
95 changes: 54 additions & 41 deletions darshan-runtime/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -276,31 +276,38 @@ if test "x$enable_darshan_runtime" = xyes ; then
fi
fi

# AUTOPERF MPI module
AC_ARG_ENABLE([apmpi-mod],
[AS_HELP_STRING([--enable-apmpi-mod],
[Enables compilation and use of AUTOPERF MPI module (requires MPI)])],
[], [enable_apmpi_mod=no]
)
if test "x$enable_apmpi_mod" = xyes ; then
if test "x$ENABLE_MPI" = xno ; then
AC_MSG_ERROR([--enable-apmpi-mod Autoperf MPI module requires MPI support])
fi
abssrcdir=$(readlink -f ${srcdir})
AC_CHECK_HEADER([${abssrcdir}/../modules/autoperf/apmpi/darshan-apmpi-log-format.h],
[],
[AC_MSG_ERROR([The Autoperf MPI module is not present])],
[-]) # this last part tells it to only check for presence
if test "x$ENABLE_MPI" = xyes ; then
AC_MSG_CHECKING([MPI Standard version implemented])
AC_COMPUTE_INT([mpi_version], [MPI_VERSION], [[#include <mpi.h>]])
AC_MSG_RESULT([${mpi_version}])
fi

# APMPI only support MPI v3 or higher
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <mpi.h>
#if MPI_VERSION < 3
#error MPI_VERSION < 3 detected
#endif]])], [],
[AC_MSG_ERROR([APMPI module requires MPI version 3+.])]
)
CFLAGS+=" -I${ac_abs_confdir}/../include"
# check AUTOPERF MPI module
if test "x$ENABLE_MPI" = xno ; then
# AUTOPERF MPI module requires MPI
enable_apmpi_mod=no
else
# AUTOPERF MPI module requires darshan-apmpi-log-format.h
AC_CHECK_FILE([${ac_abs_confdir}/../modules/autoperf/apmpi/darshan-apmpi-log-format.h],
[enable_apmpi_mod=yes], [enable_apmpi_mod=no])
saved_CFLAGS=$CFLAGS
if test "x$enable_apmpi_mod" = xyes ; then
CFLAGS+=" -I${ac_abs_confdir}/../modules/autoperf/apmpi"
AC_CHECK_HEADER([darshan-apmpi-log-format.h], [], [enable_apmpi_mod=no], [[#include <darshan-log-format.h>]])
fi
if test "x$enable_apmpi_mod" = xyes ; then
if test "x$mpi_version" = x ; then
AC_MSG_ERROR([MPI version information unavailable])
elif test $mpi_version -lt 3 ; then
AC_MSG_ERROR([APMPI module requires MPI version 3+])
fi
else
CFLAGS=$saved_CFLAGS
fi
fi
apmpi_root=$(readlink -f ${ac_abs_confdir}/../modules/autoperf/apmpi)
AC_SUBST(apmpi_root, [$apmpi_root])

AC_ARG_ENABLE([apmpi-coll-sync],
[AS_HELP_STRING([--enable-apmpi-coll-sync],
Expand All @@ -311,26 +318,32 @@ if test "x$enable_darshan_runtime" = xyes ; then
AC_DEFINE(__APMPI_COLL_SYNC, 1, Define if APMPI should enable sync time calculation for MPI collectives)
fi

#AUTOPERF XC module
AC_ARG_ENABLE([apxc-mod],
[AS_HELP_STRING([--enable-apxc-mod],
[Enables compilation and use of AUTOPERF XC module (requires MPI)])],
[], [enable_apxc_mod=no]
)
if test "x$enable_apxc_mod" = xyes ; then
if test "x$ENABLE_MPI" = xno ; then
AC_MSG_ERROR([--enable-apxc-mod Autoperf XC module requires MPI support])
fi
abssrcdir=$(readlink -f ${srcdir})
# check AUTOPERF XC module
if test "x$ENABLE_MPI" = xno ; then
# AUTOPERF XC module requires MPI
enable_apxc_mod=no
else
# AUTOPERF XC module requires papi.h
AC_CHECK_HEADER([papi.h],
[with_papi=-lpapi],
[AC_MSG_ERROR([Cannot find papi header required for Autoperf XC module])],
[])
AC_CHECK_HEADER([${abssrcdir}/../modules/autoperf/apxc/darshan-apxc-log-format.h],
[],
[AC_MSG_ERROR([The Autoperf XC git submodule is not present])],
[-]) # this last part tells it to only check for presence
[enable_apxc_mod=yes ; with_papi=-lpapi],
[enable_apxc_mod=no], [])

if test "x$enable_apxc_mod" = xyes ; then
# AUTOPERF XC module requires darshan-apxc-log-format.h
AC_CHECK_FILE([${ac_abs_confdir}/../modules/autoperf/apxc/darshan-apxc-log-format.h],
[enable_apxc_mod=yes], [enable_apxc_mod=no])
saved_CFLAGS=$CFLAGS
if test "x$enable_apxc_mod" = xyes ; then
CFLAGS+=" -I${ac_abs_confdir}/../modules/autoperf/apxc"
AC_CHECK_HEADER([darshan-apxc-log-format.h], [], [enable_apxc_mod=no], [[#include <darshan-log-format.h>]])
fi
if test "x$enable_apxc_mod" = xno ; then
CFLAGS=$saved_CFLAGS
fi
fi
fi
apxc_root=$(readlink -f ${ac_abs_confdir}/../modules/autoperf/apxc)
AC_SUBST(apxc_root, [$apxc_root])

# inform about HDF5 installs not found in default locations
AC_ARG_WITH([hdf5],
Expand Down
8 changes: 2 additions & 6 deletions darshan-runtime/lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,8 @@ endif

CLEANFILES = darshan-pnetcdf-api.c

include_HEADERS =
apxc_root = $(top_srcdir)/../modules/autoperf/apxc
apxc_root = @apxc_root@
if BUILD_APXC_MODULE
include_HEADERS += $(apxc_root)/darshan-apxc-log-format.h \
$(apxc_root)/lib/darshan-apxc-utils.h
BUILT_SOURCES += darshan-apxc.c
CLEANFILES += darshan-apxc.c
C_SRCS += darshan-apxc.c
Expand All @@ -89,9 +86,8 @@ endif
darshan-apxc.c:
$(LN_S) $(apxc_root)/lib/darshan-apxc.c .

apmpi_root = $(top_srcdir)/../modules/autoperf/apmpi
apmpi_root = @apmpi_root@
if BUILD_APMPI_MODULE
include_HEADERS += $(apmpi_root)/darshan-apmpi-log-format.h
BUILT_SOURCES += darshan-apmpi.c
CLEANFILES += darshan-apmpi.c
C_SRCS += darshan-apmpi.c
Expand Down
8 changes: 2 additions & 6 deletions darshan-util/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,8 @@ uthash-1.9.2:
nobase_include_HEADERS = uthash-1.9.2/src/uthash.h

CLEANFILES =
apxc_root = $(top_srcdir)/../modules/autoperf/apxc
apxc_root = @apxc_root@
if DARSHAN_USE_APXC
include_HEADERS += $(apxc_root)/darshan-apxc-log-format.h \
$(apxc_root)/util/darshan-apxc-logutils.h
BUILT_SOURCES += darshan-apxc-logutils.c
CLEANFILES += darshan-apxc-logutils.c
libdarshan_util_la_SOURCES += darshan-apxc-logutils.c
Expand All @@ -102,10 +100,8 @@ endif
darshan-apxc-logutils.c:
$(LN_S) $(apxc_root)/util/darshan-apxc-logutils.c .

apmpi_root = $(top_srcdir)/../modules/autoperf/apmpi
apmpi_root = @apmpi_root@
if DARSHAN_USE_APMPI
include_HEADERS += $(apmpi_root)/darshan-apmpi-log-format.h \
$(apmpi_root)/util/darshan-apmpi-logutils.h
BUILT_SOURCES += darshan-apmpi-logutils.c
CLEANFILES += darshan-apmpi-logutils.c
libdarshan_util_la_SOURCES += darshan-apmpi-logutils.c
Expand Down
47 changes: 27 additions & 20 deletions darshan-util/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -88,28 +88,35 @@ if test "x$enable_darshan_util" = xyes ; then
AC_CONFIG_FILES([pydarshan-info.py pydarshan-info.sh])
fi

AC_ARG_ENABLE([apxc_mod],
[AS_HELP_STRING([--enable-apxc-mod],
[enables compilation and use of the AutoPerf Cray XC module])],
[], [enable_apxc_mod=no]
)
if test "x$enable_apxc_mod" = xyes; then
AC_CHECK_HEADER([${ac_abs_confdir}/../modules/autoperf/apxc/darshan-apxc-log-format.h],
DARSHAN_USE_APXC=1,
[AC_MSG_ERROR([The autoperf APXC module is not present])],
[-]) # this last part tells it to only check for presence
CFLAGS+=" -I${ac_abs_confdir}/../include"

# AUTOPERF XC module requires darshan-apxc-log-format.h
AC_CHECK_FILE([${ac_abs_confdir}/../modules/autoperf/apxc/darshan-apxc-log-format.h],
[enable_apxc_mod=yes], [enable_apxc_mod=no])
saved_CFLAGS=$CFLAGS
if test "x$enable_apxc_mod" = xyes ; then
CFLAGS+=" -I${ac_abs_confdir}/../modules/autoperf/apxc"
AC_CHECK_HEADER([darshan-apxc-log-format.h], [], [enable_apxc_mod=no], [[#include <darshan-log-format.h>]])
fi
AC_ARG_ENABLE([apmpi_mod],
[AS_HELP_STRING([--enable-apmpi-mod],
[enables compilation and use of the AutoPerf MPI module])],
[], [enable_apmpi_mod=no]
)
if test "x$enable_apmpi_mod" = xyes; then
AC_CHECK_HEADER([${ac_abs_confdir}/../modules/autoperf/apmpi/darshan-apmpi-log-format.h],
DARSHAN_USE_APMPI=1,
[AC_MSG_ERROR([The autoperf MPI module is not present])],
[-]) # this last part tells it to only check for presence
if test "x$enable_apxc_mod" = xno ; then
CFLAGS=$saved_CFLAGS
fi
apxc_root=$(readlink -f ${ac_abs_confdir}/../modules/autoperf/apxc)
AC_SUBST(apxc_root, [$apxc_root])

# AUTOPERF MPI module requires darshan-apmpi-log-format.h
AC_CHECK_FILE([${ac_abs_confdir}/../modules/autoperf/apmpi/darshan-apmpi-log-format.h],
[enable_apmpi_mod=yes], [enable_apmpi_mod=no])
saved_CFLAGS=$CFLAGS
if test "x$enable_apmpi_mod" = xyes ; then
CFLAGS+=" -I${ac_abs_confdir}/../modules/autoperf/apmpi"
AC_CHECK_HEADER([darshan-apmpi-log-format.h], [], [enable_apmpi_mod=no], [[#include <darshan-log-format.h>]])
fi
if test "x$enable_apmpi_mod" = xno ; then
CFLAGS=$saved_CFLAGS
fi
apmpi_root=$(readlink -f ${ac_abs_confdir}/../modules/autoperf/apmpi)
AC_SUBST(apmpi_root, [$apmpi_root])

AC_CHECK_FUNCS([strndup])

Expand Down