AC_DEFINE(LIBLUSTRE_POSIX_ACL, 1, Liblustre Support ACL-enabled MDS)
fi
-AC_MSG_CHECKING([whether to build mpitests])
-AC_ARG_ENABLE([mpitests],
- AC_HELP_STRING([--enable-mpitests],
- [build liblustre mpi tests]),
- [],[enable_mpitests=no])
+#
+# --enable-mpitest
+#
+AC_ARG_ENABLE(mpitests,
+ AC_HELP_STRING([--enable-mpitest=yes|no|mpich directory],
+ [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"
+ ;;
+ 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])
+ ;;
+ 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"
+ 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])
+fi
AC_MSG_RESULT([$enable_mpitests])
+
AC_MSG_NOTICE([Enabling Lustre configure options for libsysio])
ac_configure_args="$ac_configure_args --with-lustre-hack --with-sockets"
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) -L/opt/lam/lib -lmpi -llam
+test_lock_cancel_LDADD := $(LLIB_EXEC) -lmpich
endif
noinst_PROGRAMS += mmap_sanity flock_test writemany reads flocks_test
noinst_PROGRAMS += ll_getstripe_info write_time_limit
if MPITESTS
-noinst_PROGRAMS += parallel_grouplock write_append_truncate createmany_mpi
-noinst_PROGRAMS += iam_ut
+noinst_PROGRAMS += parallel_grouplock write_append_truncate createmany_mpi mdsrate
endif
# noinst_PROGRAMS += ldaptest copy_attr mkdirdeep
bin_PROGRAMS = mcreate munlink
flocks_test_LDADD=-lpthread
if MPITESTS
-LAM_LD_FLAGS=-L/opt/lam/lib -lmpi -llam -lpthread
+#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
+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
int main(int argc, char ** argv)
{
int i, rc = 0, do_open = 0, do_link = 0, rank;
- char format[4096], *fmt, *tgt;
+ char format[4096], *fmt, *tgt = NULL;
char filename[4096];
long start, last, end;
long begin = 0, count;
}
if (strcmp(argv[1], "-o") == 0) {
- tgt = NULL;
do_open = 1;
+ tgt = NULL;
} else if (strncmp(argv[1], "-l", 2) == 0 && argv[1][2]) {
tgt = argv[1] + 2;
do_link = 1;
#include <sys/ioctl.h>
#include <fcntl.h>
#include <errno.h>
+#include <liblustre.h>
#include "lustre/lustre_user.h"
-#include "lp_utils.h"
+#include "lustre/tests/lp_utils.h"
#define MAX_PROCESSES 8
#include <unistd.h>
#include <time.h>
#include <errno.h>
+#include <liblustre.h>
#include <lustre/lustre_user.h>
-#include "lp_utils.h"
+#include <lustre/tests/lp_utils.h>
#define LPGL_FILEN 700000
#define LPGL_TEST_ITEMS 7