Skip to content

Commit

Permalink
Rivet: use eigen flags; update rivet analysis path for multi-arch
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Apr 17, 2024
1 parent bc9f405 commit 63b889b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions rivet.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## INITENV +PATH PYTHON3PATH %{i}/${PYTHON3_LIB_SITE_PACKAGES}
## OLD GENSER Source: http://cern.ch/service-spi/external/MCGenerators/distribution/rivet/rivet-%{realversion}-src.tgz
Source: git+https://gitlab.com/hepcedar/rivet.git?obj=master/%{n}-%{realversion}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz
Source99: scram-tools.file/tools/eigen/env
Patch0: rivet-deprecated-warn
Requires: hepmc fastjet fastjet-contrib yoda
BuildRequires: python3 py3-cython autotools
Expand All @@ -11,6 +12,8 @@ BuildRequires: python3 py3-cython autotools
%setup -n %{n}-%{realversion}
%patch0 -p1

%build
source %{_sourcedir}/env
# Update config.{guess,sub} to detect aarch64 and ppc64le
rm -f %{_tmppath}/config.{sub,guess}
%get_config_guess %{_tmppath}/config.guess
Expand All @@ -34,7 +37,7 @@ autoreconf -fiv
%ifarch aarch64
sed -i -e 's|^ax_openmp_flags=".*"|ax_openmp_flags="none"|' ./configure
%endif
CXXFLAGS="-std=c++%{cms_cxx_standard}"
CXXFLAGS="-std=c++%{cms_cxx_standard} $CMS_EIGEN_CXX_FLAGS"
%ifarch x86_64
CXXFLAGS="${CXXFLAGS} -msse3"
%endif
Expand All @@ -48,8 +51,8 @@ PYTHON=$(which python3) \
# The following hack insures that the bins with the library linked explicitly
# rather than indirectly, as required by the gold linker
perl -p -i -e "s|LIBS = $|LIBS = -lHepMC|g" bin/Makefile
%build
make %{makeprocesses} all
make %{makeprocesses} all

%install
make install
sed -i -e 's|^#!.*python.*|#!/usr/bin/env python3|' %{i}/bin/*
Expand Down
1 change: 1 addition & 0 deletions scram-tools.file/tools/cmssw/cmssw.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</client>
<runtime name="@OS_RUNTIME_LDPATH_NAME@" value="$CMSSW_BASE/biglib/$SCRAM_ARCH" type="path"/>
<runtime name="@OS_RUNTIME_LDPATH_NAME@" value="$CMSSW_BASE/lib/$SCRAM_ARCH" type="path"/>
<runtime name="RIVET_ANALYSIS_PATH" value="$LOCALTOP/lib/$SCRAM_ARCH" type="path"/>
<runtime name="PATH" value="$CMSSW_BINDIR" type="path"/>
<runtime name="PYTHON3PATH" value="$CMSSW_BASE/lib/$SCRAM_ARCH" type="path"/>
<runtime name="ROOT_INCLUDE_PATH" value="$CMSSW_BASE/src" type="path"/>
Expand Down
1 change: 0 additions & 1 deletion scram-tools.file/tools/rivet/rivet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<environment name="INCLUDE" default="$RIVET_BASE/include"/>
</client>
<runtime name="PATH" value="$RIVET_BASE/bin" type="path"/>
<runtime name="RIVET_ANALYSIS_PATH" value="$RIVET_BASE/lib/Rivet" type="path"/>
<runtime name="RIVET_DATA_PATH" value="$RIVET_BASE/share/Rivet" type="path"/>
<runtime name="PDFPATH" default="$RIVET_BASE/share" type="path"/>
<runtime name="ROOT_INCLUDE_PATH" value="$INCLUDE" type="path"/>
Expand Down

0 comments on commit 63b889b

Please sign in to comment.