Commit 9dfed193 authored by Shane Snyder's avatar Shane Snyder
Browse files

Merge branch 'dev-no-mpi' into HEAD

parents fbd70e64 e12c75c2
all: lib/libdarshan.a lib/libdarshan-stubs.a lib/darshan-null.o
#TODO: each module provides own makefile with module-specific objects, build options, etc. #TODO: each module provides own makefile with module-specific objects, build options, etc.
DESTDIR = DESTDIR =
...@@ -16,15 +14,17 @@ LDFLAGS = @LDFLAGS@ ...@@ -16,15 +14,17 @@ LDFLAGS = @LDFLAGS@
CC = @CC@ CC = @CC@
LD = @LD@ LD = @LD@
DISABLE_STATIC_LIB = @DISABLE_STATIC_LIB@
DISABLE_LDPRELOAD = @DISABLE_LDPRELOAD@ DISABLE_LDPRELOAD = @DISABLE_LDPRELOAD@
ENABLE_MMAP_LOGS = @ENABLE_MMAP_LOGS@ ENABLE_MMAP_LOGS = @ENABLE_MMAP_LOGS@
DARSHAN_USE_BGQ = @DARSHAN_USE_BGQ@
DARSHAN_USE_LUSTRE = @DARSHAN_USE_LUSTRE@
DARSHAN_LOG_FORMAT = $(srcdir)/../darshan-log-format.h DARSHAN_LOG_FORMAT = $(srcdir)/../darshan-log-format.h
DARSHAN_VERSION = @DARSHAN_VERSION@ DARSHAN_VERSION = @DARSHAN_VERSION@
ifndef DISABLE_STATIC_LIB
all: lib/libdarshan.a lib/libdarshan-stubs.a
endif
ifndef DISABLE_LDPRELOAD ifndef DISABLE_LDPRELOAD
all: lib/libdarshan.so lib/darshan-null.po all: lib/libdarshan.so
endif endif
VPATH = $(srcdir) VPATH = $(srcdir)
...@@ -35,25 +35,63 @@ CFLAGS_SHARED = -DDARSHAN_CONFIG_H=\"darshan-runtime-config.h\" -I . -I$(srcdir) ...@@ -35,25 +35,63 @@ CFLAGS_SHARED = -DDARSHAN_CONFIG_H=\"darshan-runtime-config.h\" -I . -I$(srcdir)
LIBS = -lz @LIBBZ2@ LIBS = -lz @LIBBZ2@
BUILD_NULL_MODULE = @BUILD_NULL_MODULE@
BUILD_POSIX_MODULE = @BUILD_POSIX_MODULE@
BUILD_STDIO_MODULE = @BUILD_STDIO_MODULE@
BUILD_DXT_MODULE = @BUILD_DXT_MODULE@
BUILD_MPIIO_MODULE = @BUILD_MPIIO_MODULE@
BUILD_PNETCDF_MODULE = @BUILD_PNETCDF_MODULE@
BUILD_HDF5_MODULE = @BUILD_HDF5_MODULE@ BUILD_HDF5_MODULE = @BUILD_HDF5_MODULE@
BUILD_BGQ_MODULE = @BUILD_BGQ_MODULE@
BUILD_LUSTRE_MODULE = @BUILD_LUSTRE_MODULE@
BUILD_MDHIM_MODULE = @BUILD_MDHIM_MODULE@ BUILD_MDHIM_MODULE = @BUILD_MDHIM_MODULE@
DARSHAN_STATIC_MOD_OBJS = lib/darshan-posix.o lib/darshan-mpiio.o lib/darshan-pnetcdf.o lib/darshan-stdio.o lib/darshan-dxt.o DARSHAN_STATIC_MOD_OBJS =
DARSHAN_DYNAMIC_MOD_OBJS = lib/darshan-posix.po lib/darshan-mpiio.po lib/darshan-pnetcdf.po lib/darshan-stdio.po lib/darshan-dxt.po DARSHAN_DYNAMIC_MOD_OBJS =
ifdef BUILD_NULL_MODULE
DARSHAN_STATIC_MOD_OBJS += lib/darshan-null.o
DARSHAN_DYNAMIC_MOD_OBJS += lib/darshan-null.po
endif
ifdef BUILD_POSIX_MODULE
DARSHAN_STATIC_MOD_OBJS += lib/darshan-posix.o
DARSHAN_DYNAMIC_MOD_OBJS += lib/darshan-posix.po
endif
ifdef BUILD_STDIO_MODULE
DARSHAN_STATIC_MOD_OBJS += lib/darshan-stdio.o
DARSHAN_DYNAMIC_MOD_OBJS += lib/darshan-stdio.po
endif
ifdef BUILD_DXT_MODULE
DARSHAN_STATIC_MOD_OBJS += lib/darshan-dxt.o
DARSHAN_DYNAMIC_MOD_OBJS += lib/darshan-dxt.po
endif
ifdef BUILD_MPIIO_MODULE
DARSHAN_STATIC_MOD_OBJS += lib/darshan-mpiio.o
DARSHAN_DYNAMIC_MOD_OBJS += lib/darshan-mpiio.po
endif
ifdef BUILD_PNETCDF_MODULE
DARSHAN_STATIC_MOD_OBJS += lib/darshan-pnetcdf.o
DARSHAN_DYNAMIC_MOD_OBJS += lib/darshan-pnetcdf.po
endif
ifdef BUILD_HDF5_MODULE ifdef BUILD_HDF5_MODULE
DARSHAN_STATIC_MOD_OBJS += lib/darshan-hdf5.o DARSHAN_STATIC_MOD_OBJS += lib/darshan-hdf5.o
DARSHAN_DYNAMIC_MOD_OBJS += lib/darshan-hdf5.po DARSHAN_DYNAMIC_MOD_OBJS += lib/darshan-hdf5.po
endif endif
ifdef DARSHAN_USE_BGQ ifdef BUILD_BGQ_MODULE
DARSHAN_STATIC_MOD_OBJS += lib/darshan-bgq.o DARSHAN_STATIC_MOD_OBJS += lib/darshan-bgq.o
DARSHAN_DYNAMIC_MOD_OBJS += lib/darshan-bgq.po DARSHAN_DYNAMIC_MOD_OBJS += lib/darshan-bgq.po
CFLAGS += -DDARSHAN_BGQ CFLAGS += -DDARSHAN_BGQ
CFLAGS_SHARED += -DDARSHAN_BGQ CFLAGS_SHARED += -DDARSHAN_BGQ
endif endif
ifdef DARSHAN_USE_LUSTRE ifdef BUILD_LUSTRE_MODULE
DARSHAN_STATIC_MOD_OBJS += lib/darshan-lustre.o DARSHAN_STATIC_MOD_OBJS += lib/darshan-lustre.o
DARSHAN_DYNAMIC_MOD_OBJS += lib/darshan-lustre.po DARSHAN_DYNAMIC_MOD_OBJS += lib/darshan-lustre.po
CFLAGS += -DDARSHAN_LUSTRE CFLAGS += -DDARSHAN_LUSTRE
...@@ -184,8 +222,10 @@ endif ...@@ -184,8 +222,10 @@ endif
install:: all install:: all
install -d $(libdir) install -d $(libdir)
ifndef DISABLE_STATIC_LIB
install -m 755 lib/libdarshan.a $(libdir) install -m 755 lib/libdarshan.a $(libdir)
install -m 755 lib/libdarshan-stubs.a $(libdir) install -m 755 lib/libdarshan-stubs.a $(libdir)
endif
ifndef DISABLE_LDPRELOAD ifndef DISABLE_LDPRELOAD
install -m 755 lib/libdarshan.so $(libdir) install -m 755 lib/libdarshan.so $(libdir)
endif endif
...@@ -208,16 +248,24 @@ endif ...@@ -208,16 +248,24 @@ endif
install -m 755 share/mpi-profile/darshan-bg-f.conf $(datarootdir)/mpi-profile/darshan-bg-f.conf install -m 755 share/mpi-profile/darshan-bg-f.conf $(datarootdir)/mpi-profile/darshan-bg-f.conf
install -d $(datarootdir)/ld-opts install -d $(datarootdir)/ld-opts
install -m 644 share/ld-opts/darshan-base-ld-opts $(datarootdir)/ld-opts/darshan-base-ld-opts install -m 644 share/ld-opts/darshan-base-ld-opts $(datarootdir)/ld-opts/darshan-base-ld-opts
ifdef BUILD_POSIX_MODULE
install -m 644 $(srcdir)/share/ld-opts/darshan-posix-ld-opts $(datarootdir)/ld-opts/darshan-posix-ld-opts install -m 644 $(srcdir)/share/ld-opts/darshan-posix-ld-opts $(datarootdir)/ld-opts/darshan-posix-ld-opts
endif
ifdef BUILD_STDIO_MODULE
install -m 644 $(srcdir)/share/ld-opts/darshan-stdio-ld-opts $(datarootdir)/ld-opts/darshan-stdio-ld-opts
endif
ifdef BUILD_MPIIO_MODULE
install -m 644 $(srcdir)/share/ld-opts/darshan-mpiio-ld-opts $(datarootdir)/ld-opts/darshan-mpiio-ld-opts
endif
ifdef BUILD_PNETCDF_MODULE
install -m 644 $(srcdir)/share/ld-opts/darshan-pnetcdf-ld-opts $(datarootdir)/ld-opts/darshan-pnetcdf-ld-opts
endif
ifdef BUILD_HDF5_MODULE ifdef BUILD_HDF5_MODULE
install -m 644 $(srcdir)/share/ld-opts/darshan-hdf5-ld-opts $(datarootdir)/ld-opts/darshan-hdf5-ld-opts install -m 644 $(srcdir)/share/ld-opts/darshan-hdf5-ld-opts $(datarootdir)/ld-opts/darshan-hdf5-ld-opts
endif endif
ifdef BUILD_MDHIM_MODULE ifdef BUILD_MDHIM_MODULE
install -m 644 $(srcdir)/share/ld-opts/darshan-mdhim-ld-opts $(datarootdir)/ld-opts/darshan-mdhim-ld-opts install -m 644 $(srcdir)/share/ld-opts/darshan-mdhim-ld-opts $(datarootdir)/ld-opts/darshan-mdhim-ld-opts
endif endif
install -m 644 $(srcdir)/share/ld-opts/darshan-pnetcdf-ld-opts $(datarootdir)/ld-opts/darshan-pnetcdf-ld-opts
install -m 644 $(srcdir)/share/ld-opts/darshan-stdio-ld-opts $(datarootdir)/ld-opts/darshan-stdio-ld-opts
install -m 644 $(srcdir)/share/ld-opts/darshan-mpiio-ld-opts $(datarootdir)/ld-opts/darshan-mpiio-ld-opts
ifdef ENABLE_MMAP_LOGS ifdef ENABLE_MMAP_LOGS
install -m 755 share/darshan-mmap-epilog.sh $(datarootdir)/darshan-mmap-epilog.sh install -m 755 share/darshan-mmap-epilog.sh $(datarootdir)/darshan-mmap-epilog.sh
endif endif
...@@ -225,8 +273,8 @@ endif ...@@ -225,8 +273,8 @@ endif
install -m 644 lib/pkgconfig/darshan-runtime.pc $(libdir)/pkgconfig/darshan-runtime.pc install -m 644 lib/pkgconfig/darshan-runtime.pc $(libdir)/pkgconfig/darshan-runtime.pc
clean:: clean::
rm -f *.o *.a lib/*.o lib/*.po lib/*.a lib/*.so rm -f *.o *.a lib/*.o lib/*.po lib/*.a lib/*.so
distclean:: clean distclean:: clean
rm -f darshan-runtime-config.h darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-gen-cc.pl darshan-mk-log-dirs.pl darshan-config lib/pkgconfig/darshan-runtime.pc share/craype-1.x/darshan-module share/craype-2.x/darshan-module share/darshan-mmap-epilog.sh share/ld-opts/darshan-base-ld-opts share/mpi-profile/darshan-bg-cc.conf share/mpi-profile/darshan-bg-cxx.conf share/mpi-profile/darshan-bg-f.conf share/mpi-profile/darshan-cc.conf share/mpi-profile/darshan-cxx.conf share/mpi-profile/darshan-f.conf aclocal.m4 autom4te.cache/* config.status config.log Makefile rm -f darshan-runtime-config.h darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-gen-cc.pl darshan-mk-log-dirs.pl darshan-config lib/pkgconfig/darshan-runtime.pc share/craype-1.x/darshan-module share/craype-2.x/darshan-module share/darshan-mmap-epilog.sh share/ld-opts/darshan-base-ld-opts share/mpi-profile/darshan-bg-cc.conf share/mpi-profile/darshan-bg-cxx.conf share/mpi-profile/darshan-bg-f.conf share/mpi-profile/darshan-cc.conf share/mpi-profile/darshan-cxx.conf share/mpi-profile/darshan-f.conf aclocal.m4 autom4te.cache/* config.status config.log Makefile
rm -rf autom4te.cache rm -rf autom4te.cache
This diff is collapsed.
...@@ -8,58 +8,95 @@ dnl sanity checks, output header, location of scripts used here ...@@ -8,58 +8,95 @@ dnl sanity checks, output header, location of scripts used here
AC_INIT([darshan-runtime], [3.1.8]) AC_INIT([darshan-runtime], [3.1.8])
AC_CONFIG_SRCDIR([darshan.h]) AC_CONFIG_SRCDIR([darshan.h])
AC_CONFIG_AUX_DIR(../maint/config) AC_CONFIG_AUX_DIR(../maint/config)
AC_CONFIG_MACRO_DIR(../maint/config)
AC_CONFIG_HEADER(darshan-runtime-config.h) AC_CONFIG_HEADER(darshan-runtime-config.h)
AC_PROG_INSTALL AC_PROG_INSTALL
dnl Check to see if CC is an MPI compiler # We need to know the value of the $libdir and $bindir variables so that
dnl TODO: better error message here # we can reference the correct path in the darshan compiler wrappers.
AC_MSG_CHECKING(whether the mpicc compiler works) # Unfortunately, those two variables are not normally evaluated by autoconf.
AC_TRY_COMPILE([#include <mpi.h>], [int ret = MPI_Init(0, (void*)0)], # They are evaluated at build time using Makefile variable substitutions.
AC_MSG_RESULT(yes), #
AC_MSG_RESULT(no) # The following logic was copied from mpich2 1.3.1 to resolve the $libdir
AC_MSG_ERROR(CC doesn't appear to be a valid MPI compiler. See INSTALL document or try adding CC=mpicc to your configure command line.) # variable at configure time.
) #
# Temporarily replace the default NONE value for exec_prefix
# and prefix with the actual, default values.
savePrefix=$prefix
saveExecprefix=$exec_prefix
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
eval darshan_lib_path=$libdir
eval darshan_share_path=$datarootdir
prefix=$savePrefix
exec_prefix=$saveExecprefix
dnl Check for MPI
AC_ARG_WITH(mpi,
[AS_HELP_STRING([--without-mpi], [Build without support for MPI])],
,
[with_mpi=check])
AX_PROG_CC_MPI([test x"$with_mpi" != xno],
[use_mpi=yes],
[use_mpi=no])
ENABLE_MPI=1
AS_IF([test "x$use_mpi" = "xno"],
[ENABLE_MPI=
AS_IF([test "x$with_mpi" = "xyes"],
[AC_MSG_ERROR([CC doesn't appear to be a valid MPI compiler and MPI support was requested. See INSTALL document or try adding CC=mpicc to your configure command line.])],)],
[ENABLE_MPI=1
AC_DEFINE([HAVE_MPI], [], [Define if build is MPI-enabled])])
AS_IF([test "x$ENABLE_MPI" = "x"],
DISABLE_STATIC_LIB=1,)
dnl check for GCC compiler support
AC_ARG_WITH(gcc,
[AS_HELP_STRING([--without-gcc], [Build without a GCC-compatible compiler])],
,
[with_gcc=yes])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM(,[
#ifndef __GNUC__
#error GCC ERROR
#endif
])],
[],
[AS_IF([test "x$with_gcc" = "xyes"],
[AC_MSG_ERROR([CC doesn't appear to be a GNU-compatible compiler, which is strongly recommended for building Darshan. To force use of a non-GCC compatible compiler, add --without-gcc to your configure command line.])],)])
dnl runtime libraries require zlib dnl runtime libraries require zlib
CHECK_ZLIB CHECK_ZLIB
AC_ARG_ENABLE(ld-preload, AC_ARG_ENABLE(ld-preload,
[ --disable-ld-preload Disables support for LD_PRELOAD library], [ --disable-ld-preload Disables support for LD_PRELOAD library],
[if test "x$enableval" = "xno" ; then [if test "x$enableval" = "xno" ; then
if test "x$ENABLE_MPI" = "x" ; then
AC_MSG_ERROR([Can not disable building of LD_PRELOAD library when building Darshan without MPI support.])
fi
DISABLE_LDPRELOAD="1" DISABLE_LDPRELOAD="1"
fi] fi]
,) ,)
AC_ARG_ENABLE(cuserid, AC_ARG_ENABLE(cuserid,
[ --disable-cuserid Disables attempted use of cuserid() at run time], [ --disable-cuserid Disables attempted use of cuserid() at run time],
[if test "x$enableval" = "xno" ; then [if test "x$enableval" = "xno" ; then
AC_DEFINE(__DARSHAN_DISABLE_CUSERID, 1, Define if cuserid() should be disabled) AC_DEFINE(__DARSHAN_DISABLE_CUSERID, 1, Define if cuserid() should be disabled)
fi] fi]
,) ,)
AC_ARG_ENABLE(group-readable-logs, AC_ARG_ENABLE(group-readable-logs,
[ --enable-group-readable-logs [ --enable-group-readable-logs
Set log files to be group readable], Set log files to be group readable],
[if test "x$enableval" = "xyes" ; then [if test "x$enableval" = "xyes" ; then
AC_DEFINE(__DARSHAN_GROUP_READABLE_LOGS, 1, Define if Darshan should set log files to be group readable) AC_DEFINE(__DARSHAN_GROUP_READABLE_LOGS, 1, Define if Darshan should set log files to be group readable)
fi] fi]
,) ,)
AC_ARG_ENABLE(
[bgq-mod],
[ --disable-bgq-mod Disables compilation and use of BG/Q module (for BG/Q systems)],
[],
[enable_bgq_mod=check]
)
AC_ARG_ENABLE(
[lustre-mod],
[ --disable-lustre-mod Disables compilation and use of the Lustre module],
[],
[enable_lustre_mod=check]
)
AC_ARG_ENABLE(mmap-logs, AC_ARG_ENABLE(mmap-logs,
[ --enable-mmap-logs Enables ability to mmap I/O data to log file], [ --enable-mmap-logs Enables ability to mmap I/O data to log file],
[if test "x$enableval" = "xyes" ; then [if test "x$enableval" = "xyes" ; then
...@@ -118,7 +155,7 @@ AC_ARG_WITH(log-path, ...@@ -118,7 +155,7 @@ AC_ARG_WITH(log-path,
AC_ARG_WITH(jobid-env, AC_ARG_WITH(jobid-env,
[ --with-jobid-env=<name> Name of environment variable that stores the jobid [ --with-jobid-env=<name> Name of environment variable that stores the jobid
(specify "NONE" if no appropriate environment variable (specify "NONE" if no appropriate environment variable
is available: Darshan will use rank 0's pid instead)], is available: Darshan will use the pid of rank 0)],
if test x$withval = xyes; then if test x$withval = xyes; then
AC_MSG_ERROR(--with-jobid-env must be given a name) AC_MSG_ERROR(--with-jobid-env must be given a name)
else else
...@@ -137,6 +174,97 @@ AC_ARG_WITH(mod-mem, ...@@ -137,6 +174,97 @@ AC_ARG_WITH(mod-mem,
fi fi
) )
#
# Check for specific module enable/disable options
#
# NULL module
BUILD_NULL_MODULE=1
AC_ARG_ENABLE(null-mod,
AS_HELP_STRING([--disable-null-mod], [Disables compilation of NULL module]))
AS_IF([test "x$enable_null_mod" = "xno"],
BUILD_NULL_MODULE=)
# POSIX module
BUILD_POSIX_MODULE=1
DARSHAN_POSIX_LD_OPTS="@${darshan_share_path}/ld-opts/darshan-posix-ld-opts"
AC_ARG_ENABLE(posix-mod,
AS_HELP_STRING([--disable-posix-mod], [Disables compilation and use of POSIX module]))
AS_IF([test "x$enable_posix_mod" = "xno"],
BUILD_POSIX_MODULE=
DARSHAN_POSIX_LD_OPTS=)
# STDIO module
BUILD_STDIO_MODULE=1
DARSHAN_STDIO_LD_OPTS="@${darshan_share_path}/ld-opts/darshan-stdio-ld-opts"
AC_ARG_ENABLE(stdio-mod,
AS_HELP_STRING([--disable-stdio-mod], [Disables compilation and use of STDIO module]))
AS_IF([test "x$enable_stdio_mod" = "xno"],
BUILD_STDIO_MODULE=
DARSHAN_STDIO_LD_OPTS=)
# DXT module
BUILD_DXT_MODULE=1
AC_ARG_ENABLE(dxt-mod,
AS_HELP_STRING([--disable-dxt-mod], [Disables compilation and use of DXT module]))
AS_IF([test "x$enable_dxt_mod" = "xno"],
BUILD_DXT_MODULE=)
# MPI-IO module
BUILD_MPIIO_MODULE=1
DARSHAN_MPIIO_LD_OPTS="@${darshan_share_path}/ld-opts/darshan-mpiio-ld-opts"
AC_ARG_ENABLE(mpiio-mod,
AS_HELP_STRING([--disable-mpiio-mod], [Disables compilation and use of MPI-IO module (requires MPI)]))
AS_IF([test "x$enable_mpiio_mod" = "xno" || test "x$ENABLE_MPI" = "x"],
BUILD_MPIIO_MODULE=
DARSHAN_MPIIO_LD_OPTS=)
# PNETCDF module
BUILD_PNETCDF_MODULE=1
DARSHAN_PNETCDF_LD_OPTS="@${darshan_share_path}/ld-opts/darshan-pnetcdf-ld-opts"
AC_ARG_ENABLE(pnetcdf-mod,
AS_HELP_STRING([--disable-pnetcdf-mod], [Disables compilation and use of PnetCDF module (requires MPI)]))
AS_IF([test "x$enable_pnetcdf_mod" = "xno" || test "x$ENABLE_MPI" = "x"],
BUILD_PNETCDF_MODULE=
DARSHAN_PNETCDF_LD_OPTS=)
# HDF5 module
BUILD_HDF5_MODULE=
BUILD_HDF5_POST110=
DARSHAN_HDF5_LD_OPTS=
# see if user explicitly enabled support for an HDF5 API
AC_ARG_ENABLE(HDF5-post-1.10,
[ --enable-HDF5-post-1.10
Enable HDF5 module for HDF5 version 1.10 or later],
[if test "x$enableval" = "xyes" ; then
AC_DEFINE(__DARSHAN_ENABLE_HDF5110, 1, Set for compatibility with HDF5 1.10.x, breaks use with versions earlier than 1.10)
if test "x$BUILD_HDF5_MODULE" = "x1"; then
AC_MSG_ERROR([Cannot set both --enable-HDF5-post-1.10 and --enable-HDF5-pre-1.10])
fi
BUILD_HDF5_MODULE=1
BUILD_HDF5_POST110=1
DARSHAN_HDF5_LD_OPTS="@${darshan_share_path}/ld-opts/darshan-hdf5-ld-opts"
fi]
,)
AC_ARG_ENABLE(HDF5-pre-1.10,
[ --enable-HDF5-pre-1.10
Enable HDF5 module for HDF5 versions earlier than 1.10],
[if test "x$enableval" = "xyes" ; then
if test "x$BUILD_HDF5_MODULE" = "x1"; then
AC_MSG_ERROR([Cannot set both --enable-HDF5-post-1.10 and --enable-HDF5-pre-1.10])
fi
BUILD_HDF5_MODULE=1
DARSHAN_HDF5_LD_OPTS="@${darshan_share_path}/ld-opts/darshan-hdf5-ld-opts"
fi]
,)
# BG/Q module
BUILD_BGQ_MODULE=
AC_ARG_ENABLE(bgq-mod,
AS_HELP_STRING([--disable-bgq-mod], [Disables compilation and use of BG/Q module (for BG/Q systems)]),
[],
[enable_bgq_mod=check])
# if bgq module not disabled, check to make sure BG/Q environment available # if bgq module not disabled, check to make sure BG/Q environment available
if test x$enable_bgq_mod != xno; then if test x$enable_bgq_mod != xno; then
AC_MSG_CHECKING(for BG/Q environment) AC_MSG_CHECKING(for BG/Q environment)
...@@ -146,23 +274,44 @@ if test x$enable_bgq_mod != xno; then ...@@ -146,23 +274,44 @@ if test x$enable_bgq_mod != xno; then
#endif #endif
], [], ], [],
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
DARSHAN_USE_BGQ=1, BUILD_BGQ_MODULE=1,
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
AS_IF([test "x$enable_bgq_mod" = xyes], AS_IF([test "x$enable_bgq_mod" = xyes],
AC_MSG_ERROR(BG/Q module enabled in non-BG/Q environment), AC_MSG_ERROR(BG/Q module enabled in non-BG/Q environment),
[])) []))
fi fi
# Lustre module
BUILD_LUSTRE_MODULE=
AC_ARG_ENABLE(lustre-mod,
AS_HELP_STRING([--disable-lustre-mod], [Disables compilation and use of Lustre module]),
[],
[enable_lustre_mod=check])
# if lustre module not disabled, check for needed Lustre module header # if lustre module not disabled, check for needed Lustre module header
if test x$enable_lustre_mod != xno; then if test x$enable_lustre_mod != xno; then
AC_CHECK_HEADER([lustre/lustre_user.h], AC_CHECK_HEADER([lustre/lustre_user.h],
DARSHAN_USE_LUSTRE=1, BUILD_LUSTRE_MODULE=1,
AS_IF([test "x$enable_lustre_mod" = xyes], AS_IF([test "x$enable_lustre_mod" = xyes],
AC_MSG_ERROR(Cannot find required headers for the Lustre module), AC_MSG_ERROR(Cannot find required headers for the Lustre module),
[])) []))
fi fi
BUILD_MDHIM_MODULE=
DARSHAN_MDHIM_LD_OPTS=
AC_ARG_ENABLE([mdhim],
AS_HELP_STRING([--enable-mdhim], [Enable mdhim module]),
[],[] )
AS_IF([test "x$enable_mdhim" = "xyes"],
BUILD_MDHIM_MODULE=1
DARSHAN_MDHIM_LD_OPTS="@${darshan_share_path}/ld-opts/darshan-mdhim-ld-opts"
AC_CHECK_HEADERS([mdhim.h],
[],
AC_MSG_ERROR([mdhim requested but headers cannot be found]) ),
[]
)
dnl sanity check some config parameters
if test x$GOT_ALIGNMENT != x1; then if test x$GOT_ALIGNMENT != x1; then
AC_MSG_ERROR(must provide --with-mem-align=<num> argument to configure.) AC_MSG_ERROR(must provide --with-mem-align=<num> argument to configure.)
fi fi
...@@ -237,68 +386,11 @@ CFLAGS="$old_cflags" ...@@ -237,68 +386,11 @@ CFLAGS="$old_cflags"
AC_CHECK_HEADERS(mntent.h sys/mount.h) AC_CHECK_HEADERS(mntent.h sys/mount.h)
# We need to know the value of the $libdir and $bindir variables so that
# we can reference the correct path in the darshan compiler wrappers.
# Unfortunately, those two variables are not normally evaluated by autoconf.
# They are evaluated at build time using Makefile variable substitutions.
#
# The following logic was copied from mpich2 1.3.1 to resolve the $libdir
# variable at configure time.
# #
# Temporarily replace the default NONE value for exec_prefix # Begin tests for MPI-enabled builds
# and prefix with the actual, default values. #
savePrefix=$prefix
saveExecprefix=$exec_prefix
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
eval darshan_lib_path=$libdir
eval darshan_share_path=$datarootdir
prefix=$savePrefix
exec_prefix=$saveExecprefix
BUILD_HDF5_MODULE=
DARSHAN_HDF5_LD_OPTS=
# see if user explicitly enabled support for an HDF5 API
AC_ARG_ENABLE(HDF5-post-1.10,
[ --enable-HDF5-post-1.10
Enable HDF5 module for HDF5 version 1.10 or later],
[if test "x$enableval" = "xyes" ; then
AC_DEFINE(__DARSHAN_ENABLE_HDF5110, 1, Set for compatibility with HDF5 1.10.x, breaks use with versions earlier than 1.10)
if test "x$BUILD_HDF5_MODULE" = "x1"; then
AC_MSG_ERROR([Cannot set both --enable-HDF5-post-1.10 and --enable-HDF5-pre-1.10])
fi
BUILD_HDF5_MODULE=1
DARSHAN_HDF5_LD_OPTS="@${darshan_share_path}/ld-opts/darshan-hdf5-ld-opts"
fi]
,)
AC_ARG_ENABLE(HDF5-pre-1.10,
[ --enable-HDF5-pre-1.10
Enable HDF5 module for HDF5 versions earlier than 1.10],
[if test "x$enableval" = "xyes" ; then
if test "x$BUILD_HDF5_MODULE" = "x1"; then
AC_MSG_ERROR([Cannot set both --enable-HDF5-post-1.10 and --enable-HDF5-pre-1.10])
fi
BUILD_HDF5_MODULE=1
DARSHAN_HDF5_LD_OPTS="@${darshan_share_path}/ld-opts/darshan-hdf5-ld-opts"
fi]
,)
BUILD_MDHIM_MODULE=
DARSHAN_MDHIM_LD_OPTS=
AC_ARG_ENABLE([mdhim],
AS_HELP_STRING([--enable-mdhim], [Enable mdhim module]),
[],[] )
AS_IF([test "x$enable_mdhim" = "xyes"],
BUILD_MDHIM_MODULE=1
DARSHAN_MDHIM_LD_OPTS="@${darshan_share_path}/ld-opts/darshan-mdhim-ld-opts"
AC_CHECK_HEADERS([mdhim.h],
[],
AC_MSG_ERROR([mdhim requested but headers cannot be found]) ),
[]
)
AS_IF([test "x$ENABLE_MPI" = "x1"], [
# determine if the MPI library includes MPI-IO functions or not # determine if the MPI library includes MPI-IO functions or not
AC_MSG_CHECKING(for MPI-IO support in MPI) AC_MSG_CHECKING(for MPI-IO support in MPI)
...@@ -308,11 +400,9 @@ AC_TRY_LINK([#include <mpi.h>], [ ...@@ -308,11 +400,9 @@ AC_TRY_LINK([#include <mpi.h>], [
int amode; int amode;
MPI_Info info; MPI_Info info;
MPI_File fh; MPI_File fh;
MPI_File_open(comm, filename, amode, info, &fh); MPI_File_open(comm, filename, amode, info, &fh);],
],
AC_MSG_RESULT(yes), AC_MSG_RESULT(yes),
AC_MSG_ERROR(Darshan requires a version of MPI with MPI-IO support) AC_MSG_ERROR(Darshan requires a version of MPI with MPI-IO support))
)
# At some point MPI-IO converted most API functions to be const correct. We # At some point MPI-IO converted most API functions to be const correct. We
# need to test for this to determine how to define MPI-IO wrappers in # need to test for this to determine how to define MPI-IO wrappers in
...@@ -321,7 +411,7 @@ AC_MSG_CHECKING(for MPI-IO prototypes without const qualifier) ...@@ -321,7 +411,7 @@ AC_MSG_CHECKING(for MPI-IO prototypes without const qualifier)
AC_TRY_COMPILE( AC_TRY_COMPILE(
[ [
#include <mpi.h> #include <mpi.h>
int MPI_File_open(MPI_Comm comm, char *filename, int amode, int MPI_File_open(MPI_Comm comm, char *filename, int amode,
MPI_Info info, MPI_File *fh) MPI_Info info, MPI_File *fh)
{return 0;} {return 0;}
], ],
...@@ -335,7 +425,7 @@ AC_TRY_COMPILE( ...@@ -335,7 +425,7 @@ AC_TRY_COMPILE(
AC_TRY_COMPILE( AC_TRY_COMPILE(
[ [
#include <mpi.h> #include <mpi.h>
int MPI_File_open(MPI_Comm comm, const char *filename, int amode, int MPI_File_open(MPI_Comm comm, const char *filename, int amode,
MPI_Info info, MPI_File *fh) MPI_Info info, MPI_File *fh)
{return 0;} {return 0;}
], ],
...@@ -365,40 +455,56 @@ AC_TRY_LINK([#include <mpi.h>], [ ...@@ -365,40 +455,56 @@ AC_TRY_LINK([#include <mpi.h>], [
CFLAGS="$old_cflags" CFLAGS="$old_cflags"
LIBS="$old_libs" LIBS="$old_libs"
# if this version of mpi defines an MPIO_Request type, then we assume that # if this version of mpi defines an MPIO_Request type, then we assume that