From 909016ec2dec8be3077e0c0513186728bb54f90c Mon Sep 17 00:00:00 2001 From: Honggang Li Date: Thu, 18 Feb 2021 10:36:50 +0800 Subject: [PATCH] Update OSU benchmarks to upstream release 5.7 Build mpitests for RHEL9 Resolves: rhbz#1923508 Signed-off-by: Honggang Li --- .gitignore | 7 +++ gating.yaml | 11 ++++ mpitests.spec | 149 +++++++++++++++++++++++++++++++++++++++++++++ sources | 2 + tests/run_tests.sh | 10 +++ tests/sanity.sh | 37 +++++++++++ tests/tests.yml | 13 ++++ 7 files changed, 229 insertions(+) create mode 100644 gating.yaml create mode 100644 mpitests.spec create mode 100644 sources create mode 100755 tests/run_tests.sh create mode 100755 tests/sanity.sh create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore index e69de29..fdb5fc1 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,7 @@ +/osu-micro-benchmarks-5.4.2.tar.gz +/v2018.1.tar.gz +/*.src.rpm +/IMB-v2019.6.tar.gz +/osu-micro-benchmarks-5.6.2.tar.gz +/osu-micro-benchmarks-5.6.3.tar.gz +/osu-micro-benchmarks-5.7.tar.gz diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..015fe8f --- /dev/null +++ b/gating.yaml @@ -0,0 +1,11 @@ +--- !Policy + +product_versions: + + - rhel-8 + +decision_context: osci_compose_gate + +rules: + + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/mpitests.spec b/mpitests.spec new file mode 100644 index 0000000..1ef935d --- /dev/null +++ b/mpitests.spec @@ -0,0 +1,149 @@ +%global intel_mpi_bench_vers IMB-v2019.6 +%global osu_micro_bench_vers 5.7 +Summary: MPI Benchmarks and tests +Name: mpitests +Version: %{osu_micro_bench_vers} +Release: 1%{?dist} +License: CPL and BSD +Group: Applications/Engineering +# These days we get the benchmark soucres from Intel and OSU directly +# rather than from openfabrics. +URL: http://www.openfabrics.org +# https://software.intel.com/en-us/articles/intel-mpi-benchmarks +Source0: https://github.com/intel/mpi-benchmarks/archive/%{intel_mpi_bench_vers}.tar.gz +Source1: http://mvapich.cse.ohio-state.edu/download/mvapich/osu-micro-benchmarks-%{osu_micro_bench_vers}.tar.gz +# Only for old openmpi +#Patch101: OMB-disable-collective-async.patch +BuildRequires: hwloc-devel, libibmad-devel, rdma-core-devel +BuildRequires: automake, autoconf, libtool +BuildRequires: gcc, gcc-c++ + +%description +A set of popular MPI benchmarks: +Intel MPI benchmarks %{intel_mpi_bench_vers}. +OSU micro-benchmarks %{osu_micro_bench_vers}. + +# openmpi 3.0.0 dropped support for big endian ppc +%ifnarch ppc ppc64 +%package openmpi +Summary: MPI tests package compiled against openmpi +Group: Applications +BuildRequires: openmpi-devel >= 3.1.2-2 +Requires: openmpi%{?_isa} +%description openmpi +MPI test suite compiled against the openmpi package +%endif + +%package mpich +Summary: MPI tests package compiled against mpich +Group: Applications +BuildRequires: mpich-devel >= 3.2.1-8 +Requires: mpich%{?_isa} +%description mpich +MPI test suite compiled against the mpich package + +# mvapich2 is not yet built on s390(x) +%ifnarch s390 s390x +%package mvapich2 +Summary: MPI tests package compiled against mvapich2 +Group: Applications +BuildRequires: mvapich2-devel >= 2.3-2 +Requires: mvapich2%{?_isa} +%description mvapich2 +MPI test suite compiled against the mvapich2 package +%endif + +%prep +%setup -c +%setup -T -D -a 1 +cd osu-micro-benchmarks-%{version} +cd .. + +%build +# We don't do a non-mpi version of this package, just straight to the mpi builds +export CC=mpicc +export CXX=mpicxx +export FC=mpif90 +export F77=mpif77 +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fPIC" +export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fPIC" +do_build() { + mkdir build-$MPI_COMPILER + cp -al mpi-benchmarks-%{intel_mpi_bench_vers} osu-micro-benchmarks-%{osu_micro_bench_vers} build-$MPI_COMPILER + cd build-$MPI_COMPILER/mpi-benchmarks-%{intel_mpi_bench_vers} + make OPTFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" MPI_HOME="$MPI_HOME" all + cd ../osu-micro-benchmarks-%{osu_micro_bench_vers} + autoreconf -vif + %configure + make %{?_smp_mflags} + cd ../.. +} + +# do N builds, one for each mpi stack +%ifnarch ppc ppc64 +%{_openmpi_load} +do_build +%{_openmpi_unload} +%endif + +%{_mpich_load} +do_build +%{_mpich_unload} + +%ifnarch s390 s390x +%{_mvapich2_load} +do_build +%{_mvapich2_unload} + +%endif + +%install +do_install() { + mkdir -p %{buildroot}$MPI_BIN + cd build-$MPI_COMPILER/osu-micro-benchmarks-%{osu_micro_bench_vers} + make install DESTDIR=%{buildroot}/staging + find %{buildroot}/staging -name 'osu_*' -type f -perm -111 | while read X; do + mv $X %{buildroot}$MPI_BIN/mpitests-$(basename $X) + done + cd ../mpi-benchmarks-%{intel_mpi_bench_vers}/ + for X in IMB-*; do + cp $X %{buildroot}$MPI_BIN/mpitests-$X + done + cd ../.. +} + +# do N installs, one for each mpi stack +%ifnarch ppc ppc64 +%{_openmpi_load} +do_install +%{_openmpi_unload} +%endif + +%{_mpich_load} +do_install +%{_mpich_unload} + +%ifnarch s390 s390x +%{_mvapich2_load} +do_install +%{_mvapich2_unload} +%endif + +%ifnarch ppc ppc64 +%files openmpi +%{_libdir}/openmpi/bin/mpitests-* +%endif + +%files mpich +%{_libdir}/mpich/bin/mpitests-* + +%ifnarch s390 s390x +%files mvapich2 +%{_libdir}/mvapich2/bin/mpitests-* +%endif + +%changelog +* Thu Feb 18 2021 Honggang Li - 5.7-1 +- Update OSU benchmarks to upstream release 5.7 +- Build mpitests for RHEL9 +- Resolves: rhbz#1923508 diff --git a/sources b/sources new file mode 100644 index 0000000..2b68a3d --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (osu-micro-benchmarks-5.7.tar.gz) = 33e0346ec59d7d5df51e8e68408baadbbeaef70df4ba60311df3525290b9ab27542b211694c9143c8e351616a2abe36139d92ca06131ac34dbc882b16a82ed65 +SHA512 (IMB-v2019.6.tar.gz) = 0a43a21afa2c89e11aa582860969ff2acccb0b48e1ba93b78724d74883cf94a058b95d67060450816e63422847a5ebf6fefef5a6a0cdd18ddf2fa392e066ffba diff --git a/tests/run_tests.sh b/tests/run_tests.sh new file mode 100755 index 0000000..11017ab --- /dev/null +++ b/tests/run_tests.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# when running this in 1minutetip the PATH must be specified to execute +# in the local directory. +echo "Setting path to local directory" +PATH=$PATH:$(pwd) + +# simple sanity test +sanity.sh +exit $? diff --git a/tests/sanity.sh b/tests/sanity.sh new file mode 100755 index 0000000..45c9418 --- /dev/null +++ b/tests/sanity.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# +# This is a simple sanity test to satisfy the RHEL8.1 onboard gating +# requirement. + +ret=0 +source /etc/profile.d/modules.sh + +module load mpi/openmpi-x86_64 + +mpitests-IMB-EXT Window Accumulate +let ret=$ret+$? + +mpitests-IMB-IO S_Write_Indv S_Read_Indv +let ret=$ret+$? + +mpitests-IMB-IO P_IWrite_Indv P_IRead_Indv +let ret=$ret+$? + +mpitests-IMB-IO C_Write_Shared C_Read_Shared +let ret=$ret+$? + +mpitests-IMB-IO Open_Close +let ret=$ret+$? + +mpitests-IMB-RMA All_put_all All_get_all +let ret=$ret+$? + +mpitests-osu_hello +let ret=$ret+$? + +mpitests-osu_init +let ret=$ret+$? + +module unload mpi/openmpi-x86_64 + +exit $ret diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..58583f2 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + tests: + - simple: + dir: . # switch to subfolder. This parameter is REQUIRED, use `dir: .` for current folder + run: ./run_tests.sh # this is your test command, its exit code is the outcome of the test + required_packages: + - environment-modules + - openmpi + - mpitests-openmpi