File hpcc.spec of Package hpcc
#
# spec file for package hpcc
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if !0%{?is_opensuse} && 0%{?sle_version:1} && 0%{?sle_version} < 150200
%define DisOMPI3 ExclusiveArch: do_not_build
%endif
%if 0%{?suse_version} > 1550
%define DisOMPI3 ExclusiveArch: do_not_build
%endif
%if !0%{?is_opensuse} && 0%{?sle_version:1} && 0%{?sle_version} < 150600
%define DisOMPI4 ExclusiveArch: do_not_build
%endif
%if "%flavor" == ""
ExclusiveArch: do_not_build
%endif
%if "%flavor" == "openmpi3"
%{?DisOMPI3}
%define mpi_family openmpi
%define mpi_ver 3
%endif
%if "%flavor" == "openmpi4"
%{?DisOMPI4}
%define mpi_family openmpi
%define mpi_ver 4
%endif
%define my_prefix %{_libdir}/mpi/gcc/%{mpi_family}%{?mpi_ver}
%define my_libdir %{my_prefix}/%{_lib}
Name: hpcc-%{mpi_family}%{?mpi_ver}
Version: 1.5.0
Release: 0
Summary: A high performance computing benchmark tool
License: BSD-3-Clause
Group: Productivity/Clustering/Computing
URL: https://hpcchallenge.org/hpcc/index.html
Source0: https://hpcchallenge.org/projectsfiles/hpcc/download/hpcc-%{version}.tar.gz
Source1: Make.Linux
Patch0: https://github.com/icl-utk-edu/hpcc/commit/d2b9a19b4498fdced2860f3394c03f27714b6160.patch#/fix_mpi_errors.patch
BuildRequires: gcc-fortran
BuildRequires: lapack-devel
BuildRequires: %{mpi_family}%{?mpi_ver}-devel
Requires: %{mpi_family}%{?mpi_ver}
%description
The HPC Challenge benchmark consists of basically 7 tests:
* HPL - the Linpack TPP benchmark which measures the floating point rate
of execution for solving a linear system of equations.
* DGEMM - measures the floating point rate of execution of double
precision real matrix-matrix multiplication.
* STREAM - a simple synthetic benchmark program that measures sustainable
memory bandwidth (in GB/s) and the corresponding computation rate for
simple vector kernel.
* PTRANS (parallel matrix transpose) - exercises the communications where
pairs of processors communicate with each other simultaneously. It is a
useful test of the total communications capacity of the network.
* RandomAccess - measures the rate of integer random updates of memory (GUPS).
* FFT - measures the floating point rate of execution of double precision
complex one-dimensional Discrete Fourier Transform (DFT).
* Communication bandwidth and latency - a set of tests to measure latency
and bandwidth of a number of simultaneous communication patterns; based
on b_eff (effective bandwidth benchmark).
%prep
%setup -n hpcc-%{version}
%patch -P0 -p1
cp %{S:1} hpl/Make.Linux
cp _hpccinf.txt hpccinf.txt
%build
make arch=Linux \
CFLAGS="$RPM_OPT_FLAGS" \
CC=%{my_prefix}/bin/mpicc \
LINKER=%{my_prefix}/bin/mpif90
cd ..
%install
install -D -m755 hpcc %{buildroot}%{my_prefix}/bin/hpcc
%files
%doc README.txt hpccinf.txt
%{my_prefix}/bin/hpcc
%changelog