diff --git a/.gitignore b/.gitignore index 47197af..780cbf9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -SOURCES/mpitests-3.2-rh.tar.gz +SOURCES/IMB_4.1.tgz +SOURCES/osu-micro-benchmarks-5.3.tar.gz diff --git a/.mpitests.metadata b/.mpitests.metadata index e5328c5..9e284c8 100644 --- a/.mpitests.metadata +++ b/.mpitests.metadata @@ -1 +1,2 @@ -13638f4003f01e4a1a7bc98a250e6499fed5b25a SOURCES/mpitests-3.2-rh.tar.gz +3ad1b07b65b2af3e7bd88e33b72a6669bc8af80d SOURCES/IMB_4.1.tgz +efdcae00966f6305fadf44a1f939c07a2e2b22dd SOURCES/osu-micro-benchmarks-5.3.tar.gz diff --git a/SOURCES/0001-imb-fix-Makefiles.patch b/SOURCES/0001-imb-fix-Makefiles.patch new file mode 100644 index 0000000..c83f643 --- /dev/null +++ b/SOURCES/0001-imb-fix-Makefiles.patch @@ -0,0 +1,49 @@ +From 78ada0a984f588f56d2a997a1da870467c87fa0d Mon Sep 17 00:00:00 2001 +From: Michal Schmidt +Date: Tue, 5 Jul 2016 21:53:49 +0200 +Subject: [PATCH] imb: fix Makefiles + +--- + src/Makefile.base | 2 +- + src/make_mpich | 10 +--------- + 2 files changed, 2 insertions(+), 10 deletions(-) + +diff --git a/src/Makefile.base b/src/Makefile.base +index c5feb537cf..5986b6293a 100644 +--- a/src/Makefile.base ++++ b/src/Makefile.base +@@ -97,7 +97,7 @@ clean: + /bin/rm -f *.o *~ PI* core IMB-IO IMB-EXT IMB-MPI1 IMB-NBC IMB-RMA IMB-IO.mic IMB-EXT.mic IMB-MPI1.mic IMB-NBC.mic IMB-RMA.mic exe_io exe_ext exe_mpi1 exe_nbc exe_rma + + .c.o: +- $(CC) $(MPI_INCLUDE) $(CPPFLAGS) -D$(CPP) $(OPTFLAGS) -c $*.c ++ $(CC) $(CPPFLAGS) -D$(CPP) $(OPTFLAGS) -c $*.c + + # DEPENDENCIES + IMB_declare.h: IMB_settings.h IMB_comm_info.h IMB_settings_io.h IMB_bnames_mpi1.h \ +diff --git a/src/make_mpich b/src/make_mpich +index 035b24e13a..549d01a195 100644 +--- a/src/make_mpich ++++ b/src/make_mpich +@@ -1,17 +1,9 @@ + # Enter root directory of mpich install +-MPI_HOME= +- +-MPICC=$(shell find ${MPI_HOME} -name mpicc -print) + + NULL_STRING := +-ifneq (,$(findstring /bin/mpicc,${MPICC})) +-MPI_INCLUDE := -I${MPI_HOME}/include +-else +-$(error Variable MPI_HOME="${MPI_HOME}" does not seem to contain a valid mpicc) +-endif + LIB_PATH = + LIBS = +-CC = ${MPI_HOME}/bin/mpicc ++CC = mpicc + OPTFLAGS = -O3 + CLINKER = ${CC} + LDFLAGS = +-- +2.7.4 + diff --git a/SOURCES/0001-mpi-collective-no-async-ops-MPI_I.patch b/SOURCES/0001-mpi-collective-no-async-ops-MPI_I.patch new file mode 100644 index 0000000..85d6931 --- /dev/null +++ b/SOURCES/0001-mpi-collective-no-async-ops-MPI_I.patch @@ -0,0 +1,33 @@ +From 512916e2cc483dda8e878fb44e9d4117ccad926a Mon Sep 17 00:00:00 2001 +From: Michal Schmidt +Date: Tue, 5 Jul 2016 22:49:22 +0200 +Subject: [PATCH] mpi/collective: no async ops (MPI_I*) + +To build mpitests against old MPI implementations that don't provide +MPI_Ibarrier etc. +--- + mpi/collective/Makefile.in | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/mpi/collective/Makefile.in b/mpi/collective/Makefile.in +index 27421d0eb6..3c1f6bed69 100644 +--- a/mpi/collective/Makefile.in ++++ b/mpi/collective/Makefile.in +@@ -93,13 +93,7 @@ collective_PROGRAMS = osu_alltoallv$(EXEEXT) osu_allgatherv$(EXEEXT) \ + osu_reduce_scatter$(EXEEXT) osu_barrier$(EXEEXT) \ + osu_reduce$(EXEEXT) osu_allreduce$(EXEEXT) \ + osu_alltoall$(EXEEXT) osu_bcast$(EXEEXT) osu_gather$(EXEEXT) \ +- osu_allgather$(EXEEXT) osu_scatter$(EXEEXT) \ +- osu_iallgather$(EXEEXT) osu_ibcast$(EXEEXT) \ +- osu_ialltoall$(EXEEXT) osu_ibarrier$(EXEEXT) \ +- osu_igather$(EXEEXT) osu_iscatter$(EXEEXT) \ +- osu_iscatterv$(EXEEXT) osu_igatherv$(EXEEXT) \ +- osu_iallgatherv$(EXEEXT) osu_ialltoallv$(EXEEXT) \ +- osu_ialltoallw$(EXEEXT) ++ osu_allgather$(EXEEXT) osu_scatter$(EXEEXT) + @CUDA_KERNELS_TRUE@am__append_1 = kernel.cu + @CUDA_KERNELS_TRUE@am__append_2 = kernel.cu + @CUDA_KERNELS_TRUE@am__append_3 = kernel.cu +-- +2.7.4 + diff --git a/SOURCES/mpitests-3.2-make.patch b/SOURCES/mpitests-3.2-make.patch deleted file mode 100644 index 69de593..0000000 --- a/SOURCES/mpitests-3.2-make.patch +++ /dev/null @@ -1,130 +0,0 @@ ---- mpitests-3.2/osu_benchmarks-3.1.1/makefile.make 2009-11-15 10:09:58.000000000 -0500 -+++ mpitests-3.2/osu_benchmarks-3.1.1/makefile 2010-01-17 10:01:53.102371618 -0500 -@@ -1,6 +1,5 @@ - SHELL = /bin/sh --prefix = /usr/local --CC = ${MPIHOME}/bin/mpicc -+CC = mpicc - - .SUFFIXES: - .SUFFIXES: .c .o -@@ -22,9 +21,9 @@ osu_bcast: osu_bcast.c - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -lm -o osu_bcast osu_bcast.c $(LDLIBS) - - install: -- test -d $(prefix)/osu_benchmarks || mkdir $(prefix)/osu_benchmarks -+ test -d $(DESTDIR)$(INSTALL_DIR) || mkdir -p $(DESTDIR)$(INSTALL_DIR) - for benchmark in $(ALL_BENCHMARKS); do\ -- test -x $$benchmark && cp $$benchmark $(prefix)/osu_benchmarks;\ -+ test -x $$benchmark && cp $$benchmark $(DESTDIR)$(INSTALL_DIR)/mpitests-$$benchmark || /bin/true;\ - done - - clean: ---- mpitests-3.2/IMB-3.2/src/Makefile.base.make 2009-11-15 10:09:58.000000000 -0500 -+++ mpitests-3.2/IMB-3.2/src/Makefile.base 2010-01-17 10:06:29.888371547 -0500 -@@ -59,12 +59,20 @@ EXT : $(OBJEXT) - IO: $(OBJIO) - $(CLINKER) $(LDFLAGS) -o IMB-IO $(OBJIO) $(LIB_PATH) $(LIBS) - -+install: -+ mkdir -p ${DESTDIR}; \ -+ for benchmark in IMB-MPI1 IMB-EXT IMB-IO; do \ -+ if [ -e $$benchmark ]; then \ -+ cp $$benchmark ${DESTDIR}${INSTALL_DIR}/mpitests-$$benchmark; \ -+ fi; \ -+ done -+ - # Make sure that we remove executables for specific architectures - clean: - /bin/rm -f *.o *~ PI* core IMB-IO IMB-EXT IMB-MPI1 exe_io exe_ext exe_mpi1 - - .c.o: -- $(CC) $(MPI_INCLUDE) $(CPPFLAGS) -D$(CPP) $(OPTFLAGS) -c $*.c -+ $(CC) $(CPPFLAGS) -D$(CPP) $(OPTFLAGS) -c $*.c - - # DEPENDENCIES - IMB_declare.h: IMB_settings.h IMB_comm_info.h IMB_settings_io.h IMB_bnames_mpi1.h \ ---- mpitests-3.2/IMB-3.2/src/Makefile.make 2009-11-15 10:09:58.000000000 -0500 -+++ mpitests-3.2/IMB-3.2/src/Makefile 2010-01-17 10:01:53.101371937 -0500 -@@ -1,21 +1,9 @@ - # Enter root directory of mpich install --MPI_HOME=$(MPIHOME) -- --MPICC=$(shell find ${MPI_HOME} -name mpicc -print) -- --NULL_STRING := --ifneq (,$(findstring /bin/mpicc,${MPICC})) --MPI_INCLUDE := -I${MPI_HOME}/include --else --$(error Variable MPI_HOME="${MPI_HOME}" does not seem to contain a valid mpicc) --endif --LIB_PATH = --LIBS = --CC = ${MPI_HOME}/bin/mpicc -+CC = mpicc - OPTFLAGS = -O3 - CLINKER = ${CC} - LDFLAGS = - CPPFLAGS = - --export MPI_INCLUDE CC LIB_PATH LIBS OPTFLAGS CLINKER LDFLAGS CPPFLAGS -+export CC OPTFLAGS CLINKER LDFLAGS CPPFLAGS - include Makefile.base ---- mpitests-3.2/Makefile.make 2013-08-27 10:45:52.000000000 -0400 -+++ mpitests-3.2/Makefile 2013-08-27 12:10:36.000000000 -0400 -@@ -1,36 +1,24 @@ --CFLAGS = --MPIHOME=./ --CC = --LIBS = --INCLUDES = --OBJS = --SRCS = --INSTALL_DIR=tests/ --INSTALL_IMB=IMB-3.2 --INSTALL_OSU=osu_benchmarks-3.1.1 --all: ibm osu --install: install-ibm install-osu -+CC = mpicc -+IMB=IMB-3.2 -+PRESTA=presta-1.4.0 -+OSU=osu_benchmarks-3.1.1 -+ -+all: imb osu -+install: install-imb install-osu -+clean: clean-imb clean-osu - - # The variable $@ has the value of the target. --ibm: -- cd $(PWD)/$(INSTALL_IMB)/src && make MPIHOME=$(MPIHOME) IMB-MPI1 -+imb: -+ cd $(IMB)/src && make all - osu: -- cd $(PWD)/$(INSTALL_OSU) && make MPIHOME=$(MPIHOME) --clean-ibm: -- cd $(PWD)/$(INSTALL_IMB)/src && make MPIHOME=$(MPIHOME) clean -+ cd $(OSU) && make all -+osu-mpi1: -+ cd $(OSU) && make mpi1 -+clean-imb: -+ cd $(IMB)/src && make clean - clean-osu: -- cd $(PWD)/$(INSTALL_OSU) && make MPIHOME=$(MPIHOME) clean --clean: clean-ibm clean-osu -- rm -rf $(MPIHOME)/$(INSTALL_DIR) --install-ibm: -- mkdir -p $(MPIHOME)/$(INSTALL_DIR)/$(INSTALL_IMB) -- cp -f $(INSTALL_IMB)/src/IMB-MPI1 $(MPIHOME)/$(INSTALL_DIR)/$(INSTALL_IMB) -+ cd $(OSU) && make clean -+install-imb: -+ cd $(IMB)/src && make install - install-osu: -- mkdir -p $(MPIHOME)/$(INSTALL_DIR)/$(INSTALL_OSU) -- cp -f $(INSTALL_OSU)/osu_bw $(MPIHOME)/$(INSTALL_DIR)/$(INSTALL_OSU) -- cp -f $(INSTALL_OSU)/osu_bibw $(MPIHOME)/$(INSTALL_DIR)/$(INSTALL_OSU) -- cp -f $(INSTALL_OSU)/osu_bcast $(MPIHOME)/$(INSTALL_DIR)/$(INSTALL_OSU) -- cp -f $(INSTALL_OSU)/osu_latency $(MPIHOME)/$(INSTALL_DIR)/$(INSTALL_OSU) -- cp -f $(INSTALL_OSU)/osu_mbw_mr $(MPIHOME)/$(INSTALL_DIR)/$(INSTALL_OSU) -- cp -f $(INSTALL_OSU)/osu_alltoall $(MPIHOME)/$(INSTALL_DIR)/$(INSTALL_OSU) -- cp -f $(INSTALL_OSU)/osu_multi_lat $(MPIHOME)/$(INSTALL_DIR)/$(INSTALL_OSU) -+ cd $(OSU) && make install diff --git a/SOURCES/mpitests-win-free.patch b/SOURCES/mpitests-win-free.patch deleted file mode 100644 index 1753a6c..0000000 --- a/SOURCES/mpitests-win-free.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- mpitests-3.2/IMB-3.2/src/IMB_window.c.orig 2013-02-25 15:50:55.000000000 -0500 -+++ mpitests-3.2/IMB-3.2/src/IMB_window.c 2013-02-25 15:51:22.000000000 -0500 -@@ -140,6 +140,9 @@ Output variables: - c_info->rank, 0, 1, c_info->r_data_type, c_info->WIN); - MPI_ERRHAND(ierr); - } -+ /* Added a call to MPI_WIN_FENCE, per MPI-2.1 11.2.1 */ -+ ierr = MPI_Win_fence(0, c_info->WIN); -+ MPI_ERRHAND(ierr); - ierr = MPI_Win_free(&c_info->WIN); - MPI_ERRHAND(ierr); - } diff --git a/SPECS/mpitests.spec b/SPECS/mpitests.spec index 49dbe79..11ea198 100644 --- a/SPECS/mpitests.spec +++ b/SPECS/mpitests.spec @@ -1,25 +1,23 @@ Summary: MPI Benchmarks and tests Name: mpitests -Version: 3.2 -Release: 14%{?dist} -License: BSD +Version: 4.1 +Release: 1%{?dist} +License: CPL and BSD Group: Applications/Engineering -# We get the mpitests.tar.gz file from an OFED release. -# Unfortunately, they're not good about changing the name -# of the tarball when they change the contents. -# and we had to do some cleanup on the contents. +# These days we get the benchmark soucres from Intel and OSU directly +# rather than from openfabrics. URL: http://www.openfabrics.org -Source: mpitests-%{version}-rh.tar.gz -Patch0: mpitests-3.2-make.patch -Patch1: mpitests-win-free.patch -Provides: mpitests +# https://software.intel.com/en-us/articles/intel-mpi-benchmarks +Source0: https://software.intel.com/sites/default/files/managed/a3/b2/IMB_4.1.tgz +Source1: http://mvapich.cse.ohio-state.edu/download/mvapich/osu-micro-benchmarks-5.3.tar.gz +Patch0: 0001-imb-fix-Makefiles.patch +Patch1: 0001-mpi-collective-no-async-ops-MPI_I.patch BuildRequires: hwloc-devel, libibmad-devel %description Set of popular MPI benchmarks: -IMB-3.2 -Presta-1.4.0 -OSU benchmarks ver 3.1.1 +IMB-4.1 +OSU benchmarks ver 5.3 %package openmpi Summary: MPI tests package compiled against openmpi @@ -36,6 +34,14 @@ BuildRequires: librdmacm-devel, libibumad-devel %description mpich MPI test suite compiled against the mpich package +%package mpich32 +Summary: MPI tests package compiled against mpich-3.2 +Group: Applications +BuildRequires: mpich-3.2-devel +BuildRequires: librdmacm-devel, libibumad-devel +%description mpich32 +MPI test suite compiled against the mpich-3.2 package + # mvapich2 is not yet built on s390(x) %ifnarch s390 s390x %package mvapich2 @@ -46,6 +52,14 @@ BuildRequires: librdmacm-devel, libibumad-devel %description mvapich2 MPI test suite compiled against the mvapich2 package +%package mvapich222 +Summary: MPI tests package compiled against mvapich2-2.2 +Group: Applications +BuildRequires: mvapich2-2.2-devel +BuildRequires: librdmacm-devel, libibumad-devel +%description mvapich222 +MPI test suite compiled against the mvapich2-2.2 package + # s390(x) did not have openmpi-1.6 %package compat-openmpi16 Summary: MPI tests package compiled against compat-openmpi16 @@ -65,13 +79,34 @@ BuildRequires: librdmacm-devel, libibumad-devel BuildRequires: infinipath-psm-devel %description mvapich2-psm MPI test suite compiled against the mvapich2 package using InfiniPath + +%package mvapich222-psm +Summary: MPI tests package compiled against mvapich2-2.2 using InfiniPath +Group: Applications +BuildRequires: mvapich2-2.2-psm-devel +BuildRequires: librdmacm-devel, libibumad-devel +BuildRequires: infinipath-psm-devel +%description mvapich222-psm +MPI test suite compiled against the mvapich2-2.2 package using InfiniPath + +%package mvapich222-psm2 +Summary: MPI tests package compiled against mvapich2-2.2 using OmniPath +Group: Applications +BuildRequires: mvapich2-2.2-psm2-devel +BuildRequires: librdmacm-devel, libibumad-devel +BuildRequires: libpsm2-devel +%description mvapich222-psm2 +MPI test suite compiled against the mvapich2-2.2 package using OmniPath %endif %prep -%setup -q -# secretly patch the code one layer down, not at the top level -%patch0 -p1 -b .make -%patch1 -p1 -b .win_free +%setup -c +%setup -T -D -a 1 +cd imb +%patch0 -p1 -b.make +cd ../osu-micro-benchmarks-5.3 +%patch1 -p1 -b.noasync +cd .. %build RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=.//' -e 's/-fstack-protector-strong//' -e 's/-fstack-protector//'` @@ -81,68 +116,116 @@ export CXX=mpicxx export FC=mpif90 export F77=mpif77 export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" -do_build() { +do_build() { mkdir .$MPI_COMPILER cp -al * .$MPI_COMPILER - cd .$MPI_COMPILER - make $* - cd .. + cd .$MPI_COMPILER/imb/src + make -f make_mpich OPTFLAGS="%{optflags}" IMB-MPI1 IMB-EXT IMB-IO + cd ../../osu-micro-benchmarks-5.3 + %configure + make %{?_smp_mflags} + cd ../.. } # do N builds, one for each mpi stack %{_openmpi_load} -do_build all +do_build %{_openmpi_unload} %{_mpich_load} -do_build all +do_build %{_mpich_unload} +%{_mpich_3_2_load} +do_build +%{_mpich_3_2_unload} + %ifnarch s390 s390x %{_mvapich2_load} -do_build all +do_build %{_mvapich2_unload} +%{_mvapich2_2_2_load} +do_build +%{_mvapich2_2_2_unload} + %{_compat_openmpi16_load} -do_build all +do_build %{_compat_openmpi16_unload} %endif %ifarch x86_64 %{_mvapich2_psm_load} -do_build all +do_build %{_mvapich2_psm_unload} + +%{_mvapich2_2_2_psm_load} +do_build +%{_mvapich2_2_2_psm_unload} + +%{_mvapich2_2_2_psm2_load} +do_build +%{_mvapich2_2_2_psm2_unload} %endif %install +do_install() { + mkdir -p %{buildroot}$MPI_BIN + cd .$MPI_COMPILER + for X in allgather allgatherv allreduce alltoall alltoallv barrier bcast gather gatherv reduce reduce_scatter scatter scatterv; do + cp osu-micro-benchmarks-5.3/mpi/collective/osu_$X %{buildroot}$MPI_BIN/mpitests-osu_$X + done + for X in acc_latency get_bw get_latency put_bibw put_bw put_latency; do + cp osu-micro-benchmarks-5.3/mpi/one-sided/osu_$X %{buildroot}$MPI_BIN/mpitests-osu_$X + done + for X in bibw bw latency latency_mt mbw_mr multi_lat; do + cp osu-micro-benchmarks-5.3/mpi/pt2pt/osu_$X %{buildroot}$MPI_BIN/mpitests-osu_$X + done + for X in EXT IO MPI1; do + cp imb/src/IMB-$X %{buildroot}$MPI_BIN/mpitests-IMB-$X + done + cd .. +} + # do N installs, one for each mpi stack %{_openmpi_load} -mkdir -p %{buildroot}$MPI_BIN -make -C .$MPI_COMPILER DESTDIR=%{buildroot} INSTALL_DIR=$MPI_BIN install +do_install %{_openmpi_unload} %{_mpich_load} -mkdir -p %{buildroot}$MPI_BIN -make -C .$MPI_COMPILER DESTDIR=%{buildroot} INSTALL_DIR=$MPI_BIN install +do_install %{_mpich_unload} +%{_mpich_3_2_load} +do_install +%{_mpich_3_2_unload} + %ifnarch s390 s390x %{_mvapich2_load} -mkdir -p %{buildroot}$MPI_BIN -make -C .$MPI_COMPILER DESTDIR=%{buildroot} INSTALL_DIR=$MPI_BIN install +do_install %{_mvapich2_unload} +%{_mvapich2_2_2_load} +do_install +%{_mvapich2_2_2_unload} + %{_compat_openmpi16_load} -mkdir -p %{buildroot}$MPI_BIN -make -C .$MPI_COMPILER DESTDIR=%{buildroot} INSTALL_DIR=$MPI_BIN install +do_install %{_compat_openmpi16_unload} %endif %ifarch x86_64 %{_mvapich2_psm_load} -mkdir -p %{buildroot}$MPI_BIN -make -C .$MPI_COMPILER DESTDIR=%{buildroot} INSTALL_DIR=$MPI_BIN install +do_install %{_mvapich2_psm_unload} + +%{_mvapich2_2_2_psm_load} +do_install +%{_mvapich2_2_2_psm_unload} + +%{_mvapich2_2_2_psm2_load} +do_install +%{_mvapich2_2_2_psm2_unload} %endif %files openmpi @@ -151,10 +234,16 @@ make -C .$MPI_COMPILER DESTDIR=%{buildroot} INSTALL_DIR=$MPI_BIN install %files mpich %{_libdir}/mpich/bin/* +%files mpich32 +%{_libdir}/mpich-3.2/bin/* + %ifnarch s390 s390x %files mvapich2 %{_libdir}/mvapich2/bin/* +%files mvapich222 +%{_libdir}/mvapich2-2.2/bin/* + %files compat-openmpi16 %{_libdir}/compat-openmpi16/bin/* %endif @@ -162,9 +251,22 @@ make -C .$MPI_COMPILER DESTDIR=%{buildroot} INSTALL_DIR=$MPI_BIN install %ifarch x86_64 %files mvapich2-psm %{_libdir}/mvapich2-psm/bin/* + +%files mvapich222-psm +%{_libdir}/mvapich2-2.2-psm/bin/* + +%files mvapich222-psm2 +%{_libdir}/mvapich2-2.2-psm2/bin/* %endif %changelog +* Tue Jul 05 2016 Michal Schmidt - 4.1-1 +- Update IMB to 4.1. +- Update OSUMB to 5.3. +- Add subpackages for new mpich and mvapich2 versions and variants. +- Resolves: rhbz961885 +- Resolves: rhbz1093466 + * Mon Sep 07 2015 Michal Schmidt - 3.2-14 - Rebuild for new openmpi. Add compat-openmpi16 subpackage. - Resolves: rhbz1258866