# The packaged OpenBLAS gives what appear to be optimal results on AVX # and older x86 systems -- essentially the same as the proprietary # BLAS. The packaged Atlas doesn't have AVX support and, in general, # needs to be built natively for optimal results. However, OpenBLAS # is currently only packaged for x86. %ifarch %{ix86} x86_64 %bcond_without openblas %else %bcond_with openblas %endif %global _docdir_fmt %{name} Name: hpl URL: http://www.netlib.org/benchmark/hpl/ Version: 2.1 Release: 7%{?dist} License: BSD with advertising Requires: %{name}-common = %{version}-%{release} BuildRequires: mpich-devel, openmpi-devel %if %{with openblas} BuildRequires: openblas-devel %else BuildRequires: atlas-devel %endif Group: Applications/System Summary: A Portable Implementation of the High-Performance Linpack Benchmark Source0: http://www.netlib.org/benchmark/hpl/%{name}-%{version}.tar.gz # setup/Make.Linux_PII_CBLAS_gm tuned for Fedora Source1: hpl-README.Fedora Patch0: hpl-2.1-fedora.patch %description HPL is a software package that solves a (random) dense linear system in double precision (64 bits) arithmetic on distributed-memory computers. It can thus be regarded as a portable as well as freely available implementation of the High Performance Computing Linpack Benchmark. %package common Summary: HPL common files BuildArch: noarch %description common HPL common files %package doc Summary: HPL documentation Requires: %{name}-common = %{version}-%{release} BuildArch: noarch %description doc HPL documentation. %package openmpi Summary: HPL compiled against openmpi # Require explicitly for dir ownership and to guarantee the pickup of the right runtime Requires: openmpi Requires: %{name}-common = %{version}-%{release} %description openmpi This package contains HPL compiled with openmpi. %package mpich Summary: HPL compiled against mpich BuildRequires: mpich-devel # Require explicitly for dir ownership and to guarantee the pickup of the right runtime Requires: mpich Requires: %{name}-common = %{version}-%{release} %description mpich This package contains HPL compiled with mpich. %prep %setup -q %patch0 -p1 -b .fedora cp %{SOURCE1} README.Fedora # Remove executable mode from sources find . -type f -perm /111 -exec chmod a-x {} \; # Patch docs to point to upstream sources sed -i "s|\"hpl-%{version}.tar.gz\"|\"http://www.netlib.org/benchmark/hpl/hpl-%{version}.tar.gz\"|g" www/*.html %build # Have to do off-root builds to be able to build many versions at once # To avoid replicated code define a build macro # Cannot build in parallel (with _smp_mflags macro) %global dobuild() \ cp setup/Make.Linux_PII_CBLAS_gm Make.$MPI_COMPILER \ make TOPdir="%{_builddir}/%{name}-%{version}" arch=$MPI_COMPILER ARCH=$MPI_COMPILER \\\ %if %{with openblas} \ LAlib=-lopenblas \ %endif # Build OpenMPI version %{_openmpi_load} %dobuild %{_openmpi_unload} # Build mpich version %{_mpich_load} %dobuild %{_mpich_unload} %install # Install OpenMPI version %{_openmpi_load} install -D -m 0755 bin/${MPI_COMPILER}/xhpl %{buildroot}${MPI_BIN}/xhpl${MPI_SUFFIX} %{_openmpi_unload} # Install MPICH version %{_mpich_load} install -D -m 0755 bin/${MPI_COMPILER}/xhpl %{buildroot}${MPI_BIN}/xhpl${MPI_SUFFIX} %{_mpich_unload} # Install HPL.dat install -D -m 0644 testing/ptest/HPL.dat %{buildroot}%{_sysconfdir}/%{name}/HPL.dat # Install docs install -d -D -m 0755 %{buildroot}%{_docdir}/%{name}/html install -p -D -m 0644 www/* %{buildroot}%{_docdir}/%{name}/html # Install man pages install -d -D -m 0755 %{buildroot}%{_mandir}/man3 install -p -D -m 0644 man/man3/* %{buildroot}%{_mandir}/man3 %check # Check openmpi implementation %{_openmpi_load} pushd bin/${MPI_COMPILER} mpirun -n 4 ./xhpl popd %{_openmpi_unload} # Check mpich implementation %{_mpich_load} pushd bin/${MPI_COMPILER} mpirun -n 4 ./xhpl popd %{_mpich_unload} %files common %exclude %{_docdir}/%{name}/html %license COPYRIGHT %doc BUGS HISTORY README TODO TUNING README.Fedora %{_sysconfdir}/%{name} %files doc %doc %{_docdir}/%{name}/html %{_mandir}/man3/*.3* %files openmpi %{_libdir}/openmpi/bin/xhpl* %files mpich %{_libdir}/mpich/bin/xhpl* %changelog * Thu May 14 2015 Jaroslav Škarvada - 2.1-7 - Moved HPL.dat to /etc/hpl - Added build time check testing openmpi and mpich implementations * Wed May 13 2015 Jaroslav Škarvada - 2.1-6 - Added '_docdir_fmt name' for hpl-common subpackage to store its documentation under /usr/share/doc/hpl - Other changes according to Fedora review * Tue Mar 3 2015 Jaroslav Škarvada - 2.1-5 - Moved HPL.dat to /usr/share * Wed Jan 14 2015 Dave Love - 2.1-4 - Build against openblas on x86 - Fix doc description - Port to current Fedora - Drop headers and devel packages * Thu Jul 31 2014 Jaroslav Škarvada - 2.1-3 - Used mpich instead of mpich2 * Mon Jun 17 2013 Jaroslav Škarvada - 2.1-2 - Moved files from the main package to the common subpackage * Tue May 28 2013 Jaroslav Škarvada - 2.1-1 - New version - Re-packaged according to MPI guidelines * Mon Jun 11 2012 Jaroslav Škarvada - 2.0-2 - Fixed mpich2 module loading on architectures other than x86_64 * Fri Jun 08 2012 Jaroslav Škarvada - 2.0-1 - Initial release