6ba8b7
%global intel_mpi_bench_vers 2018.1
6ba8b7
%global osu_micro_bench_vers 5.4.2
8072a3
Summary: MPI Benchmarks and tests
8072a3
Name: mpitests
6ba8b7
Version: %{osu_micro_bench_vers}
6ba8b7
Release: 1%{?dist}
8072a3
License: CPL and BSD
8072a3
Group: Applications/Engineering
8072a3
# These days we get the benchmark soucres from Intel and OSU directly
8072a3
# rather than from openfabrics.
8072a3
URL: http://www.openfabrics.org
8072a3
# https://software.intel.com/en-us/articles/intel-mpi-benchmarks
6ba8b7
Source0: https://github.com/intel/mpi-benchmarks/archive/v%{intel_mpi_bench_vers}.tar.gz
6ba8b7
Source1: http://mvapich.cse.ohio-state.edu/download/mvapich/osu-micro-benchmarks-%{osu_micro_bench_vers}.tar.gz
8072a3
# Only for old openmpi
8072a3
Patch101: OMB-disable-collective-async.patch
8072a3
BuildRequires: hwloc-devel, libibmad-devel, rdma-core-devel
8072a3
8072a3
%description
8072a3
A set of popular MPI benchmarks:
6ba8b7
Intel MPI benchmarks %{intel_mpi_bench_vers}.
6ba8b7
OSU micro-benchmarks %{osu_micro_bench_vers}.
8072a3
8072a3
%package openmpi
8072a3
Summary: MPI tests package compiled against openmpi
8072a3
Group: Applications
8072a3
BuildRequires: openmpi-devel >= 1.4
8072a3
Requires: openmpi%{?_isa}
8072a3
%description openmpi
8072a3
MPI test suite compiled against the openmpi package
8072a3
8072a3
# openmpi 3.0.0 dropped support for big endian ppc
8072a3
%ifnarch ppc ppc64
8072a3
%package openmpi3
8072a3
Summary: MPI tests package compiled against openmpi3
8072a3
Group: Applications
8072a3
BuildRequires: openmpi3-devel
8072a3
Requires: openmpi3%{?_isa}
8072a3
%description openmpi3
8072a3
MPI test suite compiled against the openmpi3 package
8072a3
%endif
8072a3
8072a3
%package mpich
8072a3
Summary: MPI tests package compiled against mpich
8072a3
Group: Applications
8072a3
BuildRequires: mpich-devel >= 3.0.4
8072a3
Requires: mpich%{?_isa}
8072a3
%description mpich
8072a3
MPI test suite compiled against the mpich package
8072a3
8072a3
%package mpich32
8072a3
Summary: MPI tests package compiled against mpich-3.2
8072a3
Group: Applications
8072a3
BuildRequires: mpich-3.2-devel
8072a3
Requires: mpich-3.2%{?_isa}
8072a3
%description mpich32
8072a3
MPI test suite compiled against the mpich-3.2 package
8072a3
8072a3
# mvapich2 is not yet built on s390(x)
8072a3
%ifnarch s390 s390x
8072a3
%package mvapich2
8072a3
Summary: MPI tests package compiled against mvapich2
8072a3
Group: Applications
8072a3
BuildRequires: mvapich2-devel >= 1.4
8072a3
Requires: mvapich2%{?_isa}
8072a3
%description mvapich2
8072a3
MPI test suite compiled against the mvapich2 package
8072a3
8072a3
%package mvapich222
8072a3
Summary: MPI tests package compiled against mvapich2-2.2
8072a3
Group: Applications
8072a3
BuildRequires: mvapich2-2.2-devel
8072a3
Requires: mvapich2-2.2%{?_isa}
8072a3
%description mvapich222
8072a3
MPI test suite compiled against the mvapich2-2.2 package
8072a3
8072a3
%package mvapich23
8072a3
Summary: MPI tests package compiled against mvapich23
8072a3
Group: Applications
8072a3
BuildRequires: mvapich23-devel
8072a3
Requires: mvapich23%{?_isa}
8072a3
%description mvapich23
8072a3
MPI test suite compiled against the mvapich23 package
8072a3
8072a3
# s390(x) did not have openmpi-1.6
8072a3
%package compat-openmpi16
8072a3
Summary: MPI tests package compiled against compat-openmpi16
8072a3
Group: Applications
8072a3
BuildRequires: compat-openmpi16-devel
8072a3
Requires: compat-openmpi16%{?_isa}
8072a3
%description compat-openmpi16
8072a3
MPI test suite compiled against the compat-openmpi16 package
8072a3
%endif
8072a3
8072a3
# PSM is x86_64-only
8072a3
%ifarch x86_64
8072a3
%package mvapich2-psm
8072a3
Summary: MPI tests package compiled against mvapich2 using InfiniPath
8072a3
Group: Applications
8072a3
BuildRequires: mvapich2-psm-devel >= 1.4
8072a3
BuildRequires: infinipath-psm-devel
8072a3
Requires: mvapich2-psm%{?_isa}
8072a3
%description mvapich2-psm
8072a3
MPI test suite compiled against the mvapich2 package using InfiniPath
8072a3
8072a3
%package mvapich222-psm
8072a3
Summary: MPI tests package compiled against mvapich2-2.2 using InfiniPath
8072a3
Group: Applications
8072a3
BuildRequires: mvapich2-2.2-psm-devel
8072a3
BuildRequires: infinipath-psm-devel
8072a3
Requires: mvapich2-2.2-psm%{?_isa}
8072a3
%description mvapich222-psm
8072a3
MPI test suite compiled against the mvapich2-2.2 package using InfiniPath
8072a3
8072a3
%package mvapich222-psm2
8072a3
Summary: MPI tests package compiled against mvapich2-2.2 using OmniPath
8072a3
Group: Applications
8072a3
BuildRequires: mvapich2-2.2-psm2-devel
8072a3
BuildRequires: libpsm2-devel
8072a3
Requires: mvapich2-2.2-psm2%{?_isa}
8072a3
%description mvapich222-psm2
8072a3
MPI test suite compiled against the mvapich2-2.2 package using OmniPath
8072a3
8072a3
%package mvapich23-psm
8072a3
Summary: MPI tests package compiled against mvapich23-psm
8072a3
Group: Applications
8072a3
BuildRequires: mvapich23-psm-devel
8072a3
Requires: mvapich23-psm%{?_isa}
8072a3
%description mvapich23-psm
8072a3
MPI test suite compiled against the mvapich23-psm package
8072a3
8072a3
%package mvapich23-psm2
8072a3
Summary: MPI tests package compiled against mvapich23-psm2
8072a3
Group: Applications
8072a3
BuildRequires: mvapich23-psm2-devel
8072a3
Requires: mvapich23-psm2%{?_isa}
8072a3
%description mvapich23-psm2
8072a3
MPI test suite compiled against the mvapich23-psm2 package
8072a3
8072a3
%endif
8072a3
8072a3
%prep
8072a3
%setup -c 
8072a3
%setup -T -D -a 1
6ba8b7
cd osu-micro-benchmarks-%{version}
8072a3
cd ..
8072a3
8072a3
%build
8072a3
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=.//' -e 's/-fstack-protector-strong//' -e 's/-fstack-protector//'`
8072a3
# We don't do a non-mpi version of this package, just straight to the mpi builds
8072a3
export CC=mpicc
8072a3
export CXX=mpicxx
8072a3
export FC=mpif90
8072a3
export F77=mpif77
8072a3
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
8072a3
do_build() {
8072a3
  mkdir build-$MPI_COMPILER
6ba8b7
  cp -al mpi-benchmarks-%{intel_mpi_bench_vers} osu-micro-benchmarks-%{osu_micro_bench_vers} build-$MPI_COMPILER
6ba8b7
  cd build-$MPI_COMPILER/mpi-benchmarks-%{intel_mpi_bench_vers}/src
8072a3
  make -f make_mpich OPTFLAGS="%{optflags}" MPI_HOME="$MPI_HOME" all
6ba8b7
  cd ../../osu-micro-benchmarks-%{osu_micro_bench_vers}
8072a3
  %configure
8072a3
  make %{?_smp_mflags}
8072a3
  cd ../..
8072a3
}
8072a3
8072a3
# do N builds, one for each mpi stack
8072a3
%{_openmpi_load}
8072a3
do_build
8072a3
%{_openmpi_unload}
8072a3
8072a3
%ifnarch ppc ppc64
8072a3
%{_openmpi3_load}
8072a3
do_build
8072a3
%{_openmpi3_unload}
8072a3
%endif
8072a3
8072a3
%{_mpich_load}
8072a3
do_build
8072a3
%{_mpich_unload}
8072a3
8072a3
%{_mpich_3_2_load}
8072a3
do_build
8072a3
%{_mpich_3_2_unload}
8072a3
8072a3
%ifnarch s390 s390x
8072a3
%{_mvapich2_load}
8072a3
do_build
8072a3
%{_mvapich2_unload}
8072a3
8072a3
%{_mvapich2_2_2_load}
8072a3
do_build
8072a3
%{_mvapich2_2_2_unload}
8072a3
8072a3
%{_mvapich23_load}
8072a3
do_build
8072a3
%{_mvapich23_unload}
8072a3
8072a3
%{_compat_openmpi16_load}
8072a3
mkdir build-$MPI_COMPILER
6ba8b7
cp -al mpi-benchmarks-%{intel_mpi_bench_vers} osu-micro-benchmarks-%{osu_micro_bench_vers} build-$MPI_COMPILER
6ba8b7
cd build-$MPI_COMPILER/mpi-benchmarks-%{intel_mpi_bench_vers}/src
8072a3
make -f make_mpich OPTFLAGS="%{optflags}" MPI_HOME="$MPI_HOME" IMB-MPI1 IMB-EXT IMB-IO
6ba8b7
cd ../../osu-micro-benchmarks-%{osu_micro_bench_vers}
8072a3
patch -p1 < %PATCH101
8072a3
%configure
8072a3
make %{?_smp_mflags}
8072a3
cd ../..
8072a3
%{_compat_openmpi16_unload}
8072a3
%endif
8072a3
8072a3
%ifarch x86_64
8072a3
%{_mvapich2_psm_load}
8072a3
do_build
8072a3
%{_mvapich2_psm_unload}
8072a3
8072a3
%{_mvapich2_2_2_psm_load}
8072a3
do_build
8072a3
%{_mvapich2_2_2_psm_unload}
8072a3
8072a3
%{_mvapich2_2_2_psm2_load}
8072a3
do_build
8072a3
%{_mvapich2_2_2_psm2_unload}
8072a3
8072a3
%{_mvapich23_psm_load}
8072a3
do_build
8072a3
%{_mvapich23_psm_unload}
8072a3
8072a3
%{_mvapich23_psm2_load}
8072a3
do_build
8072a3
%{_mvapich23_psm2_unload}
8072a3
%endif
8072a3
8072a3
%install
8072a3
do_install() {
8072a3
  mkdir -p %{buildroot}$MPI_BIN
6ba8b7
  cd build-$MPI_COMPILER/osu-micro-benchmarks-%{osu_micro_bench_vers}
8072a3
  make install DESTDIR=%{buildroot}/staging
8072a3
  find %{buildroot}/staging -name 'osu_*' -type f -perm -111 | while read X; do
8072a3
    mv $X %{buildroot}$MPI_BIN/mpitests-$(basename $X)
8072a3
  done
6ba8b7
  cd ../mpi-benchmarks-%{intel_mpi_bench_vers}/src
8072a3
  for X in IMB-*; do
8072a3
    cp $X %{buildroot}$MPI_BIN/mpitests-$X
8072a3
  done
8072a3
  cd ../../..
8072a3
}
8072a3
8072a3
# do N installs, one for each mpi stack
8072a3
%{_openmpi_load}
8072a3
do_install
8072a3
%{_openmpi_unload}
8072a3
8072a3
%ifnarch ppc ppc64
8072a3
%{_openmpi3_load}
8072a3
do_install
8072a3
%{_openmpi3_unload}
8072a3
%endif
8072a3
8072a3
%{_mpich_load}
8072a3
do_install
8072a3
%{_mpich_unload}
8072a3
8072a3
%{_mpich_3_2_load}
8072a3
do_install
8072a3
%{_mpich_3_2_unload}
8072a3
8072a3
%ifnarch s390 s390x
8072a3
%{_mvapich2_load}
8072a3
do_install
8072a3
%{_mvapich2_unload}
8072a3
8072a3
%{_mvapich2_2_2_load}
8072a3
do_install
8072a3
%{_mvapich2_2_2_unload}
8072a3
8072a3
%{_mvapich23_load}
8072a3
do_install
8072a3
%{_mvapich23_unload}
8072a3
8072a3
%{_compat_openmpi16_load}
8072a3
do_install
8072a3
%{_compat_openmpi16_unload}
8072a3
%endif
8072a3
8072a3
%ifarch x86_64
8072a3
%{_mvapich2_psm_load}
8072a3
do_install
8072a3
%{_mvapich2_psm_unload}
8072a3
8072a3
%{_mvapich2_2_2_psm_load}
8072a3
do_install
8072a3
%{_mvapich2_2_2_psm_unload}
8072a3
8072a3
%{_mvapich2_2_2_psm2_load}
8072a3
do_install
8072a3
%{_mvapich2_2_2_psm2_unload}
8072a3
8072a3
%{_mvapich23_psm_load}
8072a3
do_install
8072a3
%{_mvapich23_psm_unload}
8072a3
8072a3
%{_mvapich23_psm2_load}
8072a3
do_install
8072a3
%{_mvapich23_psm2_unload}
8072a3
%endif
8072a3
8072a3
%files openmpi
8072a3
%{_libdir}/openmpi/bin/mpitests-*
8072a3
8072a3
%ifnarch ppc ppc64
8072a3
%files openmpi3
8072a3
%{_libdir}/openmpi3/bin/mpitests-*
8072a3
%endif
8072a3
8072a3
%files mpich
8072a3
%{_libdir}/mpich/bin/mpitests-*
8072a3
8072a3
%files mpich32
8072a3
%{_libdir}/mpich-3.2/bin/mpitests-*
8072a3
8072a3
%ifnarch s390 s390x
8072a3
%files mvapich2
8072a3
%{_libdir}/mvapich2/bin/mpitests-*
8072a3
8072a3
%files mvapich222
8072a3
%{_libdir}/mvapich2-2.2/bin/mpitests-*
8072a3
8072a3
%files mvapich23
8072a3
%{_libdir}/mvapich23/bin/mpitests-*
8072a3
8072a3
%files compat-openmpi16
8072a3
%{_libdir}/compat-openmpi16/bin/mpitests-*
8072a3
%endif
8072a3
8072a3
%ifarch x86_64
8072a3
%files mvapich2-psm
8072a3
%{_libdir}/mvapich2-psm/bin/mpitests-*
8072a3
8072a3
%files mvapich222-psm
8072a3
%{_libdir}/mvapich2-2.2-psm/bin/mpitests-*
8072a3
8072a3
%files mvapich222-psm2
8072a3
%{_libdir}/mvapich2-2.2-psm2/bin/mpitests-*
8072a3
8072a3
%files mvapich23-psm
8072a3
%{_libdir}/mvapich23-psm/bin/mpitests-*
8072a3
8072a3
%files mvapich23-psm2
8072a3
%{_libdir}/mvapich23-psm2/bin/mpitests-*
8072a3
%endif
8072a3
8072a3
%changelog
6ba8b7
* Thu Jun 28 2018 Jarod Wilson <jarod@redhat.com> - 5.4.2-1
6ba8b7
- Update IMB to 2018.1.
6ba8b7
- Update OMB to 5.4.2.
6ba8b7
- Resolves: rhbz1596385
6ba8b7
8072a3
* Wed Jan 17 2018 Michal Schmidt <mschmidt@redhat.com> - 5.4-2
8072a3
- Add a mvapich23-psm subpackage.
8072a3
- Resolves: rhbz1536192
8072a3
8072a3
* Sat Nov 04 2017 Michal Schmidt <mschmidt@redhat.com> - 5.4-1
8072a3
- Update IMB to 2018.0.
8072a3
- Update OMB to 5.4.
8072a3
- Add builds for openmpi 3 and mvapich 2.3.
8072a3
- Build IMB NBC and RMA tests.
8072a3
- Build OSUMB collective async tests.
8072a3
- Add precise Requires.
8072a3
- Resolves: rhbz1358437
8072a3
8072a3
* Tue Jul 05 2016 Michal Schmidt <mschmidt@redhat.com> - 4.1-1
8072a3
- Update IMB to 4.1.
8072a3
- Update OSUMB to 5.3.
8072a3
- Add subpackages for new mpich and mvapich2 versions and variants.
8072a3
- Resolves: rhbz961885
8072a3
- Resolves: rhbz1093466
8072a3
8072a3
* Mon Sep 07 2015 Michal Schmidt <mschmidt@redhat.com> - 3.2-14
8072a3
- Rebuild for new openmpi. Add compat-openmpi16 subpackage.
8072a3
- Resolves: rhbz1258866
8072a3
8072a3
* Thu Sep 11 2014 Yaakov Selkowitz <yselkowi@redhat.com> - 3.2-13
8072a3
- Enable on aarch64
8072a3
  Resolves: rhbz1100503
8072a3
8072a3
* Tue Sep 9 2014 Dan HorĂ¡k 
8072a3
- enable on ppc64le
8072a3
- Resolves:#1125616
8072a3
8072a3
* Mon Jan 6 2014 Jay Fenlason 
8072a3
- Fix flags regexes
8072a3
  Resolves: rhbz1048884
8072a3
8072a3
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com>
8072a3
- Mass rebuild 2013-12-27
8072a3
8072a3
* Wed Oct 9 2013 Jay Fenlason <fenlason@redhat.com> 3.2-10
8072a3
- Add BuildRequires for libibmad-devel
8072a3
- Build against mpich, now that we have a mpi-3 version of it.
8072a3
- rebuild against new mvapich2
8072a3
  Resolves: rhbz1011910, rhbz1011915
8072a3
8072a3
* Tue Aug 27 2013 Jay Fenlason <fenlason@redhat.com> 3.2-9
8072a3
- Remove presta and obsolete versions of imb and osu from the tarball.
8072a3
- clean up build process
8072a3
8072a3
* Thu Aug 22 2013 Jay Fenlason <fenlason@redhat.com> 3.2-8
8072a3
- Remove mvapich, as it is dead upstream
8072a3
8072a3
* Tue Feb 26 2013 Jay Fenlason <fenlason@redhat.com> 3.2-7
8072a3
- Add win_free patch to close
8072a3
  Resolves: rhbz834237
8072a3
8072a3
* Thu May 31 2012 Jay Fenlason <fenlason@redhat.com> 3.2-6
8072a3
- Add BuildRequires: hwloc-devel to close
8072a3
  Resolves: rhbz822526
8072a3
8072a3
* Tue Feb 21 2012 Jay Fenlason <fenlason@redhat.com> 3.2-5.el6
8072a3
- Rebuild against newer infinipath-psm, openmpi, mvapich, mvapich2
8072a3
  This removes the openmpi-psm subpackage, as openmpi now switches between
8072a3
   psm and non- at runtime.
8072a3
- Correct version numbers for IMB and OSU benchmarkes in the description.
8072a3
- Update spec file to fix pkgwrangler warnings.
8072a3
  Resolves: rhbz557803
8072a3
  Related: rhbz739138
8072a3
8072a3
* Mon Aug 22 2011 Jay Fenlason <fenlason@redhat.com> 3.2-4.el6
8072a3
- BuildRequires infinipath-psm-devel for the infinipath subpackages.
8072a3
  Related: rhbz725016
8072a3
8072a3
* Thu Aug 18 2011 Jay Fenlason <fenlason@redhat.com> 3.2-3.el6
8072a3
- Build using new mvapich, mvapich2, and openmpi.
8072a3
  Add support for the -psm variants of the three mpi stacks.
8072a3
  Related: rhbz725016
8072a3
8072a3
* Fri Jan 15 2010 Doug Ledford <dledford@redhat.com> - 3.2-2.el6
8072a3
- Rebuild using Fedora MPI package guidelines semantics
8072a3
- Related: bz543948
8072a3
8072a3
* Tue Dec 22 2009 Doug Ledford <dledford@redhat.com> - 3.2-1.el5
8072a3
- Update to latest release and compile against new mpi libs
8072a3
- Related: bz518218
8072a3
8072a3
* Mon Jun 22 2009 Doug Ledford <dledford@redhat.com> - 3.1-3.el5
8072a3
- Rebuild against libibverbs that isn't missing the proper ppc wmb() macro
8072a3
- Related: bz506258
8072a3
8072a3
* Sun Jun 21 2009 Doug Ledford <dledford@redhat.com> - 3.1-2.el5
8072a3
- Rebuild against MPIs that were rebuilt against non-XRC libibverbs
8072a3
- Related: bz506258
8072a3
8072a3
* Thu Apr 23 2009 Doug Ledford <dledford@redhat.com> - 3.1-1
8072a3
- Upgrade to version from ofed 1.4.1-rc3
8072a3
- Related: bz459652
8072a3
8072a3
* Thu Sep 18 2008 Doug Ledford <dledford@redhat.com> - 3.0-2
8072a3
- Add no-strict-aliasing compile flag to silence warnings
8072a3
8072a3
* Thu Sep 18 2008 Doug Ledford <dledford@redhat.com> - 3.0-1
8072a3
- Update to latest upstream version
8072a3
- Compile three times against the three mpi stacks and make three packages
8072a3
- Resolves: bz451474
8072a3
8072a3
* Mon Jan 22 2007 Doug Ledford <dledford@redhat.com> - 2.0-2
8072a3
- Recreate lost spec file and patches from memory
8072a3
- Add dist tag to release
8072a3
- Turn off FORTIFY_SOURCE when building
8072a3