Skip to content

Commit

Permalink
use openblas instead of gslclblas
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar authored and kpedro88 committed Oct 21, 2019
1 parent caff739 commit 8cfd950
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
6 changes: 3 additions & 3 deletions OpenBLAS.spec
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ 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=PENRYN NUM_THREADS=256 DYNAMIC_ARCH=1
%else
%ifarch aarch64
make FC=gfortran BINARY=64 TARGET=ARMV8 NUM_THREADS=256 DYNAMIC_ARCH=0
make FC=gfortran BINARY=64 TARGET=ARMV8 NUM_THREADS=256 DYNAMIC_ARCH=1
%else
make FC=gfortran BINARY=64 NUM_THREADS=256 DYNAMIC_ARCH=0
make FC=gfortran BINARY=64 NUM_THREADS=256 DYNAMIC_ARCH=1
%endif # aarch64
%endif # x86_64

Expand Down
4 changes: 2 additions & 2 deletions gsl-toolfile.spec
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
10 changes: 3 additions & 7 deletions thepeg.spec
Original file line number Diff line number Diff line change
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 8cfd950

Please sign in to comment.