bce191
%global intel_mpi_bench_vers IMB-v2021.3
bce191
%global osu_micro_bench_vers 5.8
bce191
Summary: MPI Benchmarks and tests
bce191
Name: mpitests
bce191
Version: 5.8
bce191
Release: 1%{?dist}
bce191
License: CPL and BSD
bce191
Group: Applications/Engineering
bce191
# These days we get the benchmark soucres from Intel and OSU directly
bce191
# rather than from openfabrics.
bce191
URL: http://www.openfabrics.org
bce191
# https://software.intel.com/en-us/articles/intel-mpi-benchmarks
bce191
Source0: https://github.com/intel/mpi-benchmarks/archive/%{intel_mpi_bench_vers}.tar.gz
bce191
Source1: http://mvapich.cse.ohio-state.edu/download/mvapich/osu-micro-benchmarks-%{osu_micro_bench_vers}.tgz
bce191
# Only for old openmpi
bce191
#Patch101: OMB-disable-collective-async.patch
bce191
BuildRequires: hwloc-devel, libibmad-devel, rdma-core-devel
bce191
BuildRequires: automake, autoconf, libtool
bce191
BuildRequires: gcc, gcc-c++
bce191
bce191
%description
bce191
A set of popular MPI benchmarks:
bce191
Intel MPI benchmarks %{intel_mpi_bench_vers}.
bce191
OSU micro-benchmarks %{osu_micro_bench_vers}.
bce191
bce191
# openmpi 3.0.0 dropped support for big endian ppc
bce191
%ifnarch ppc ppc64
bce191
%package openmpi
bce191
Summary: MPI tests package compiled against openmpi
bce191
Group: Applications
bce191
BuildRequires: openmpi-devel >= 3.1.2-2
bce191
Requires: openmpi%{?_isa}
bce191
%description openmpi
bce191
MPI test suite compiled against the openmpi package
bce191
%endif
bce191
bce191
%package mpich
bce191
Summary: MPI tests package compiled against mpich
bce191
Group: Applications
bce191
BuildRequires: mpich-devel >= 3.2.1-8
bce191
Requires: mpich%{?_isa}
bce191
%description mpich
bce191
MPI test suite compiled against the mpich package
bce191
bce191
# mvapich2 is not yet built on s390(x)
bce191
%ifnarch s390 s390x
bce191
%package mvapich2
bce191
Summary: MPI tests package compiled against mvapich2
bce191
Group: Applications
bce191
BuildRequires: mvapich2-devel >= 2.3-2
bce191
Requires: mvapich2%{?_isa}
bce191
%description mvapich2
bce191
MPI test suite compiled against the mvapich2 package
bce191
%endif
bce191
bce191
# PSM is x86_64-only
bce191
%ifarch x86_64
bce191
%package mvapich2-psm2
bce191
Summary: MPI tests package compiled against mvapich2 using OmniPath
bce191
Group: Applications
bce191
BuildRequires: mvapich2-psm2-devel >= 2.3-2
bce191
BuildRequires: libpsm2-devel
bce191
Requires: mvapich2-psm2%{?_isa}
bce191
%description mvapich2-psm2
bce191
MPI test suite compiled against the mvapich2 package using OmniPath
bce191
%endif
bce191
bce191
%prep
bce191
%setup -c 
bce191
%setup -T -D -a 1
bce191
cd osu-micro-benchmarks-5.8
bce191
cd ..
bce191
bce191
%build
bce191
# We don't do a non-mpi version of this package, just straight to the mpi builds
bce191
export CC=mpicc
bce191
export CXX=mpicxx
bce191
export FC=mpif90
bce191
export F77=mpif77
bce191
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fPIC"
bce191
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fPIC"
bce191
do_build() {
bce191
  mkdir build-$MPI_COMPILER
bce191
  cp -al mpi-benchmarks-%{intel_mpi_bench_vers} osu-micro-benchmarks-%{osu_micro_bench_vers} build-$MPI_COMPILER
bce191
  cd build-$MPI_COMPILER/mpi-benchmarks-%{intel_mpi_bench_vers}
bce191
  make OPTFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" MPI_HOME="$MPI_HOME" all
bce191
  cd ../osu-micro-benchmarks-%{osu_micro_bench_vers}
bce191
  autoreconf -vif
bce191
  %configure
bce191
  make %{?_smp_mflags}
bce191
  cd ../..
bce191
}
bce191
bce191
# do N builds, one for each mpi stack
bce191
%ifnarch ppc ppc64
bce191
%{_openmpi_load}
bce191
do_build
bce191
%{_openmpi_unload}
bce191
%endif
bce191
bce191
%{_mpich_load}
bce191
do_build
bce191
%{_mpich_unload}
bce191
bce191
%ifnarch s390 s390x
bce191
%{_mvapich2_load}
bce191
do_build
bce191
%{_mvapich2_unload}
bce191
bce191
%endif
bce191
bce191
%ifarch x86_64
bce191
%{_mvapich2_psm2_load}
bce191
do_build
bce191
%{_mvapich2_psm2_unload}
bce191
%endif
bce191
bce191
%install
bce191
do_install() {
bce191
  mkdir -p %{buildroot}$MPI_BIN
bce191
  cd build-$MPI_COMPILER/osu-micro-benchmarks-%{osu_micro_bench_vers}
bce191
  make install DESTDIR=%{buildroot}/staging
bce191
  find %{buildroot}/staging -name 'osu_*' -type f -perm -111 | while read X; do
bce191
    mv $X %{buildroot}$MPI_BIN/mpitests-$(basename $X)
bce191
  done
bce191
  cd ../mpi-benchmarks-%{intel_mpi_bench_vers}/
bce191
  for X in IMB-*; do
bce191
    cp $X %{buildroot}$MPI_BIN/mpitests-$X
bce191
  done
bce191
  cd ../..
bce191
}
bce191
bce191
# do N installs, one for each mpi stack
bce191
%ifnarch ppc ppc64
bce191
%{_openmpi_load}
bce191
do_install
bce191
%{_openmpi_unload}
bce191
%endif
bce191
bce191
%{_mpich_load}
bce191
do_install
bce191
%{_mpich_unload}
bce191
bce191
%ifnarch s390 s390x
bce191
%{_mvapich2_load}
bce191
do_install
bce191
%{_mvapich2_unload}
bce191
%endif
bce191
bce191
%ifarch x86_64
bce191
%{_mvapich2_psm2_load}
bce191
do_install
bce191
%{_mvapich2_psm2_unload}
bce191
%endif
bce191
bce191
%ifnarch ppc ppc64
bce191
%files openmpi
bce191
%{_libdir}/openmpi/bin/mpitests-*
bce191
%endif
bce191
bce191
%files mpich
bce191
%{_libdir}/mpich/bin/mpitests-*
bce191
bce191
%ifnarch s390 s390x
bce191
%files mvapich2
bce191
%{_libdir}/mvapich2/bin/mpitests-*
bce191
%endif
bce191
bce191
%ifarch x86_64
bce191
%files mvapich2-psm2
bce191
%{_libdir}/mvapich2-psm2/bin/mpitests-*
bce191
%endif
bce191
bce191
%changelog
bce191
* Wed Dec 08 2021 Honggang Li <honli@redhat.com> - 5.8-1
bce191
- Update OSU benchmarks to upstream release 5.8
bce191
- Update Intel MPI Benchmarks 2021.3
bce191
- Resolves: rhbz#2015392
bce191
bce191
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 5.7-4
bce191
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
bce191
  Related: rhbz#1991688
bce191
bce191
* Tue Jul 20 2021 Honggang Li <honli@redhat.com> - 5.7-3
bce191
- Update OSU benchmarks to upstream release 5.7.1
bce191
- Update Intel MPI Benchmarks 2021.2
bce191
- Resolves: rhbz#1960479
bce191
bce191
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 5.7-2
bce191
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
bce191
bce191
* Thu Feb 18 2021 Honggang Li <honli@redhat.com> - 5.7-1
bce191
- Update OSU benchmarks to upstream release 5.7
bce191
- Build mpitests for RHEL9
bce191
- Resolves: rhbz#1923508