# --enable-mpitest
#
AC_ARG_ENABLE(mpitests,
- AC_HELP_STRING([--enable-mpitest=yes|no|mpich directory],
+ AC_HELP_STRING([--enable-mpitests=yes|no|mpicc wrapper],
[include mpi tests]),
[
enable_mpitests=yes
case $enableval in
yes)
- MPI_ROOT=/opt/mpich
- LDFLAGS="$LDFLAGS -L$MPI_ROOT/ch-p4/lib -L$MPI_ROOT/ch-p4/lib64"
- CFLAGS="$CFLAGS -I$MPI_ROOT/include"
+ MPICC_WRAPPER=mpicc
;;
no)
enable_mpitests=no
;;
- [[\\/$]]* | ?:[[\\/]]* )
- MPI_ROOT=$enableval
- LDFLAGS="$LDFLAGS -L$with_mpi/lib"
- CFLAGS="$CFLAGS -I$MPI_ROOT/include"
- ;;
*)
- AC_MSG_ERROR([expected absolute directory name for --enable-mpitests or yes or no])
+ MPICC_WRAPPER=$enableval
;;
esac
],
[
- MPI_ROOT=/opt/mpich
- LDFLAGS="$LDFLAGS -L$MPI_ROOT/ch-p4/lib -L$MPI_ROOT/ch-p4/lib64"
- CFLAGS="$CFLAGS -I$MPI_ROOT/include"
+ MPICC_WRAPPER=mpicc
enable_mpitests=yes
]
)
-AC_SUBST(MPI_ROOT)
if test x$enable_mpitests != xno; then
- AC_MSG_CHECKING([whether to mpitests can be built])
- AC_CHECK_FILE([$MPI_ROOT/include/mpi.h],
- [AC_CHECK_LIB([mpich],[MPI_Start],[enable_mpitests=yes],[enable_mpitests=no])],
- [enable_mpitests=no])
+ AC_MSG_CHECKING([whether mpitests can be built])
+ oldcc=$CC
+ CC=$MPICC_WRAPPER
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #include <mpi.h>
+ ]],[[
+ int flag;
+ MPI_Initialized(&flag);
+ ]])],
+ [
+ AC_MSG_RESULT([yes])
+ ],[
+ AC_MSG_RESULT([no])
+ enable_mpitests=no
+ ])
+ CC=$oldcc
fi
-AC_MSG_RESULT([$enable_mpitests])
-
+AC_SUBST(MPICC_WRAPPER)
AC_MSG_NOTICE([Enabling Lustre configure options for libsysio])
ac_configure_args="$ac_configure_args --with-lustre-hack --with-sockets"
lustre/ldlm/Makefile
lustre/liblustre/Makefile
lustre/liblustre/tests/Makefile
+lustre/liblustre/tests/mpi/Makefile
lustre/llite/Makefile
lustre/llite/autoMakefile
lustre/lov/Makefile
lustre/scripts/Makefile
lustre/scripts/version_tag.pl
lustre/tests/Makefile
+lustre/tests/mpi/Makefile
lustre/utils/Makefile
])
case $lb_target_os in
noinst_LIBRARIES = libtestcommon.a
if LIBLUSTRE_TESTS
+if MPITESTS
+SUBDIRS = mpi
+endif # MPITESTS
+
noinst_PROGRAMS = sanity
if !CRAY_XT3
noinst_PROGRAMS += recovery_small replay_single replay_ost_single
endif # !CRAY_XT3
-if MPITESTS
-noinst_PROGRAMS += test_lock_cancel
-endif # MPITESTS
-
liblustre_testdir=$(libdir)/lustre/liblustre/tests
liblustre_test_PROGRAMS = $(noinst_PROGRAMS)
liblustre_test_LIBRARIES = $(noinst_LIBRARIES)
endif # LIBLUSTRE_TESTS
endif # LIBLUSTRE
+DIST_SUBDIRS := mpi
+
libtestcommon_a_SOURCES = test_common.c test_common.h
sanity_SOURCES = sanity.c
replay_ost_single_CFLAGS = $(LL_CFLAGS)
replay_ost_single_LDADD := libtestcommon.a $(LLIB_EXEC)
replay_ost_single_DEPENDENCIES = $(top_builddir)/lustre/liblustre/liblustre.a libtestcommon.a
-
-if MPITESTS
-test_lock_cancel_SOURCES = test_lock_cancel.c
-test_lock_cancel_CFLAGS = $(LL_CFLAGS) -I/opt/lam/include
-#test_lock_cancel_LDADD := $(LLIB_EXEC) -L/opt/lam/lib -lmpi -llam
-test_lock_cancel_LDADD := $(LLIB_EXEC) -lmpich
-endif
-
-
--- /dev/null
+## Liblustre MPI tests Makefile
+
+AM_CPPFLAGS = -I$(SYSIO)/include $(LLCPPFLAGS) -I$(top_srcdir)/lnet/ulnds
+AM_CFLAGS = $(LLCFLAGS)
+
+LLIB_EXEC = $(top_builddir)/lustre/utils/liblustreapi.a $(top_builddir)/lustre/liblustre/liblustre.a $(CAP_LIBS) $(PTHREAD_LIBS) $(ZLIB)
+
+CC = @MPICC_WRAPPER@
+
+if LIBLUSTRE
+if LIBLUSTRE_TESTS
+noinst_PROGRAMS = test_lock_cancel
+endif # LIBLUSTRE_TESTS
+endif # LIBLUSTRE
+
+test_lock_cancel_SOURCES = test_lock_cancel.c
+test_lock_cancel_LDADD := $(LLIB_EXEC)
# LDADD = -lldap
# LDADD := -lreadline -ltermcap # -lefence
+DIST_SUBDIRS := mpi
+
noinst_DATA = disk1_4.zip
noinst_SCRIPTS = leak_finder.pl llmount.sh llmountcleanup.sh functions.sh
noinst_SCRIPTS += test-framework.sh runvmstat runiozone runtests
$(nobase_noinst_SCRIPTS) $(nobase_noinst_DATA)
if TESTS
+if MPITESTS
+SUBDIRS = mpi
+endif
noinst_PROGRAMS = openunlink truncate directio writeme mlink utime it_test
noinst_PROGRAMS += tchmod fsx test_brw
noinst_PROGRAMS += createmany chownmany statmany multifstat createtest
noinst_PROGRAMS += openfilleddirunlink rename_many memhog iopentest1 iopentest2
noinst_PROGRAMS += mmap_sanity flock_test writemany reads flocks_test
noinst_PROGRAMS += ll_getstripe_info
-if MPITESTS
-noinst_PROGRAMS += parallel_grouplock write_append_truncate createmany_mpi mdsrate
-endif
# noinst_PROGRAMS += copy_attr mkdirdeep
bin_PROGRAMS = mcreate munlink
testdir = $(libdir)/lustre/tests
flocks_test_SOURCES=flocks_test.c
flocks_test_LDADD=-lpthread
-if MPITESTS
-#LAM_LD_FLAGS=-L/opt/lam/lib -lmpi -llam -lpthread
-LAM_LD_FLAGS=-lmpich -lpthread
-write_append_truncate_SOURCES=write_append_truncate.c
-write_append_truncate_LDADD=$(LAM_LD_FLAGS)
-createmany_mpi_SOURCES=createmany-mpi.c
-createmany_mpi_LDADD=$(LAM_LD_FLAGS)
-parallel_grouplock_SOURCES=parallel_grouplock.c lp_utils.c lp_utils.h
-parallel_grouplock_LDADD=$(LAM_LD_FLAGS)
-mdsrate_SOURCES=mdsrate.c
-mdsrate_LDADD=$(LAM_LD_FLAGS) -L$(top_builddir)/lustre/utils -llustreapi
-endif
-
#copy_attr_LDADD= -lattr
--- /dev/null
+# Lustre MPI test Makefile
+AM_CPPFLAGS = $(LLCPPFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS
+AM_CFLAGS = $(LLCFLAGS)
+
+CC = @MPICC_WRAPPER@
+
+noinst_PROGRAMS = parallel_grouplock write_append_truncate createmany_mpi mdsrate
+testdir = $(libdir)/lustre/tests
+test_SCRIPTS = $(noinst_PROGRAMS)
+
+write_append_truncate_SOURCES=write_append_truncate.c
+createmany_mpi_SOURCES=createmany-mpi.c
+parallel_grouplock_SOURCES=parallel_grouplock.c lp_utils.c lp_utils.h
+mdsrate_SOURCES=mdsrate.c
+mdsrate_LDADD=-L$(top_builddir)/lustre/utils -llustreapi
if ! echo $PATH | grep -q $LUSTRE/test; then
export PATH=$PATH:$LUSTRE/tests
fi
- export MDSRATE=${MDSRATE:-"$LUSTRE/tests/mdsrate"}
+ export MDSRATE=${MDSRATE:-"$LUSTRE/tests/mpi/mdsrate"}
[ ! -f "$MDSRATE" ] && export MDSRATE=$(which mdsrate 2> /dev/null)
if ! echo $PATH | grep -q $LUSTRE/tests/racer; then
export PATH=$PATH:$LUSTRE/tests/racer
fi
+ if ! echo $PATH | grep -q $LUSTRE/tests/mpi; then
+ export PATH=$PATH:$LUSTRE/tests/mpi
+ fi
export LCTL=${LCTL:-"$LUSTRE/utils/lctl"}
export LFS=${LFS:-"$LUSTRE/utils/lfs"}
[ ! -f "$LCTL" ] && export LCTL=$(which lctl)