From 04b792474e81a3092f8082b80b96e6e4116df5e6 Mon Sep 17 00:00:00 2001 From: Antonio T Date: Dec 06 2020 09:55:37 +0000 Subject: Use devtoolset-6 on EPEL7 --- diff --git a/psblas3.spec b/psblas3.spec index 32a95b3..1a4f21f 100644 --- a/psblas3.spec +++ b/psblas3.spec @@ -2,6 +2,13 @@ %global with_openmpi 1 %global with_serial 1 +# Use devtoolset-6 +# Warning: openblas on epel7 is compiled with gcc-gfortran-4.8.5 (libgfortran.so.3) +# psblas3 needs gcc-6 to be compiled (libgfortran.so.3) +%if 0%{?rhel} && 0%{?rhel} == 7 +%global dts devtoolset-6- +%endif + %if 0%{?fedora} >= 33 %global blaslib flexiblas %else @@ -31,7 +38,7 @@ Name: psblas3 Summary: Parallel Sparse Basic Linear Algebra Subroutines Version: %{major_minor}.1 -Release: 12%{?dist} +Release: 13%{?dist} License: BSD URL: https://github.com/sfilippone/psblas3 Source0: https://github.com/sfilippone/psblas3/archive/v%{version}%{?postrelease_version}/psblas3-%{version}%{?postrelease_version}.tar.gz @@ -62,8 +69,8 @@ model operating with message passing. %if 0%{?with_serial} %package serial Summary: %{name} serial mode -BuildRequires: gcc-gfortran -BuildRequires: gcc, gcc-c++ +BuildRequires: %{?dts}gcc-gfortran +BuildRequires: %{?dts}gcc, %{?dts}gcc-c++ Requires: %{name}-common = %{version}-%{release} Requires: gcc-gfortran%{?_isa} @@ -218,6 +225,10 @@ popd %if 0%{?with_serial} cd psblas3-%{version}%{?postrelease_version} +%if 0%{?el7} +%{?dts:source /opt/rh/devtoolset-6/enable} +%endif + %configure \ --enable-serial --with-fcopt="%{?fc_optflags} -Wno-unused-variable -Wno-unused-dummy-argument -fPIC" \ --with-ccopt="%{build_cflags} -fPIC" --with-include-path="%{_includedir}/%{blaslib} -I%{_fmoddir}" \ @@ -244,6 +255,10 @@ cd ../ %if 0%{?arch64} cd build64 +%if 0%{?el7} +%{?dts:source /opt/rh/devtoolset-6/enable} +%endif + %configure \ --enable-serial --enable-long-integers --with-fcopt="%{?fc_optflags} -Wno-unused-variable -Wno-unused-dummy-argument -fPIC" \ --with-ccopt="%{build_cflags} -fPIC" --with-include-path="%{_includedir}/%{blaslib} -I%{_fmoddir}" \ @@ -271,6 +286,11 @@ cd ../ ## Build MPI versions %if 0%{?with_openmpi} pushd openmpi-build + +%if 0%{?el7} +%{?dts:source /opt/rh/devtoolset-6/enable} +%endif + %{_openmpi_load} export CC=mpicc %configure \ @@ -298,6 +318,11 @@ popd %if 0%{?with_mpich} pushd mpich-build + +%if 0%{?el7} +%{?dts:source /opt/rh/devtoolset-6/enable} +%endif + %{_mpich_load} export CC=mpicc %configure \ @@ -530,6 +555,9 @@ popd ###################################################### %changelog +* Sat Dec 05 2020 Antonio Trande - 3.6.1-13 +- Use devtoolset-6 on EPEL7 + * Sat Dec 05 2020 Antonio Trande - 3.6.1-12 - Rebuild on EPEL7