# Copyright (C) 2019 Dave love, University of Manchester # Licence: MIT %global commit a93ff2376fbc # Build with -march=native %bcond_with native Name: hpgmg Version: 0.4 Release: 2%{?dist} Summary: High performance geometric multigrid benchmark License: BSD URL: https://crd.lbl.gov/departments/computer-science/PAR/research/hpgmg Source0: https://bitbucket.org/hpgmg/hpgmg/get/v%version.tar.bz2#/%name-%version.tar.bz2 BuildRequires: %{?el7:devtoolset-8-}gcc /usr/bin/python3 %global desc \ High Performance Geometric Multigrid (HPGMG-FV) is a benchmark\ designed to proxy the finite volume based geometric multigrid linear\ solvers found in adaptive mesh refinement (AMR) based applications\ like the Low Mach Combustion Code (LMC). HPGMG-FV is being used to\ conduct computer science (e.g. Top500 benchmarking, programming\ models, compilers, performance optimization, and auto-tuners),\ computer architecture, and applied math research. %description %desc %package openmpi Summary: High performance geometric multigrid benchmark - openmpi BuildRequires: openmpi-devel Requires: openmpi%{?_isa} %description openmpi %desc THis is the openmpi version. %prep %setup -q -n hpgmg-hpgmg-%commit %build %{?el7:source /opt/rh/devtoolset-8/enable} %_openmpi_load CFLAGS1="$CFLAGS -fopenmp -Ofast" export CFLAGS %ifarch x86_64 for a in sandybridge haswell skylake-avx512 znver1; do CFLAGS="$CFLAGS1 -march=$a" python3 configure --CC mpicc %make_build V=1 mv build/bin/hpgmg-fv build/bin/hpgmg-fv.$a mv build build.$a done %endif CFLAGS="$CFLAGS1 -Ofast \ %if %{with native} -march=native\ %endif " python3 configure --CC mpicc %make_build V=1 %install %_openmpi_load mkdir -p %buildroot/$MPI_BIN install -m755 build*/bin/hpgmg-fv* %buildroot/$MPI_BIN %files openmpi %license LICENSE %doc README.md %_libdir/openmpi/bin/hpgmg-fv* %changelog * Mon Apr 29 2019 Dave Love - 0.4-2 - Build versions for multiple x86_64 architectures * Tue Apr 16 2019 - 0.4-1 - Initial packaging