From 3c7aca74729edb5339d2b84259ba042bf83c214a Mon Sep 17 00:00:00 2001 From: Minh Diep Date: Fri, 28 Jun 2019 14:28:39 -0700 Subject: [PATCH] LU-12395 build: build mpitests for el8 RHEL8 has rpm-mpi-hooks which requires binaries to be in specific mpi bin to generate the correct requires See https://fedoraproject.org//wiki/Changes/RpmMPIReqProv and https://fedoraproject.org/wiki/Packaging:MPI Test-Parameters: trivial clientdistro=el8 serverdistro=el7.6 testgroup=regression-mpi Change-Id: Id9fa50e15b48b9da846083b9e9cd894ad1eac967 Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/35374 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Yang Sheng Reviewed-by: Li Dongyang Reviewed-by: Oleg Drokin --- lustre.spec.in | 5 +++++ lustre/autoconf/lustre-core.m4 | 5 +++++ lustre/tests/functions.sh | 4 ++-- lustre/tests/mpi/Makefile.am | 4 ++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/lustre.spec.in b/lustre.spec.in index 80c5f33..240bf82 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -478,6 +478,11 @@ echo '%{_bindir}/mcreate' >>lustre-tests.files echo '%{_bindir}/munlink' >>lustre-tests.files echo '%{_sbindir}/wirecheck' >>lustre-tests.files echo '%{_sbindir}/wiretest' >>lustre-tests.files +%if %{_vendor}=="redhat" +if [ -n "@MPI_BIN@" ]; then + echo '@MPI_BIN@/*' >>lustre-tests.files +fi +%endif %endif %files -f lustre.files diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index a0538b3..7073fd1 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -3488,17 +3488,21 @@ AC_ARG_ENABLE([mpitests], case $enableval in yes) MPICC_WRAPPER="mpicc" + MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname) ;; no) enable_mpitests="no" + MPI_BIN="" ;; *) MPICC_WRAPPER=$enableval + MPI_BIN=$(eval echo $MPICC_WRAPPER | xargs dirname) ;; esac ], [ enable_mpitests="yes" MPICC_WRAPPER="mpicc" + MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname) ]) if test "x$enable_mpitests" != "xno"; then @@ -3517,6 +3521,7 @@ AC_ARG_ENABLE([mpitests], enable_mpitests=$lb_cv_mpi_tests CC=$oldcc fi + AC_SUBST(MPI_BIN) AC_SUBST(MPICC_WRAPPER) ]) # LB_CONFIG_MPITESTS diff --git a/lustre/tests/functions.sh b/lustre/tests/functions.sh index 23b53ef..93b5137 100644 --- a/lustre/tests/functions.sh +++ b/lustre/tests/functions.sh @@ -169,7 +169,7 @@ signaled() { } mpi_run () { - local mpirun="$MPIRUN $MPIRUN_OPTIONS" + local mpirun="$MPIRUN $MPIRUN_OPTIONS --oversubscribe" local command="$mpirun $@" local mpilog=$TMP/mpi.log local rc @@ -526,7 +526,7 @@ run_connectathon() { fi echo "tests: $tests" for test in $tests; do - local cmd="./runtests -N $cnt_NRUN $test -f $testdir" + local cmd="sh ./runtests -N $cnt_NRUN $test -f $testdir" local rc=0 log "$cmd" diff --git a/lustre/tests/mpi/Makefile.am b/lustre/tests/mpi/Makefile.am index 25f1826..d64964e 100644 --- a/lustre/tests/mpi/Makefile.am +++ b/lustre/tests/mpi/Makefile.am @@ -8,7 +8,11 @@ THETESTS = parallel_grouplock write_append_truncate createmany_mpi \ if TESTS if MPITESTS +if RHEL +testdir = @MPI_BIN@ +else testdir = $(libdir)/lustre/tests +endif test_PROGRAMS = $(THETESTS) else noinst_PROGRAMS = $(THETESTS) -- 1.8.3.1