Whamcloud - gitweb
LU-12395 build: build mpitests for el8 74/35374/9
authorMinh Diep <mdiep@whamcloud.com>
Fri, 28 Jun 2019 21:28:39 +0000 (14:28 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 10 Jul 2019 15:15:26 +0000 (15:15 +0000)
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 <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/35374
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre.spec.in
lustre/autoconf/lustre-core.m4
lustre/tests/functions.sh
lustre/tests/mpi/Makefile.am

index 80c5f33..240bf82 100644 (file)
@@ -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
index a0538b3..7073fd1 100644 (file)
@@ -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
 
index 23b53ef..93b5137 100644 (file)
@@ -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"
index 25f1826..d64964e 100644 (file)
@@ -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)