Commit 7f9e061c authored by Philip Carns's avatar Philip Carns

conditionally compile tests

- check separately for requirements for the pmdk, margo, and bake benchmarks
- compile whichever ones are compatible with the environment
- this is meant to make it easier to run certain benchmarks in
  incomplete environments
parent 5d6999e7
...@@ -37,36 +37,41 @@ if test "x$PKG_CONFIG" == "x"; then ...@@ -37,36 +37,41 @@ if test "x$PKG_CONFIG" == "x"; then
AC_MSG_ERROR([Could not find pkg-config utility!]) AC_MSG_ERROR([Could not find pkg-config utility!])
fi fi
PKG_CHECK_MODULES([MARGO],[margo],[], PKG_CHECK_MODULES([MARGO],[margo],[have_margo=1],
[AC_MSG_ERROR([Could not find working margo installation!])]) [AC_MSG_WARN([Could not find working margo installation])])
LIBS="$MARGO_LIBS $LIBS" LIBS="$MARGO_LIBS $LIBS"
CPPFLAGS="$MARGO_CFLAGS $CPPFLAGS" CPPFLAGS="$MARGO_CFLAGS $CPPFLAGS"
CFLAGS="$MARGO_CFLAGS $CFLAGS" CFLAGS="$MARGO_CFLAGS $CFLAGS"
PKG_CHECK_MODULES([SSG],[ssg],[], PKG_CHECK_MODULES([SSG],[ssg],[have_ssg=1],
[AC_MSG_ERROR([Could not find working ssg installation!])]) [AC_MSG_WARN([Could not find working ssg installation])])
LIBS="$SSG_LIBS $LIBS" LIBS="$SSG_LIBS $LIBS"
CPPFLAGS="$SSG_CFLAGS $CPPFLAGS" CPPFLAGS="$SSG_CFLAGS $CPPFLAGS"
CFLAGS="$SSG_CFLAGS $CFLAGS" CFLAGS="$SSG_CFLAGS $CFLAGS"
AC_CHECK_HEADERS(ssg-mpi.h,[], AC_CHECK_HEADERS(ssg-mpi.h,[have_ssg_mpi=1],
[AC_MSG_ERROR([Could not find ssg-mpi.h for MPI support in [AC_MSG_WARN([Could not find ssg-mpi.h for MPI support in SSG])])
SSG])])
PKG_CHECK_MODULES([BAKESERVER],[bake-server],[], PKG_CHECK_MODULES([BAKESERVER],[bake-server],[have_bake_server=1],
AC_MSG_ERROR([Could not find working BAKE server installation!]) ) AC_MSG_WARN([Could not find working BAKE server installation]) )
LIBS="$BAKESERVER_LIBS $LIBS" LIBS="$BAKESERVER_LIBS $LIBS"
CPPFLAGS="$BAKESERVER_CFLAGS $CPPFLAGS" CPPFLAGS="$BAKESERVER_CFLAGS $CPPFLAGS"
CFLAGS="$BAKESERVER_CFLAGS $CFLAGS" CFLAGS="$BAKESERVER_CFLAGS $CFLAGS"
PKG_CHECK_MODULES([BAKECLIENT],[bake-client],[], PKG_CHECK_MODULES([BAKECLIENT],[bake-client],[have_bake_client=1],
AC_MSG_ERROR([Could not find working BAKE client installation!]) ) AC_MSG_WARN([Could not find working BAKE client installation]) )
LIBS="$BAKECLIENT_LIBS $LIBS" LIBS="$BAKECLIENT_LIBS $LIBS"
CPPFLAGS="$BAKECLIENT_CFLAGS $CPPFLAGS" CPPFLAGS="$BAKECLIENT_CFLAGS $CPPFLAGS"
CFLAGS="$BAKECLIENT_CFLAGS $CFLAGS" CFLAGS="$BAKECLIENT_CFLAGS $CFLAGS"
PKG_CHECK_MODULES([LIBPMEMOBJ],[libpmemobj],[], PKG_CHECK_MODULES([ARGOBOTS],[argobots],[have_argobots=1],
[AC_MSG_ERROR([Could not find working libpmemobj installation!])]) AC_MSG_WARN([Could not find working Argobots installation]) )
LIBS="$ARGOBOTS_LIBS $LIBS"
CPPFLAGS="$ARGOBOTS_CFLAGS $CPPFLAGS"
CFLAGS="$ARGOBOTS_CFLAGS $CFLAGS"
PKG_CHECK_MODULES([LIBPMEMOBJ],[libpmemobj],[have_libpmemobj=1],
[AC_MSG_WARN([Could not find working libpmemobj installation])])
LIBS="$LIBPMEMOBJ_LIBS $LIBS" LIBS="$LIBPMEMOBJ_LIBS $LIBS"
CPPFLAGS="$LIBPMEMOBJ_CFLAGS $CPPFLAGS" CPPFLAGS="$LIBPMEMOBJ_CFLAGS $CPPFLAGS"
CFLAGS="$LIBPMEMOBJ_CFLAGS $CFLAGS" CFLAGS="$LIBPMEMOBJ_CFLAGS $CFLAGS"
...@@ -74,9 +79,15 @@ CFLAGS="$LIBPMEMOBJ_CFLAGS $CFLAGS" ...@@ -74,9 +79,15 @@ CFLAGS="$LIBPMEMOBJ_CFLAGS $CFLAGS"
AC_MSG_CHECKING([If MPI programs can be compiled]) AC_MSG_CHECKING([If MPI programs can be compiled])
AC_LINK_IFELSE( AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include<mpi.h>]], [[MPI_Init(0,0);]])], [AC_LANG_PROGRAM([[#include<mpi.h>]], [[MPI_Init(0,0);]])],
[AC_DEFINE([HAVE_MPI], [1], [Define to 1 if compiled with MPI support]) [have_mpi=1
AC_MSG_RESULT([yes])], AC_MSG_RESULT([yes])],
[AC_MSG_ERROR([Unable to compile MPI programs, try CC=mpicc])]) [AC_MSG_WARN([Unable to compile MPI programs, try CC=mpicc])])
# enable or disable test programs that depend on different combinations of
# functionality
AM_CONDITIONAL([HAVE_MARGO], [test "x${have_mpi}" = x1 && test "x${have_margo}" = x1 && test "x${have_ssg}" = x1 && test "x${have_ssg_mpi}" = x1])
AM_CONDITIONAL([HAVE_BAKE], [test "x${have_mpi}" = x1 && test "x${have_bake_client}" = x1 && test "x${have_bake_server}" = x1 && test "x${have_ssg}" = x1 && test "x${have_ssg_mpi}" = x1])
AM_CONDITIONAL([HAVE_PMDK], [test "x${have_libpmemobj}" = x1 && test "x${have_argobots}" = x1])
AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile])
AC_OUTPUT AC_OUTPUT
......
bin_PROGRAMS += perf-regression/margo-p2p-latency perf-regression/margo-p2p-bw perf-regression/bake-p2p-bw perf-regression/pmdk-bw if HAVE_MARGO
bin_PROGRAMS += perf-regression/margo-p2p-latency perf-regression/margo-p2p-bw
endif
if HAVE_BAKE
bin_PROGRAMS += perf-regression/bake-p2p-bw
endif
if HAVE_PMDK
bin_PROGRAMS += perf-regression/pmdk-bw
endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment