Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport OpenBLAS fixes [10_6_X] #5291

Merged
merged 2 commits into from Nov 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion OpenBLAS.spec
Expand Up @@ -10,7 +10,7 @@ Source: https://github.com/xianyi/OpenBLAS/archive/v%{realversion}.tar.gz

# PRESCOTT is a generic x86-64 target https://github.com/xianyi/OpenBLAS/issues/685
%ifarch x86_64
make FC=gfortran BINARY=64 TARGET=PENRYN NUM_THREADS=256 DYNAMIC_ARCH=0
make FC=gfortran BINARY=64 TARGET=CORE2 NUM_THREADS=256 DYNAMIC_ARCH=0
%else
%ifarch aarch64
make FC=gfortran BINARY=64 TARGET=ARMV8 NUM_THREADS=256 DYNAMIC_ARCH=0
Expand Down
15 changes: 6 additions & 9 deletions geneva.spec
Expand Up @@ -4,7 +4,7 @@ Source: git+https://stash.desy.de/scm/geneva/geneva-public.git?obj=master/%{real

BuildRequires: cmake gmake

Requires: python py2-setuptools py2-numpy gsl boost lhapdf hepmc pythia8
Requires: python py2-setuptools py2-numpy gsl OpenBLAS lhapdf hepmc pythia8
%ifnarch ppc64le
Requires: openloops
%endif
Expand All @@ -18,24 +18,21 @@ Requires: openloops
export OPENLOOPS_FLAG="-Dopenloops_ROOT=${OPENLOOPS_ROOT}"
%endif

rm -rf ../build
mkdir ../build
cd ../build
export LDFLAGS="-L${OPENBLAS_ROOT}/lib -lopenblas"
sed -i -e 's|OPTIONAL_COMPONENTS *gslcblas||' cmake/configure-packages.cmake
rm -rf ../build; mkdir ../build; cd ../build
cmake ../%{n}-%{realversion} \
-DCMAKE_INSTALL_PREFIX=%{i} \
-DCMAKE_CXX_STANDARD=11 \
-Dgsl_ROOT=${GSL_ROOT} \
-Dboost_ROOT=${BOOST_ROOT} \
-Dlhapdf_ROOT=${LHAPDF_ROOT} \
-Dhepmc_ROOT=${HEPMC_ROOT} \
-Dpythia8_ROOT=${PYTHIA8_ROOT} \
${OPENLOOPS_FLAG}
-Dpythia8_ROOT=${PYTHIA8_ROOT} ${OPENLOOPS_FLAG}

make %{makeprocesses}
make beamfunc-install-data LHAPDF_DATA_PATH=${LHAPDF_ROOT}/share/LHAPDF

%install
cd ../build
make install
cd %{i}/bin
sed -i '/#!/c\#!/usr/bin/env python' *
sed -i '/#!/c\#!/usr/bin/env python' %{i}/bin/*
4 changes: 2 additions & 2 deletions gsl-toolfile.spec
@@ -1,4 +1,4 @@
### RPM external gsl-toolfile 1.0
### RPM external gsl-toolfile 2.0
Requires: gsl
%prep

Expand All @@ -11,13 +11,13 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/gsl.xml
<tool name="gsl" version="@TOOL_VERSION@">
<info url="http://www.gnu.org/software/gsl/gsl.html"/>
<lib name="gsl"/>
<lib name="gslcblas"/>
<client>
<environment name="GSL_BASE" default="@TOOL_ROOT@"/>
<environment name="LIBDIR" default="$GSL_BASE/lib"/>
<environment name="INCLUDE" default="$GSL_BASE/include"/>
</client>
<runtime name="ROOT_INCLUDE_PATH" value="$INCLUDE" type="path"/>
<use name="OpenBLAS"/>
<use name="root_cxxdefaults"/>
</tool>
EOF_TOOLFILE
Expand Down
2 changes: 2 additions & 0 deletions gsl.spec
@@ -1,5 +1,7 @@
### RPM external gsl 2.2.1
## INITENV SET GSL_CBLAS_LIB -L${OPENBLAS_ROOT}/lib -lopenblas
Source: ftp://ftp.gnu.org/gnu/%{n}/%{n}-%{realversion}.tar.gz
Requires: OpenBLAS

%define keep_archives true

Expand Down
5 changes: 3 additions & 2 deletions herwigpp.spec
Expand Up @@ -6,7 +6,7 @@ Requires: boost
Requires: hepmc
Requires: yoda
Requires: thepeg
Requires: gsl
Requires: gsl OpenBLAS
Requires: fastjet
Requires: gosamcontrib gosam
Requires: madgraph5amcatnlo
Expand All @@ -32,6 +32,7 @@ CXX="$(which g++) -fPIC"
CC="$(which gcc) -fPIC"
PLATF_CONF_OPTS="--enable-shared --disable-static"

sed -i -e "s|-lgslcblas|-lopenblas|" ./configure
./configure --prefix=%i \
--with-thepeg=$THEPEG_ROOT \
--with-fastjet=$FASTJET_ROOT \
Expand All @@ -48,7 +49,7 @@ PLATF_CONF_OPTS="--enable-shared --disable-static"
FCFLAGS="-fno-range-check" \
%endif
$PLATF_CONF_OPTS \
CXX="$CXX" CC="$CC"
CXX="$CXX" CC="$CC" LDFLAGS="-L${OPENBLAS_ROOT}/lib"
make %makeprocesses all

%install
Expand Down
10 changes: 3 additions & 7 deletions thepeg.spec
Expand Up @@ -6,7 +6,7 @@
Source: http://www.hepforge.org/archive/thepeg/ThePEG-%{realversion}.tar.bz2

Requires: lhapdf
Requires: gsl
Requires: gsl OpenBLAS
Requires: hepmc
Requires: zlib
Requires: fastjet
Expand Down Expand Up @@ -42,6 +42,7 @@ curl -L -k -s -o ./Config/config.sub 'http://git.savannah.gnu.org/gitweb/?p=conf
curl -L -k -s -o ./Config/config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
chmod +x ./Config/config.{sub,guess}

sed -i -e "s|-lgslcblas|-lopenblas|" ./configure
./configure $PLATF_CONF_OPTS \
--with-lhapdf=$LHAPDF_ROOT \
--with-boost=$BOOST_ROOT \
Expand All @@ -52,9 +53,7 @@ chmod +x ./Config/config.{sub,guess}
--with-rivet=$RIVET_ROOT \
--without-javagui \
--prefix=%{i} \
--disable-readline CXX="$CXX" CC="$CC"


--disable-readline CXX="$CXX" CC="$CC" LDFLAGS="-L${OPENBLAS_ROOT}/lib"

make %{makeprocesses}

Expand All @@ -73,6 +72,3 @@ find %{i}/lib -name '*.la' -exec rm -f {} \;

cd $RPM_INSTALL_PREFIX/%{pkgrel}/lib/ThePEG/
ln -s LesHouches.so libLesHouches.so
cd -