Skip to content

Commit

Permalink
Merge pull request #5289 from kpedro88/openblas102X
Browse files Browse the repository at this point in the history
Backport OpenBLAS fixes [10_2_X]
  • Loading branch information
cmsbuild committed Nov 13, 2019
2 parents caff739 + 20cb24f commit 90a8cfe
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
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
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 @@ -9,7 +9,7 @@ Requires: boost
Requires: hepmc
Requires: yoda
Requires: thepeg
Requires: gsl
Requires: gsl OpenBLAS
Requires: fastjet
Requires: gosamcontrib gosam
Requires: madgraph5amcatnlo
Expand All @@ -35,6 +35,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 @@ -51,7 +52,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
3 changes: 3 additions & 0 deletions rivet.spec
Expand Up @@ -29,6 +29,9 @@ do
chmod +x $CONFIG_SUB_FILE
done

# fix regex to handle case with two -L statements (from gsl w/ openblas)
sed -i 's/\.\*-L\\s\*(\\S+)\.\*/-L(\\S+)/' pyext/setup.py.in

./configure --disable-silent-rules --prefix=%{i} --with-hepmc=${HEPMC_ROOT} \
--with-fastjet=${FASTJET_ROOT} --with-gsl=$GSL_ROOT --with-yoda=${YODA_ROOT} \
--disable-doxygen --disable-pdfmanual --with-pic \
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 @@ -41,6 +41,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 @@ -51,9 +52,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 @@ -72,6 +71,3 @@ find %{i}/lib -name '*.la' -exec rm -f {} \;

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


0 comments on commit 90a8cfe

Please sign in to comment.